Invoke ODI Scenario using OdiInvokeWebService

Invoke ODI Scenario using OdiInvokeWebService:

In my earlier post I have shown, how we can use third party applications to invoke odi services. Today I will demonstrate the same using local agent and with the help of odi tool called “OdiInvokeWebService”. The best part is you dont need to write hundred lines of code to invoke the api.

Before we start please ensure one of your agent is up and running. This can be local or enterprise agent and I am assuming you are very much familiar with agent concepts. Since my local agent is running on my localhost, I will use below URL to test the wsdl. If you can see all the methods then you are all set to move on.

http://localhost:20910/oraclediagent/OdiInvoke?wsdl

odiinvokewebservice1

In ODI package drag and drop the OdiInvokeWenService and provide the URL. Then click on Advanced Button.

odiinvokewebservice2

Click on the earth button to connect.

odiinvokewebservice3

 

Now you can see all the methods available in left panel. Here we will go with requestPortType. In this post, our objective is to  invoke an ODI Scenario using OdiInvokeWebservice.

 

Okay, select the invokeStartScen in left panel and provide the parameters as per your repository information. If you dont have any variables/parameters then just delete it.  Next click on the green earth button (4) to invoke the odi scenario.

odiinvokewebservice4

 

Immediately you can see the response which includes the session id information.

 

 

odiinvokewebservice5

To verify this execution, go to operator and see the session history.  You can see the scenario must be started with session ID 2520091 ( you might have different session id though 😀 ).

Want a response file ? Then just provide the file information as given below.

odiinvokewebservice6

Contents of the response file

<?xml version = ‘1.0’ encoding = ‘UTF-8’?>
<ns2:OdiStartScenResponse xmlns:ns2=”xmlns.oracle.com/odi/OdiInvoke/”>
<Session>2521091</Session>
</ns2:OdiStartScenResponse>

 

Remember it will not return the session status. You need to parse the xml file to read the session number and again send a request to get status of that particular session.

Thats all for today.

Thanks for reading.

About Bhabani 86 Articles
Bhabani has 10 plus years of experience in Data warehousing and Analytics projects that has span across multiple domains like Travel, Banking and Financial, Betting and Gaming Industries. Solution areas he focuses on designing the data warehouse and integrating it with cloud platforms like AWS or GCP. He is also a Elite level contributor at OTN forum more than 9 years. He loves to do experiment and POC on different integration tools and services. Some of his favorite skills are Redshift, Big Query, Python, Apache Airflow, Kafka, HDFS, Map Reduce ,HIVE, Habse, Sqoop, Drill, Impala.

