1 Reply Latest reply: Nov 21, 2012 2:28 AM by Jörg Lang RSS

    Problem on APEX 4.2 while accessing Oracle ODI Web services

    Jörg Lang
      Hi there,
      I'm currently creating a APEX application which also has to receive data from Oracle Data Integrator by using Web Services and also starting Scenarions of ODI.

      I have created a "Web Service References" under "Shared components"->Web Service References which was created as "Based on WSDL" and WSDL Location pointed to "http://odiagenthost:20910/oraclediagent/OdiInvoke?wsdl"
      The wsdl defintion of ODI is at the bottom, this is from Oracle ODI an not by us.

      After this, I have created a page, put in a button, a field of type text area and started first with "getVersion, wich is working. So connection in generall is working.

      Then I try to use "getSessionStatus" but on this I receife following errors:

      Error message:
      {code}
      ORA-06502: PL/SQL: numeric or value error: character string buffer too small
      ORA-06512: at "APEX_040200.WWV_FLOW_WEB_SERVICES", line 1100
      ORA-30625: method dispatch on NULL SELF argument is disallowed{code}

      I have also try to use "invokeStartScen" which end in following errors:
      {code}
      ODI-1274: Agent Exception Caused by: java.lang.NullPointerException
      ODI-1274: Agent Exception Caused by: java.lang.NullPointerException
      ODI-1274: Agent Exception
      {code}

      does someone has an idea, what the problem is and how I can fix it?
      Thanks for helping

      Jörg



      WSDL Definition:
      {code}
      <?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:odi="xmlns.oracle.com/odi/OdiInvoke/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="xmlns.oracle.com/odi/OdiInvoke/">
           <wsdl:types>
                <xsd:schema xmlns="xmlns.oracle.com/odi/OdiInvoke/" targetNamespace="xmlns.oracle.com/odi/OdiInvoke/" elementFormDefault="unqualified" attributeFormDefault="unqualified">
                     <xsd:element type="OdiStartType" name="OdiStartScenResponse" />
                     <xsd:element name="OdiStartScenRequest">
                          <xsd:complexType>
                               <xsd:all>
                                    <xsd:element type="OdiCredentialType" name="Credentials" minOccurs="1" />
                                    <xsd:element type="ScenarioRequestType" name="Request" minOccurs="1" />
                               </xsd:all>
                          </xsd:complexType>
                     </xsd:element>
                     <xsd:element name="OdiRestartSessRequest">
                          <xsd:complexType>
                               <xsd:all>
                                    <xsd:element type="OdiCredentialType" name="Credentials" minOccurs="1" />
                                    <xsd:element type="SessionRequestType" name="Request" minOccurs="1" />
                               </xsd:all>
                          </xsd:complexType>
                     </xsd:element>
                     <xsd:complexType name="ScenarioRequestType">
                          <xsd:sequence>
                               <xsd:element type="xsd:string" name="ScenarioName" />
                               <xsd:element type="xsd:string" name="ScenarioVersion" />
                               <xsd:element type="xsd:string" name="Context" />
                               <xsd:element minOccurs="0" default="true" type="xsd:boolean" name="Synchronous" />
                               <xsd:element minOccurs="0" type="xsd:string" name="SessionName" />
                               <xsd:element minOccurs="0" type="xsd:string" name="Keywords" />
                               <xsd:element minOccurs="0" type="VariableType" name="Variables" maxOccurs="unbounded" />
                               <xsd:element name="LogLevel" type="xsd:int" maxOccurs="1" minOccurs="0" default="5" />
                          </xsd:sequence>
                     </xsd:complexType>
                     <xsd:complexType name="SessionRequestType">
                          <xsd:sequence>
                               <xsd:element minOccurs="0" default="true" type="xsd:boolean" name="Synchronous" />
                               <xsd:element minOccurs="1" type="xsd:long" name="SessionId" />
                               <xsd:element minOccurs="0" default="true" type="xsd:boolean" name="KeepVariables" />
                               <xsd:element minOccurs="0" type="VariableType" name="Variables" maxOccurs="unbounded" />
                          </xsd:sequence>
                     </xsd:complexType>
                     <xsd:complexType name="VariableType">
                          <xsd:all>
                               <xsd:element type="xsd:string" name="Name" />
                               <xsd:element type="xsd:string" name="Value" />
                          </xsd:all>
                     </xsd:complexType>
                     <xsd:element name="getWebServiceVersionRequest">
                          <xsd:complexType />
                     </xsd:element>
                     <xsd:element name="getWebServiceVersionResponse">
                          <xsd:complexType>
                               <xsd:sequence>
                                    <xsd:element type="xsd:string" name="version" />
                               </xsd:sequence>
                          </xsd:complexType>
                     </xsd:element>
                     <xsd:complexType name="OdiStartType">
                          <xsd:annotation>
                               <xsd:documentation>
                                    Ack message for OdiStartX request
                               </xsd:documentation>
                          </xsd:annotation>
                          <xsd:sequence>
                               <xsd:element name="Session" type="xsd:long">
                                    <xsd:annotation>
                                         <xsd:documentation>
                                              id of executed session
                                         </xsd:documentation>
                                    </xsd:annotation>
                               </xsd:element>
                          </xsd:sequence>
                     </xsd:complexType>
                     <xsd:element name="OdiRestartSessResponse" type="OdiStartType">
                     </xsd:element>
                     <xsd:complexType name="OdiCredentialType">
                          <xsd:all>
                               <xsd:element name="OdiUser" type="xsd:string" minOccurs="1">
                               </xsd:element>
                               <xsd:element name="OdiPassword" type="xsd:string" minOccurs="1">
                               </xsd:element>
                               <xsd:element name="WorkRepository" type="xsd:string" />
                          </xsd:all>
                     </xsd:complexType>
                     <xsd:element name="OdiGetSessionsStatusRequest">
                          <xsd:complexType>
                               <xsd:sequence>
                                    <xsd:element name="Credentials" type="OdiCredentialType" minOccurs="1" maxOccurs="1">
                                    </xsd:element>
                                    <xsd:element name="SessionIds" type="xsd:long" minOccurs="0" maxOccurs="unbounded">
                                    </xsd:element>
                               </xsd:sequence>
                          </xsd:complexType>
                     </xsd:element>
                     <xsd:element name="OdiGetSessionsStatusResponse">
                          <xsd:complexType>
                               <xsd:sequence>
                                    <xsd:element name="SessionStatusResponse" type="SessionStatusType" minOccurs="0" maxOccurs="unbounded">
                                    </xsd:element>
                               </xsd:sequence>
                          </xsd:complexType>
                     </xsd:element>

                     <xsd:complexType name="SessionStatusType">
                          <xsd:sequence>
                               <xsd:element name="SessionId" type="xsd:long" minOccurs="1" maxOccurs="1">
                               </xsd:element>
                               <xsd:element name="SessionStatus" type="xsd:string" minOccurs="1" maxOccurs="1">
                               </xsd:element>
                               <xsd:element name="SessionReturnCode" type="xsd:string" minOccurs="0" maxOccurs="1">
                               </xsd:element>
                               <xsd:element name="SessionMessage" type="xsd:string" minOccurs="0" maxOccurs="1" />
                          </xsd:sequence>
                     </xsd:complexType>
                </xsd:schema>
           </wsdl:types>
           <wsdl:message name="getWebServiceVersionRequest">
                <wsdl:part element="odi:getWebServiceVersionRequest" name="part1" />
           </wsdl:message>
           <wsdl:message name="getWebServiceVersionResponse">
                <wsdl:part element="odi:getWebServiceVersionResponse" name="part1" />
           </wsdl:message>
           <wsdl:message name="invokeStartScenRequest">
                <wsdl:part name="part1" element="odi:OdiStartScenRequest">
                </wsdl:part>
           </wsdl:message>
           <wsdl:message name="invokeStartScenResponse">
                <wsdl:part name="part1" element="odi:OdiStartScenResponse">
                </wsdl:part>
           </wsdl:message>
           <wsdl:message name="invokeRestartSessRequest">
                <wsdl:part name="part1" element="odi:OdiRestartSessRequest" />
           </wsdl:message>
           <wsdl:message name="invokeRestartSessResponse">
                <wsdl:part name="part1" element="odi:OdiRestartSessResponse" />
           </wsdl:message>
           <wsdl:message name="getSessionStatusRequest">
                <wsdl:part name="part1" element="odi:OdiGetSessionsStatusRequest" />
           </wsdl:message>
           <wsdl:message name="getSessionStatusResponse">
                <wsdl:part name="part1" element="odi:OdiGetSessionsStatusResponse" />
           </wsdl:message>
           <wsdl:portType name="requestPortType">
                <wsdl:operation name="invokeStartScen">
                     <wsdl:input message="odi:invokeStartScenRequest" />
                     <wsdl:output message="odi:invokeStartScenResponse" />
                </wsdl:operation>
                <wsdl:operation name="getVersion">
                     <wsdl:input message="odi:getWebServiceVersionRequest" />
                     <wsdl:output message="odi:getWebServiceVersionResponse" />
                </wsdl:operation>
                <wsdl:operation name="invokeRestartSess">
                     <wsdl:input message="odi:invokeRestartSessRequest" />
                     <wsdl:output message="odi:invokeRestartSessResponse" />
                </wsdl:operation>
                <wsdl:operation name="getSessionStatus">
                     <wsdl:input message="odi:getSessionStatusRequest" />
                     <wsdl:output message="odi:getSessionStatusResponse" />
                </wsdl:operation>
           </wsdl:portType>
           <wsdl:binding name="InvokeRequestSOAP11Binding" type="odi:requestPortType">
                <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
                <wsdl:operation name="invokeStartScen">
                     <soap:operation soapAction="xmlns.oracle.com/odi/OdiInvoke/invokeStartScen" />
                     <wsdl:input>
                          <soap:body use="literal" />
                     </wsdl:input>
                     <wsdl:output>
                          <soap:body use="literal" />
                     </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getSessionStatus">
                     <soap:operation soapAction="xmlns.oracle.com/odi/OdiInvoke/getSessionStatus" />
                     <wsdl:input>
                          <soap:body use="literal" />
                     </wsdl:input>
                     <wsdl:output>
                          <soap:body use="literal" />
                     </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getVersion">
                     <soap:operation soapAction="xmlns.oracle.com/odi/OdiInvoke/getVersion" />
                     <wsdl:input>
                          <soap:body use="literal" />
                     </wsdl:input>
                     <wsdl:output>
                          <soap:body use="literal" />
                     </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="invokeRestartSess">
                     <soap:operation soapAction="xmlns.oracle.com/odi/OdiInvoke/invokeRestartSess" />
                     <wsdl:input>
                          <soap:body use="literal" />
                     </wsdl:input>
                     <wsdl:output>
                          <soap:body use="literal" />
                     </wsdl:output>
                </wsdl:operation>
           </wsdl:binding>
           <wsdl:service name="OdiInvoke">
                <wsdl:port name="OdiInvokeRequestSOAP11port0" binding="odi:InvokeRequestSOAP11Binding">
                     <soap:address location="http://odiagenthost:20910/oraclediagent/OdiInvoke" />
                </wsdl:port>
           </wsdl:service>
      </wsdl:definitions>
      {code}
        • 1. Re: Problem on APEX 4.2 while accessing Oracle ODI Web services
          Jörg Lang
          Okay, I have now make a workarround which is working.

          I have create a manual Web Service Reference with the same function and values for the inputs and this is working.
          So seems that using the provided wdsl stucture is not correctly recognized by apex.

          I have used the tool soapUI to create the Envelope based on the wdsl from ODI so I'm using the sam WDSL logic but filledout manually.
          Strange thing