Customer Portal

Unable to send messege to remote Web Service endpoint

Comments 3

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hello, Akhil,

    if I may, I have a few questions for you:

    1. Are you working the whole time with the authentication token send by salesforce server during login process? If you are not, please see the example showing typical usage of salesforce api. You can find it on your welcome screen (Designer GUI -> Help -> Welcome -> Explore Examples -> Salesforce).

    2. Can you please turn on debug level logging? (Run -> Run Configurations... -> Log level) Then post the new log here, please.

    3. Can you post also your graph? This is for us being able to reproduce your issue.

    Thank you in advance.

    Best regards,
  • Avatar
    akhil
    0
    Comment actions Permalink
    Hi,

    I am trying to run the example mapping for salesforce, 06-ExternalInteraction-SalesforceWebServices - 06-Graph-2.grf. The same map I have renamed as SalesforceContactList.grf. Please find the XML file of the mapping.

    <?xml version="1.0" encoding="UTF-8"?><Graph author="Wesley" created="Tue Jul 31 13:22:30 CEST 2012" guiVersion="3.3.0.P" id="1343739683455" licenseType="Evaluation" modified="Thu Dec 13 08:27:19 UTC 2012" modifiedBy="clover" name="example08_2" revision="1.29" showComponentDetails="true">
    <Global>
    <Metadata id="Metadata0" previewAttachmentCharset="ISO-8859-1">
    <Record fieldDelimiter="|" name="recordName1" previewAttachmentCharset="ISO-8859-1" recordDelimiter="\r\n" type="delimited">
    <Field name="sessionID" type="string"/>
    <Field name="serverURL" type="string"/>
    <Field auto_filling="default_value" default="a" name="joiner" type="string"/>
    </Record>
    </Metadata>
    <Metadata id="Metadata1" previewAttachmentCharset="ISO-8859-1">
    <Record fieldDelimiter="|" name="recordName2" previewAttachmentCharset="ISO-8859-1" recordDelimiter="\r\n" type="delimited">
    <Field name="id" type="string"/>
    <Field name="first_name" type="string"/>
    <Field name="last_name" type="string"/>
    <Field name="birth_date" type="string"/>
    </Record>
    </Metadata>
    <Property fileURL="workspace.prm" id="GraphParameter0"/>
    <Dictionary>
    <Entry id="DictionaryEntry0" input="true" name="dtJoiner" output="false" type="string"/>
    <Entry id="DictionaryEntry1" input="true" name="dtSessionID" output="false" type="string"/>
    <Entry id="DictionaryEntry2" input="true" name="dtSessionURL" output="false" type="string"/>
    </Dictionary>
    </Global>
    <Phase number="0">
    <Node enabled="enabled" fileURL="${DATAOUT_DIR}/contct_list.txt" guiHeight="87" guiName="UniversalDataWriter" guiWidth="146" guiX="618" guiY="96" id="DATA_WRITER0" type="DATA_WRITER"/>
    <Node enabled="enabled" guiHeight="65" guiName="Get Salesforce Credential" guiWidth="173" guiX="21" guiY="96" id="GET_SALESFORCE_CREDENTIAL" type="GET_JOB_INPUT">
    <attr name="mapping"><![CDATA[//#CTL2

    // Transforms input record into output record.
    function integer transform() {
    $out.0.joiner = $in.0.dtJoiner;
    $out.0.sessionID = $in.0.dtSessionID;
    $out.0.serverURL = $in.0.dtSessionURL;

    return OK;
    }

    // Called during component initialization.
    // function boolean init() {}

    // Called during each graph run before the transform is executed. May be used to allocate and initialize resources
    // required by the transform. All resources allocated within this method should be released
    // by the postExecute() method.
    // function void preExecute() {}

    // Called only if transform() throws an exception.
    // function integer transformOnError(string errorMessage, string stackTrace) {}

    // Called during each graph run after the entire transform was executed. Should be used to free any resources
    // allocated within the preExecute() method.
    // function void postExecute() {}

    // Called to return a user-defined error message when an error occurs.
    // function string getMessage() {}
    ]]></attr>
    </Node>
    <Node enabled="enabled" guiHeight="65" guiName="Retrieve Contacts" guiWidth="132" guiX="294" guiY="96" id="RETRIEVE_CONTACTS" namespaceBindings="XMLS=http\://www.w3.org/2001/XMLSchema&#10;incl=http\://www.w3.org/2004/08/xop/include&#10;pref=urn\:enterprise.soap.sforce.com&#10;pref1=urn\:fault.enterprise.soap.sforce.com&#10;" operationName="{urn:enterprise.soap.sforce.com}SforceService#Soap#query" overrideServerURLFromField="serverURL" type="WEB_SERVICE_CLIENT" useNestedNodes="true" wsdlURL="${DATAIN_DIR}/enterprise.wsdl.xml">
    <attr name="requestHeaderStructure"><![CDATA[<urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
    <urn:sessionId>$sessionID</urn:sessionId>
    </urn:SessionHeader>


    ]]></attr>
    <attr name="requestStructure"><![CDATA[<urn:query xmlns:urn="urn:enterprise.soap.sforce.com">
    <urn:queryString>SELECT Id, FirstName, LastName, Birthdate FROM Contact</urn:queryString>
    </urn:query>

    ]]></attr>
    <attr name="responseMapping"><![CDATA[<Mappings>
    <TypeOverride elementPath="/pref:queryResponse/pref:result/pref:records" overridingType="{urn:sobject.enterprise.soap.sforce.com}Contact" />
    <Mapping element="pref:queryResponse">
    <Mapping element="pref:result">
    <Mapping element="pref:records" outPort="0"
    xmlFields="{urn:sobject.enterprise.soap.sforce.com}FirstName;{urn:sobject.enterprise.soap.sforce.com}Birthdate;{urn:sobject.enterprise.soap.sforce.com}Id;{urn:sobject.enterprise.soap.sforce.com}LastName"
    cloverFields="first_name;birth_date;id;last_name">
    </Mapping>
    </Mapping>
    </Mapping>
    </Mappings>
    ]]></attr>
    </Node>
    <Edge debugMode="true" fromNode="GET_SALESFORCE_CREDENTIAL:0" guiBendpoints="" guiRouter="Manhattan" id="Edge0" inPort="Port 0 (request)" metadata="Metadata0" outPort="Port 0 (out)" toNode="RETRIEVE_CONTACTS:0"/>
    <Edge debugMode="true" fromNode="RETRIEVE_CONTACTS:0" guiBendpoints="" guiRouter="Manhattan" id="Edge1" inPort="Port 0 (in)" metadata="Metadata1" outPort="Port 0 (response)" toNode="DATA_WRITER0:0"/>
    </Phase>
    </Graph>

    I ran the graph with the debug mode but both the logs looks the same.

    INFO [main] - *** CloverETL framework/transformation graph, (c) 2002-2012 Javlin a.s, released under GNU Lesser General Public License ***
    INFO [main] - Running with CloverETL library version 3.3.0 build#021 compiled 15/10/2012 15:10:55
    INFO [main] - Running on 1 CPU(s), OS Windows Server 2008 R2, architecture amd64, Java version 1.7.0_07, max available memory for JVM 152448 KB
    INFO [main] - Loading default properties from: defaultProperties
    INFO [main] - Graph definition file: graph/SalesforceContactList.grf
    INFO [main] - Graph revision: 1.29 Modified by: clover Modified: Thu Dec 13 08:27:19 UTC 2012
    INFO [main] - Checking graph configuration...
    INFO [main] - Graph configuration is valid.
    INFO [main] - Graph initialization (example08_2)
    INFO [main] - [Clover] Initializing phase: 0
    WARN [main] - RETRIEVE_CONTACTS: Mapping error - Unknown element 'TypeOverride' is ignored with all it's child elements.
    INFO [main] - Messenger configuration context loaded.
    INFO [main] - Axis2-specific client dispatcher established for service SforceService based on WSDL document.
    INFO [main] - Axis2 modules engaged for client dispatcher.
    INFO [main] - WS-Policy expressions processed.
    INFO [main] - Message validation on request is disabled.
    INFO [main] - Message validation on response is disabled.
    INFO [main] - Asynchronous messenger initialized for operation '{urn:enterprise.soap.sforce.com}SforceService#Soap#query'.
    INFO [main] - [Clover] phase: 0 initialized successfully.
    INFO [WatchDog] - Initial dictionary content:
    INFO [WatchDog] - DictEntry:dtSessionID:string:null
    INFO [WatchDog] - DictEntry:dtSessionURL:string:null
    INFO [WatchDog] - DictEntry:dtJoiner:string:null
    INFO [WatchDog] - Starting up all nodes in phase [0]
    INFO [WatchDog] - Successfully started all nodes in phase!
    ERROR [RETRIEVE_CONTACTS_0] - The system cannot infer the transport information from the null URL.
    INFO [RETRIEVE_CONTACTS_0] - Error occured while executing web service call. Printing request/response details:
    INFO [RETRIEVE_CONTACTS_0] - Web Service Client request header:
    <urn:SessionHeader xmlns:urn="urn:enterprise.soap.sforce.com">
    <urn:sessionId></urn:sessionId>
    </urn:SessionHeader>

    INFO [RETRIEVE_CONTACTS_0] - Web Service Client request body:
    <urn:query xmlns:urn="urn:enterprise.soap.sforce.com">
    <urn:queryString>SELECT Id, FirstName, LastName, Birthdate FROM Contact</urn:queryString>
    </urn:query>
    INFO [RETRIEVE_CONTACTS_0] - Web Service Client response:
    null
    ERROR [WatchDog] - Graph execution finished with error
    ERROR [WatchDog] - Node RETRIEVE_CONTACTS finished with status: ERROR caused by: Unable to send messege to remote Web Service endpoint.
    ERROR [WatchDog] - Node RETRIEVE_CONTACTS error details:
    com.opensys.cloveretl.component.ws.exception.SendingMessageException: Unable to send messege to remote Web Service endpoint.
    at com.opensys.cloveretl.component.ws.proxy.a.b(Unknown Source)
    at com.opensys.cloveretl.component.ws.proxy.a.a(Unknown Source)
    at com.opensys.cloveretl.component.WebServiceClient.a(Unknown Source)
    at com.opensys.cloveretl.component.WebServiceClient.execute(Unknown Source)
    at org.jetel.graph.Node.run(Node.java:465)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.apache.axis2.AxisFault: The system cannot infer the transport information from the null URL.
    at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:82)
    at org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:304)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:180)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at org.apache.axis2.client.ServiceClient.sendReceiveNonBlocking(ServiceClient.java:631)
    ... 6 more
    INFO [WatchDog] - [Clover] Post-execute phase finalization: 0
    INFO [WatchDog] - [Clover] phase: 0 post-execute finalization successfully.
    INFO [WatchDog] - Execution of phase [0] finished with error - elapsed time(sec): 0
    ERROR [WatchDog] - !!! Phase finished with error - stopping graph run !!!
    INFO [WatchDog] - Final dictionary content:
    INFO [WatchDog] - DictEntry:dtSessionID:string:null
    INFO [WatchDog] - DictEntry:dtSessionURL:string:null
    INFO [WatchDog] - DictEntry:dtJoiner:string:null
    INFO [WatchDog] - -----------------------** Summary of Phases execution **---------------------
    INFO [WatchDog] - Phase# Finished Status RunTime(sec) MemoryAllocation(KB)
    INFO [WatchDog] - 0 ERROR 0 16680
    INFO [WatchDog] - ------------------------------** End of Summary **---------------------------
    INFO [WatchDog] - WatchDog thread finished - total execution time: 0 (sec)
    INFO [main] - Freeing graph resources.
    ERROR [main] - Execution of graph failed !

    Thanks & Regards,
    Akhil
  • Avatar
    slechtaj
    0
    Comment actions Permalink
    Hi Akhil,

    Thank you for all the detailed information. As you can see in JobFlowExamples this graph is just a "sub-graph" that is supposed to be executed from master JobFlow (06-ExternalInteraction-SalesforceWebServices.jbf). This particular graph expects to receive data from aforementioned JobFlow. As you can see in the log, dictionary entries that should be populated with input data are null. If you would like to run these examples, you should run this graph via the mentioned JobFlow.

Please sign in to leave a comment.