function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Call Salesforce web service from ODI



We have been able to connect ODI (Oracle Data Integrator) tool to a Salesforce Developer account and perform a reverse engineering process to load salesforce objects' data models into ODI.


We have developed an apex class with a web service method to call another batch apex class method available in the Salesforce developer account.


Our requirement is to call the web service method (hence the batch apex) from ODI. In salesforce, we have downloaded the partner.wsdl and generated the wsdl file for global apex class which contains the web service method. In ODI, there is a tool called ODiInvokeWebService which can be used to call a wsdl file. When we referenced the wsdl file for the apex class and invoke the method which will call the batch apex, we are having the following error message in ODI:


com.sunopsis.wsinvocation.SnpsWSInvocationException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

 at com.sunopsis.wsinvocation.client.a.a.d.requestReply(
 at com.sunopsis.graphical.wsclient.f.b(

at com.sunopsis.wsinvocation.client.a.a.d.requestReply(

 at com.sunopsis.graphical.wsclient.f.b( at



 at$Worker.runTask( at$




The issue is that, we are also able to initiate a login using the partner.wsdl in ODI but we do not know how to pass the session ID value to the global apex class wsdl. The only method in the global apex class wsdl available to call from ODI, is the web service method to call the batch apex. There is no login method as such as in partner.wsdl.


Can you please tell us a way to create a valid session which will allow us to call the batch apex in Salesforce?


Thanks and Regards,



I have a similar issue when calling a web service from ODI to  In order to get past the invalid session ID I first call a login web service and store the session id from the login to a variable that is passed in the header section of the next web service call.  The issue I now has is that I am receiving the error below.


com.sunopsis.wsinvocation.SnpsWSInvocationException: Part does not exist:Header
 at com.sunopsis.wsinvocation.client.a.d.a(
 at com.sunopsis.wsinvocation.client.a.d.a(
 at com.sunopsis.wsinvocation.client.a.d.b(
 at com.sunopsis.wsinvocation.client.a.c.a(
 at com.sunopsis.wsinvocation.client.a.c.getWebServiceRequestByOperation(
 at com.sunopsis.dwg.function.SnpsFunctionBase.execute(
 at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(
 at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(
 at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(
 at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(
 at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(
 at com.sunopsis.dwg.dbobj.SnpSession.treatSession(
 at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(
 at com.sunopsis.dwg.cmd.DwgCommandBase.execute(
 at com.sunopsis.dwg.cmd.e.k(
 at com.sunopsis.dwg.cmd.g.A(

The XML being requested is:

<?xml version ="1.0"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:urn="">



Any assistance one can offer as to how to pass the sessionid successfully would be greatly appreciated.






Hi Shamina,


We have found that the best way to pull and push information from using ODI is via calls to Data Loader using command line calls.  We attempted to utilize the web service functionality; however, we found that this was not the best option for us due to the inability to edit the XML header within ODI.  In order to login to using the Web Service you must login and then capture a session id (or something similar, I am recalling this from memory) and pass it back in the XML header.  Within ODI you can not edit the XML header which prevented us from utilizing this functionality.  There was also an option of turning off this requirement, and passing in a token, but this much less secure as you are then using a public web service.  We opted to utilize Data Loader rather than risk a public web service as we are passing customer information to and from


If you utilize data loader you need to create batch scripts and configuration files but the documentation is pretty clear on how this can be done. 

Hello Bharani,

We used the Salesforce connector available within ODI tool. Actually at that time, we were investigating possibilities to integrate ODI with Salesforce but due to connection issues and unability to resolve them, we did not go ahead with this.

Check if the data loader alternative proposed by "Via_ODI" can help you

Best Regards