0 Replies Latest reply on May 14, 2013 5:19 PM by bbadeau

    Error calling UTL_DBWS

    bbadeau
      I am currently developing a solution to communicate with a web service using UTL_DBWS and PL/SQL.
      I am able to successfully connect and communicate with http://www.oracle-base.com/webservices/ and a web service I created using JDeveloper.

      We are currently upgrading our LIMS application to LabVantage 6. I have been tasked with providing a process to interact with their APIs by accessing their application web services. I can do this successfully using UTL_HTTP but have been asked to use UTL_DBWS instead.

      I am getting the following error when calling sys.UTL_DBWS.create_service:
      [1]:(Error): ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: error.build.wsdl.model: oracle.j2ee.ws.common.tools.api.WsdlValidationException: Operation "getPublicKey" and "getVersion" have conflicting SOAPAction values. Do not overload any operation or give unique SOAPAction value to each operation binding., Operation "getPublicKey" and "getSequence" have conflicting SOAPAction values. Do not overload any operation or give unique SOAPAction value to each operation binding.,

      I am using SQL Navigator release 6.3
      The error occurs when I attempt to create the service.

      l_service :=
      sys.UTL_DBWS.
      create_service (
      wsdl_document_location => urifactory.geturi (l_wsdl_url),
      service_name => l_service_qname);

      The error suggests that I am getting the WSDL fle but there is a problem with validation:
      (excerpts from the file)
      ...
      <wsdl:operation name="getPublicKey">
                     <wsdl:input message="impl:getPublicKeyRequest" name="getPublicKeyRequest">

      </wsdl:input>
                     <wsdl:output message="impl:getPublicKeyResponse" name="getPublicKeyResponse">

      </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getVersion">
                     <wsdl:input message="impl:getVersionRequest" name="getVersionRequest">

      </wsdl:input>
                     <wsdl:output message="impl:getVersionResponse" name="getVersionResponse">

      </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getSequence" parameterOrder="connectionid sdcid sequenceid startsequencenumber incrementby">
                     <wsdl:input message="impl:getSequenceRequest" name="getSequenceRequest">

      </wsdl:input>
                     <wsdl:output message="impl:getSequenceResponse" name="getSequenceResponse">
      ...
      <wsdl:binding name="SapphireWSSoapBinding" type="impl:SapphireWS">
                <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                <wsdl:operation name="getPublicKey">
                     <wsdlsoap:operation soapAction=""/>
                     <wsdl:input name="getPublicKeyRequest">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.sapphire.labvantage.com" use="encoded"/>
                     </wsdl:input>
                     <wsdl:output name="getPublicKeyResponse">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://zea.wc.corp.com:8080/labvantage_test/services/SapphireWS" use="encoded"/>
                     </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getVersion">
                     <wsdlsoap:operation soapAction=""/>
                     <wsdl:input name="getVersionRequest">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.sapphire.labvantage.com" use="encoded"/>
                     </wsdl:input>
                     <wsdl:output name="getVersionResponse">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://zea.wc.corp.com:8080/labvantage_test/services/SapphireWS" use="encoded"/>
                     </wsdl:output>
                </wsdl:operation>
                <wsdl:operation name="getSequence">
                     <wsdlsoap:operation soapAction=""/>
                     <wsdl:input name="getSequenceRequest">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservices.sapphire.labvantage.com" use="encoded"/>
                     </wsdl:input>
                     <wsdl:output name="getSequenceResponse">
                          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://zea.wc.corp.com:8080/labvantage_test/services/SapphireWS" use="encoded"/>
                     </wsdl:output>
                </wsdl:operation>

      I am assuming that the validation is failing because the soapAction attribute is undefined but research appears to indicate that this should not be a problem.
      Please note that I am able to communicate with the service using UTL_HTTP:
      http_req := UTL_HTTP.begin_request (url, 'POST', 'HTTP/1.1');
      UTL_HTTP.set_body_charset (http_req, 'UTF-8');
      UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
      UTL_HTTP.
      set_header (http_req, 'Content-Length', LENGTH (l_getconnectid_env));
      UTL_HTTP.set_header (http_req, 'SOAPAction', '');
      UTL_HTTP.write_text (http_req, l_getconnectid_env);
      http_resp := UTL_HTTP.get_response (http_req);
      UTL_HTTP.read_text (http_resp, l_getconnectid_env);
      UTL_HTTP.end_response (http_resp);
      (this works)

      I am hoping that someone with greater knowledge has experienced this problem and can offer possible solutions

      Thank you