18 Comments

  1. Hi Ranjan ,

    When i try to click on earth button to connect to it , i am getting below error .

    Com.sunopsis.wsinvocation.SnpsWSInvocationException: Cannot connect

    Can you plese help me on this ?

    Regards,
    Karthik

  2. Hi Bhabani,
    For my case I’m using invokeStartScenWithCallback operation.But here the confusion comes what is SessionName and Keywords and how to capture these inside variable?
    Thanks
    Anindya
    sample req:-

    SUPERVISOR
    xxxxxx
    WORKREPo

    Execute_Interface
    001
    GLOBAL
    true


    5

  3. Hi Sir,

    I have a requirement where i need to dynamically build SOAP request from table data and use it to INVOKE Fusion Application web services through ODI InvokeWebservice tool. Please suggest optimal way to do this. If it can be done using procedure (by modifying the target generated xml to make it a soap request using procedure) then please enlighten the way to it. Any help would be greatly appreciated.

    Thanks

    • Hi Sir,
      I have a requirement where i need to dynamically build SOAP request from table data and use it to INVOKE Fusion Application web services through ODI InvokeWebservice tool. Please suggest optimal way to do this. If it can be done using procedure (by modifying the target generated xml to make it a soap request using procedure) then please enlighten the way to it. Any help would be greatly appreciated.

  4. Hi Sir,

    I am using the ODI Utility “OdiInvokeWebService” to call MSMDPUMP.DLL service.

    WSDL URL: file:/dump/ocs/misc/xmla.wsdl
    port type: MsXmlAnalysisSoap
    operation: Execute
    XML Request:

    PRD1
    Destination

    ProcessUpdate
    UseExisting

    Request file: Empty
    Storage Mode for response:New File
    File for Encoding response File: empty
    Xml Encoding For Response File: UTF-8
    Response File: file:/dump/ocs/misc/response.xml
    Response File Format= XML

    Error Message:
    com.sunopsis.wsinvocation.SnpsWSInvocationException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
    at oracle.odi.wsinvocation.client.impl.jaxws.OdiJaxwsParserImpl.createMessage(OdiJaxwsParserImpl.java:361)
    at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceMessage(AbstractJWSDLParserImpl.java:285)
    at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:297)
    at com.sunopsis.dwg.tools.common.WebserviceUtils.invoke(WebserviceUtils.java:99)
    at com.sunopsis.dwg.tools.InvokeWebService.actionExecute(InvokeWebService.java:327)
    at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:296)
    at oracle.odi.runtime.agent.execution.SessionTask.execIntegratedFunction(SessionTask.java:942)
    at oracle.odi.runtime.agent.execution.SessionTask.executeOdiCommand(SessionTask.java:575)
    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:44)
    at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:20)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at oracle.odi.runtime.agent.execution.SessionTask.processTask(SessionTask.java:214)
    at oracle.odi.runtime.agent.execution.SessionTask.doExecuteTask(SessionTask.java:135)
    at oracle.odi.runtime.agent.execution.AbstractSessionTask.execute(AbstractSessionTask.java:856)
    at oracle.odi.runtime.agent.execution.SessionExecutor$SerialTrain.runTasks(SessionExecutor.java:2004)
    at oracle.odi.runtime.agent.execution.SessionExecutor.executeSession(SessionExecutor.java:544)
    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(TaskExecutorAgentRequestProcessor.java:709)
    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor$1.doAction(TaskExecutorAgentRequestProcessor.java:624)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)
    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doProcessStartAgentTask(TaskExecutorAgentRequestProcessor.java:789)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:330)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$2700(StartSessRequestProcessor.java:80)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:957)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:177)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:110)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at oracle.odi.runtime.agent.execution.job.OdiJob.call(OdiJob.java:73)
    at oracle.odi.runtime.agent.execution.job.OdiJob.call(OdiJob.java:73)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
    at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1124)
    at oracle.odi.wsinvocation.client.impl.jaxws.OdiJaxwsParserImpl.createMessageUsingSAAJ(OdiJaxwsParserImpl.java:499)
    at oracle.odi.wsinvocation.client.impl.jaxws.OdiJaxwsParserImpl.createMessage(OdiJaxwsParserImpl.java:249)
    … 32 more
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to get header stream in saveChanges:
    at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:1101)
    … 34 more
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: SOAP exception while trying to externalize:

    Can you plese help me on this ?
    Regards,
    Sona

      • Sona / Bhabani,

        Is this issue been fixed? I am encountering this ODI error and wondering what you all did to fix this. I am using ODI 12c by the way.

        com.sunopsis.wsinvocation.SnpsWSInvocationException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
        at oracle.odi.wsinvocation.client.impl.jaxws.OdiJaxwsParserImpl.createMessage(OdiJaxwsParserImpl.java:361)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceMessage(AbstractJWSDLParserImpl.java:285)
        at com.sunopsis.wsinvocation.client.impl.AbstractJWSDLParserImpl.getWebServiceRequestByOperation(AbstractJWSDLParserImpl.java:297)

  5. Hi ,
    Should this be executed from inside the package.
    Can we generate a scenario of this package and execute ?

  6. Hi,
    Thank you for your Answers.
    I’ve solved this problem.
    now I have this error in executing in local Agent mode:
    ODI-30000: Error while parsing request file.
    I am using the ODI Utility “OdiInvokeWebService”
    to invoke MSMDPUMP.DLL service.
    I have a WSDL file in : file:///C:\SSAS\xmla_1.wsdl
    and Request File is : C:/SSAS/request_1.xml
    Thank you in advance

Leave a Reply

Your email address will not be published.


*