-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
1Questions
-
2Replies
Mule ESB as "in between" application
Hi all,
Would it be possible to use Mule ESB as an "in between" application, meaning that I build my entire request in Salesforce, pass that request via Mule to a third party endpoint, have the response coming back to Mule and than back into Salesforce? My problem is that the third party endpoint does not have a CA signed certificate and, as a result, I cannot connect to it from Salesforce directly. Second challenge is that this connection uses 2 way ssl which means that I have to include a certificate but I only know which certificate to send when the application is running. So I also need to find a way to tell Mule which certificate to send and what its password is. I have been trying to accomplish this for several days now, but I am not getting any further. I am not even sure if it's possible what I am trying to do. Is there a solution to solve this?
Would it be possible to use Mule ESB as an "in between" application, meaning that I build my entire request in Salesforce, pass that request via Mule to a third party endpoint, have the response coming back to Mule and than back into Salesforce? My problem is that the third party endpoint does not have a CA signed certificate and, as a result, I cannot connect to it from Salesforce directly. Second challenge is that this connection uses 2 way ssl which means that I have to include a certificate but I only know which certificate to send when the application is running. So I also need to find a way to tell Mule which certificate to send and what its password is. I have been trying to accomplish this for several days now, but I am not getting any further. I am not even sure if it's possible what I am trying to do. Is there a solution to solve this?
- dennis.nl1970
- March 30, 2015
- Like
- 0
AddPrimaryContact
Hi all,
I have a problem with this challenge :
Create a Queueable Apex class that inserts the same Contact for each Account for a specific state. Write unit tests that achieve 100% code coverage for the class.
Create an Apex class called 'AddPrimaryContact' that implements the Queueable interface.
Create a constructor for the class that accepts as its first argument a Contact sObject and a second argument as a string for the State abbreviation.
The execute method must query for a maximum of 200 Accounts with the BillingState specified by the State abbreviation passed into the constructor and insert the Contact sObject record associated to each Account. Look at the sObject clone() method.
Create an Apex test class called 'AddPrimaryContactTest'.
In the test class, insert 50 Account records for BillingState "NY" and 50 Account records for BillingState "CA". Create an instance of the AddPrimaryContact class, enqueue the job and assert that a Contact record was inserted for each of the 50 Accounts with the BillingState of "CA".
The unit tests must cover all lines of code included in the AddPrimaryContact class, resulting in 100% code coverage.
Run your test class at least once (via 'Run All' tests the Developer Console) before attempting to verify this challenge.
I haven't 100% for my test class.
Anyone can help me please?
Thanks!
I have a problem with this challenge :
Create a Queueable Apex class that inserts the same Contact for each Account for a specific state. Write unit tests that achieve 100% code coverage for the class.
Create an Apex class called 'AddPrimaryContact' that implements the Queueable interface.
Create a constructor for the class that accepts as its first argument a Contact sObject and a second argument as a string for the State abbreviation.
The execute method must query for a maximum of 200 Accounts with the BillingState specified by the State abbreviation passed into the constructor and insert the Contact sObject record associated to each Account. Look at the sObject clone() method.
Create an Apex test class called 'AddPrimaryContactTest'.
In the test class, insert 50 Account records for BillingState "NY" and 50 Account records for BillingState "CA". Create an instance of the AddPrimaryContact class, enqueue the job and assert that a Contact record was inserted for each of the 50 Accounts with the BillingState of "CA".
The unit tests must cover all lines of code included in the AddPrimaryContact class, resulting in 100% code coverage.
Run your test class at least once (via 'Run All' tests the Developer Console) before attempting to verify this challenge.
I haven't 100% for my test class.
@isTest public class AddPrimaryContactTest { @isTest static void TestList(){ List<Account> Teste = new List <Account>(); for(Integer i=0;i<50;i++){ Teste.add(new Account(BillingState = 'CA', name = 'Test'+i)); } for(Integer j=0;j<50;j++){ Teste.add(new Account(BillingState = 'NY', name = 'Test'+j)); } insert Teste; Contact co = new Contact(); String state = 'CA'; AddPrimaryContact apc = new AddPrimaryContact(co, state); Test.startTest(); System.enqueueJob(apc); Test.stopTest(); for (Account t:Teste){ if( t.BillingState == 'CA'){ System.assertEquals(1, t.Number_of_contacts__c); } } } }
public class AddPrimaryContact implements Queueable{ private Contact c; private String state; public AddPrimaryContact(Contact c, String state){ this.c = c; this.state = state; } public void execute(QueueableContext context) { List<Account> ListAccount = [SELECT ID, Name FROM ACCOUNT WHERE BillingState = :state LIMIT 200]; for (Account l:ListAccount){ for (Contact co:l.Contacts){ c = co.clone(false,false,false,false); insert c; } } } }
Anyone can help me please?
Thanks!
- Selim BEAUJOUR
- March 17, 2016
- Like
- 0
Help needed:Unable to find soap 1.1 address
Hi guys,when I tried to generate class from wsdl,it can parse correctly,but when generate code,it report that
Apex Generation FailedUnable to find soap 1.1 address |
Can anyone tell me the solution?
Thanks !!!
The wsdl file is this:
<definitions name="CoreService" targetNamespace="http://www.caqh.org/SOAP/WSDL/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.caqh.org/SOAP/WSDL/CORERule2.0.1.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://www.caqh.org/SOAP/WSDL/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <xs:schema targetNamespace="http://www.caqh.org/SOAP/WSDL/CORERule2.0.1.xsd" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="COREEnvelopeBatchResultsAckSubmission"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchResultsAckSubmissionResponse"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchResultsRetrievalRequest"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchResultsRetrievalResponse"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchSubmission"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element name="CheckSum" type="xs:string"/> <xs:element name="Payload" type="xs:base64Binary"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchSubmissionAckRetrievalRequest"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchSubmissionAckRetrievalResponse"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeBatchSubmissionResponse"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeRealTimeRequest"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element name="Payload" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="COREEnvelopeRealTimeResponse"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:string"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> <xs:schema targetNamespace="http://www.caqh.org/SOAP/WSDL/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="batchResultsAckSubmitTransactionResponse" nillable="true"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="batchResultsRetrievalTransactionResponse" nillable="true"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="batchSubmitAckRetrievalTransactionResponse" nillable="true"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="batchSubmitTransactionResponse" nillable="true"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element minOccurs="0" name="PayloadLength" type="xs:int"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="CheckSum" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:base64Binary"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="realTimeTransactionResponse" nillable="true"> <xs:complexType> <xs:sequence> <xs:element name="PayloadType" type="xs:string"/> <xs:element name="ProcessingMode" type="xs:string"/> <xs:element name="PayloadID" type="xs:string"/> <xs:element name="TimeStamp" type="xs:string"/> <xs:element name="SenderID" type="xs:string"/> <xs:element name="ReceiverID" type="xs:string"/> <xs:element name="CORERuleVersion" type="xs:string"/> <xs:element minOccurs="0" name="Payload" type="xs:string"/> <xs:element minOccurs="0" name="ErrorCode" type="xs:string"/> <xs:element minOccurs="0" name="ErrorMessage" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> <message name="CORETransactions_batchSubmitTransactionResponse"> <part element="tns:batchSubmitTransactionResponse" name="batchSubmitTransactionResponse"/> </message> <message name="CORETransactions_batchSubmitTransaction"> <part element="ns1:COREEnvelopeBatchSubmission" name="body"/> </message> <message name="CORETransactions_batchResultsAckSubmitTransaction"> <part element="ns1:COREEnvelopeBatchResultsAckSubmission" name="body"/> </message> <message name="CORETransactions_realTimeTransaction"> <part element="ns1:COREEnvelopeRealTimeRequest" name="body"/> </message> <message name="CORETransactions_realTimeTransactionResponse"> <part element="tns:realTimeTransactionResponse" name="realTimeTransactionResponse"/> </message> <message name="CORETransactions_batchSubmitAckRetrievalTransaction"> <part element="ns1:COREEnvelopeBatchSubmissionAckRetrievalRequest" name="body"/> </message> <message name="CORETransactions_batchResultsAckSubmitTransactionResponse"> <part element="tns:batchResultsAckSubmitTransactionResponse" name="batchResultsAckSubmitTransactionResponse"/> </message> <message name="CORETransactions_batchSubmitAckRetrievalTransactionResponse"> <part element="tns:batchSubmitAckRetrievalTransactionResponse" name="batchSubmitAckRetrievalTransactionResponse"/> </message> <message name="CORETransactions_batchResultsRetrievalTransactionResponse"> <part element="tns:batchResultsRetrievalTransactionResponse" name="batchResultsRetrievalTransactionResponse"/> </message> <message name="CORETransactions_batchResultsRetrievalTransaction"> <part element="ns1:COREEnvelopeBatchResultsRetrievalRequest" name="body"/> </message> <portType name="CORETransactions"> <operation name="batchResultsAckSubmitTransaction" parameterOrder="body"> <input message="tns:CORETransactions_batchResultsAckSubmitTransaction"/> <output message="tns:CORETransactions_batchResultsAckSubmitTransactionResponse"/> </operation> <operation name="batchResultsRetrievalTransaction" parameterOrder="body"> <input message="tns:CORETransactions_batchResultsRetrievalTransaction"/> <output message="tns:CORETransactions_batchResultsRetrievalTransactionResponse"/> </operation> <operation name="batchSubmitAckRetrievalTransaction" parameterOrder="body"> <input message="tns:CORETransactions_batchSubmitAckRetrievalTransaction"/> <output message="tns:CORETransactions_batchSubmitAckRetrievalTransactionResponse"/> </operation> <operation name="batchSubmitTransaction" parameterOrder="body"> <input message="tns:CORETransactions_batchSubmitTransaction"/> <output message="tns:CORETransactions_batchSubmitTransactionResponse"/> </operation> <operation name="realTimeTransaction" parameterOrder="body"> <input message="tns:CORETransactions_realTimeTransaction"/> <output message="tns:CORETransactions_realTimeTransactionResponse"/> </operation> </portType> <binding name="CORETransactionsBinding" type="tns:CORETransactions"> <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="batchResultsAckSubmitTransaction"> <soap12:operation soapAction=""/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> <operation name="batchResultsRetrievalTransaction"> <soap12:operation soapAction=""/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> <operation name="batchSubmitAckRetrievalTransaction"> <soap12:operation soapAction=""/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> <operation name="batchSubmitTransaction"> <soap12:operation soapAction=""/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> <operation name="realTimeTransaction"> <soap12:operation soapAction=""/> <input> <soap12:body use="literal"/> </input> <output> <soap12:body use="literal"/> </output> </operation> </binding> <service name="CoreService"> <port binding="tns:CORETransactionsBinding" name="CORETransactionsPort"> <soap12:address location="http://AS03:8080/stomp/webservices/CORETransactions"/> </port> </service> </definitions>
- czhang
- July 22, 2011
- Like
- 0