Loadjava and jpub in web service using UTL_DBWS giving errors - Help Please

Hi all,
Solicit your help in the below-mentioned scenario.
I am trying to access some published web services from 9.2.0.1.0 RDBMS using UTL_DBMS API. I have accomplished the same using UTL_HTTP. I have followed the instructions specified in:
'http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm#Web_Service_Callout_Utility_Download_'
to prepare the database, download Callout Utility for pre-10g RDBMS (ZIP, 5.68MB), JPub 9.2.0.1.0 Production and OC4J Release 10.1.2 (standalone) and set the environment variables.
loadjava ran successfully for:
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/servlet.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/ejb.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/jlib/jssl-1_2.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/soap/webapps\soap\WEB-INF\lib\soap.jar
But it gave error for:
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/j2ee/home/lib/mail.jar
%ORACLE_DB_HOME%/BIN/loadjava -user scott/tiger@ORACLE -r -v -f -grant public -genmissing %ORACLE_HOME%/OC4J/lib/dms.jar
ORA-29534: referenced object SCOTT.oracle/core/odjl/logMessage could not be resolved.
ORA-29545: badly formed class.
And while trying to run JPub using:
jpub -user=scott/tiger -sysuser sys/change_on_install -httpproxy=www-proxy.us.oracle.com:80 -proxywsdl=http://www.webservicex.net/stockquote.asmx?wsdl -endpoint=http://www.webservicex.net/stockquote.asmx -proxyopts=soap,tabfun -dir=Stock -plsqlpackage=soap_callout_wrapper
I get error:
J2T-120, ERROR: Illegal option "-proxywsdl=http://www.webservicex.net/stockquote.asmx?wsdl" ignored
J2T-120, ERROR: Illegal option "-endpoint=http://www.webservicex.net/stockquote.asmx" ignored
J2T-120, ERROR: Illegal option "-proxyopts=soap,tabfun" ignored
Any help in resolving these issues will be appreciated. Kindly also advise which api – UTL_HTTP or UTL_DBWS I should go for and why.
Regards,
Leslie

It may be better to post this problem to this forum - http://forums.oracle.com/forums/category.jspa?categoryID=24 since this is much more related to loadjava and jpub

Similar Messages

  • Consuming Web Services using UTL_DBWS

    Hi,
    I am trying to call a web service using UTL_DBWS package.
    But I am getting this error:
    ORA-29532: Java call terminated by uncaught Java exception: [failed to localize] No Deserializer found!
    It is failing at this point:
    l_result := sys.UTL_DBWS.invoke (
    call_handle => l_call,
    input_params => l_input_params);
    Is this a problem with database or Web Service? How to resolve this?

    No awnsers???
    I'm having the same problem here....

  • ORA-29541 while trying to access web service using UTL_DBWS

    Hi all,
    Solicit your help in the beforesaid scenario:
    I've 9.2.01 RDBMS, JPub 9.2.0.1.0 Production and OC4J Release 10.1.2 (standalone) environment and a local webservice.
    While issuing jpub, I get the following response:
    jpub -user=scott/tiger@ORACLE -sysuser sys/tiger -proxywsdl="e:\IMyFloatWebService.wsdl" -endpoint="http://10.177.238.71:8988/WS_Appln-WSFloat_prj-context-root/MyFloatWebService" -proxyopts=soap,tabfun -dir=FloatValue -plsqlpackage=soap_callout_wrap_eg -proxyopts=noload
    Note: FloatValue\MyFloatWebServiceProxy.java uses unchecked or unsafe operations
    Note: Recompile with -Xlint:unchecked for details.
    FloatValue\MyFloatWebServiceProxyJPub.java
    FloatValue\plsql_wrapper.sql
    FloatValue\plsql_dropper.sql
    FloatValue\plsql_grant.sql
    FloatValue\plsql_revoke.sql
    FloatValue\plsql_proxy.jar
    Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
    ar file and run FloatValue\plsql_grant.sql in the SYS schema.
    i. e - I get message as seen above:
    "Please run FloatValue\plsql_wrapper.sql in the user schema, load the generated j
    ar file and run FloatValue\plsql_grant.sql in the SYS schema."
    And in sqlplus, while I try to access the web service, I get this error:
    "SQL> sho user;
    USER is "SCOTT"
    SQL> SELECT soap_callout_wrap_eg.getCircumference(20)
    2 FROM dual;
    FROM dual
    ERROR at line 2:
    ORA-29541: class SCOTT.MyWebServiceFloatRTEProxyJPub could not be resolved"
    Could somebody please advise me where I might be going wrong? Any help in this regards will be highly appreciated.
    Regards,
    Leslie

    Hi,
    I presume your Web Service needs HTTP (BASIC?) Authentication.
    All this needs is setting the following 2 properties, which as can be seen, you are setting....
    UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
    UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
    This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
    Following is a sample code snippet that was tested successfully for this :
    Declare
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_result sys.XMLTYPE;
    l_request sys.XMLTYPE;
    BEGIN
    l_service := UTL_DBWS.create_service(null);
    l_call := UTL_DBWS.create_call(l_service);
    UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
    UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
    UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
    xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
    '<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
    '<I_INSTITUTION>0001</I_INSTITUTION>' ||
    '<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
    '</Z_CENTRICITY_GET_DOCLIST>');
    l_result := UTL_DBWS.invoke(l_call, l_request);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlcode || ' ' || sqlerrm);
    END;
    Hope this helps,
    Yogesh

  • Unable to call WSS (WS-Security) enabled Web Service using UTL_DBWS

    We are attempting to call a WSS (WS-Security) enabled Web Service from PL/SQL using the UTL_DBWS package (see [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_dbws.htm#CHDIDGJH] ). We are doing this in similar fashion to [http://www.oracle-base.com/articles/10g/utl_dbws10g.php] with calls to utl_dbws.create_service, utl_dbws.create_call and utl_dbws.invoke.
    Using this method we can successfully call an unsecured Web Service, but calls to WSS-enabled Web Services fail. We are currently using Oracle Database 10.2.0.3.
    The failure we are getting is:
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException:
    com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
    policy ( AuthenticationTokenPolicy(S) ): No Security Header found;nested
    exception is com.sun.xml.wss.XWSSecurityException:
    com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
    policy ( AuthenticationTokenPlicy(S) ): No Security Header found
    Apparently UTL_DBWS does not support calling WSS enabled services, although this doesn't appear to be an officially recognised position. Does anyone know if Oracle are planning to support this soon (if ever)? Looking at Re: Calling WS from PL/SQL using WS-security suggests that support has been considered before, but not yet realised.
    Thanks,
    Tom

    Having raised a Service Request with Oracle support on this, I got the following response from Oracle Development (On unpublished bug [8542959|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=BUG&p_id=8542959]):
    Development has confirmed that WS-Security is not supported through UTL_DBWS. They have also acknowledged that this is not documented and they will change the official Oracle documentation will reflect this fact. From what is being stated, it would appear that there is no plan to support the use of WS-Security through UTL_DBWS in any release in the near future.
    So, in short, without developing your own home-grown SOAP request, there is no way to call a WSS enabled web service from within PL/SQL.
    -Tom

  • ORA-29532 error when invoking SSL web services using UTL_DBWS

    Web Service gurus,
    The WSDL for web services is as follows -
    <definitions name="Webservice" targetNamespace="http://webservice.airclic.com/">

    <types>

    <xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0">
    <xs:element name="Exception" type="tns:Exception"/>
    <xs:element name="listenForEvents" type="tns:listenForEvents"/>
    <xs:element name="listenForEventsResponse" type="tns:listenForEventsResponse"/>
    <xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
    <xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
    <xs:element name="upsertTask" type="tns:upsertTask"/>
    <xs:element name="upsertTaskResponse" type="tns:upsertTaskResponse"/>

    <xs:complexType name="upsertTask">

    <xs:sequence>
    <xs:element minOccurs="0" name="task" type="tns:Task"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Task">

    <xs:complexContent>

    <xs:extension base="tns:PlatformObject">

    <xs:sequence>
    <xs:element minOccurs="0" name="status" type="tns:status"/>
    <xs:element minOccurs="0" name="assignee" type="xs:string"/>
    <xs:element minOccurs="0" name="assigneeUserId" type="xs:string"/>
    <xs:element minOccurs="0" name="name" type="xs:string"/>
    <xs:element minOccurs="0" name="type" type="xs:string"/>
    <xs:element minOccurs="0" name="creationTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="updateTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="startTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="endTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="source" type="tns:source"/>
    <xs:element minOccurs="0" name="notes" type="xs:string"/>
    <xs:element minOccurs="0" name="priority" type="xs:int"/>
    <xs:element minOccurs="0" name="penalized" type="xs:boolean"/>
    <xs:element minOccurs="0" name="hasSLA" type="xs:boolean"/>
    <xs:element minOccurs="0" name="location" type="tns:Location"/>
    <xs:element minOccurs="0" name="windowStartTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="windowEndTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="signee" type="xs:string"/>
    <xs:element minOccurs="0" name="signature" type="xs:base64Binary"/>
    <xs:element minOccurs="0" name="customerId" type="xs:string"/>
    <xs:element minOccurs="0" name="travelTime" type="xs:int"/>
    <xs:element minOccurs="0" name="expirationTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="parentId" type="xs:long"/>
    <xs:element minOccurs="0" name="externalTimezone" type="xs:string"/>
    <xs:element minOccurs="0" name="localTimeOffset" type="xs:long"/>
    <xs:element minOccurs="0" name="consignee" type="xs:string"/>
    <xs:element minOccurs="0" name="assignmentWindowStartTimestamp" type="xs:long"/>
    <xs:element minOccurs="0" name="assignmentWindowEndTimestamp" type="xs:long"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="PlatformObject">

    <xs:sequence>
    <xs:element name="id" type="xs:string"/>
    <xs:element name="externalId" type="xs:string"/>
    <xs:element name="revision" type="xs:long"/>
    <xs:element name="platformDateCreated" type="xs:dateTime"/>
    <xs:element name="platformDateUpdated" type="xs:dateTime"/>
    <xs:element name="objectName" type="xs:string"/>
    <xs:element maxOccurs="unbounded" name="extendedAttributes" type="tns:ExtendedAttribute"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Location">

    <xs:sequence>
    <xs:element minOccurs="0" name="name" type="xs:string"/>
    <xs:element minOccurs="0" name="description" type="xs:string"/>
    <xs:element minOccurs="0" name="type" type="xs:string"/>
    <xs:element minOccurs="0" name="address" type="tns:Address"/>
    <xs:element minOccurs="0" name="position" type="tns:Position"/>
    <xs:element minOccurs="0" name="geofenceId" type="xs:long"/>
    <xs:element minOccurs="0" name="capcity" type="xs:int"/>
    <xs:element minOccurs="0" name="contact" type="xs:string"/>
    <xs:element minOccurs="0" name="email" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Address">

    <xs:sequence>
    <xs:element minOccurs="0" name="addressLine" type="xs:string"/>
    <xs:element minOccurs="0" name="addressLine2" type="xs:string"/>
    <xs:element minOccurs="0" name="city" type="xs:string"/>
    <xs:element minOccurs="0" name="secondaryCity" type="xs:string"/>
    <xs:element minOccurs="0" name="subdivision" type="xs:string"/>
    <xs:element minOccurs="0" name="postalCode" type="xs:string"/>
    <xs:element minOccurs="0" name="country" type="xs:string"/>
    <xs:element minOccurs="0" name="phone" type="xs:string"/>
    <xs:element minOccurs="0" name="freeform" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Position">

    <xs:sequence>
    <xs:element name="latitude" type="xs:double"/>
    <xs:element name="longitude" type="xs:double"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ExtendedAttribute">

    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="value" type="xs:anyType"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="upsertTaskResponse">

    <xs:sequence>
    <xs:element minOccurs="0" name="task" type="tns:Task"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Exception">

    <xs:sequence>
    <xs:element minOccurs="0" name="message" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="listenForEvents">

    <xs:sequence>
    <xs:element minOccurs="0" name="listenParams" type="tns:ListenParams"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ListenParams">

    <xs:sequence>
    <xs:element name="queueName" type="xs:string"/>
    <xs:element name="resendLast" type="xs:boolean"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="listenForEventsResponse">

    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="events" type="tns:Event"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="Event">

    <xs:sequence>
    <xs:element name="id" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AuthenticationRequestEvent">

    <xs:complexContent>

    <xs:extension base="tns:RequestEvent">

    <xs:sequence>
    <xs:element name="username" type="xs:string"/>
    <xs:element minOccurs="0" name="password" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="RequestEvent">

    <xs:complexContent>

    <xs:extension base="tns:Event">

    <xs:sequence>
    <xs:element name="correlationId" type="xs:string"/>
    <xs:element name="response" type="tns:Response"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="Response">

    <xs:sequence>
    <xs:element name="correlationId" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AuthenticationResponse">

    <xs:complexContent>

    <xs:extension base="tns:Response">

    <xs:sequence>
    <xs:element name="success" type="xs:boolean"/>
    <xs:element name="username" type="xs:string"/>
    <xs:element minOccurs="0" name="password" type="xs:string"/>
    <xs:element minOccurs="0" name="firstName" type="xs:string"/>
    <xs:element minOccurs="0" name="lastName" type="xs:string"/>
    <xs:element minOccurs="0" name="email" type="xs:string"/>
    <xs:element minOccurs="0" name="active" type="xs:boolean"/>
    <xs:element minOccurs="0" name="timeZone" type="xs:string"/>
    <xs:element minOccurs="0" name="group" type="xs:string"/>
    <xs:element minOccurs="0" name="role" type="xs:string"/>
    <xs:element minOccurs="0" name="errorCode" type="xs:string"/>
    <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="DispatchEvent">

    <xs:complexContent>

    <xs:extension base="tns:Event">

    <xs:sequence>
    <xs:element name="type" type="tns:eventType"/>
    <xs:element minOccurs="0" name="previousTask" type="tns:Task"/>
    <xs:element name="changeTask" type="tns:Task"/>
    <xs:element minOccurs="0" name="newTask" type="tns:Task"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="sendAuthenticationResponse">

    <xs:sequence>
    <xs:element minOccurs="0" name="authenticationResponse" type="tns:AuthenticationResponse"/>
    </xs:sequence>
    </xs:complexType>

    <xs:complexType name="sendAuthenticationResponseResponse">
    <xs:sequence/>
    </xs:complexType>

    <xs:simpleType name="status">

    <xs:restriction base="xs:string">
    <xs:enumeration value="NULL"/>
    <xs:enumeration value="UNASSIGNED"/>
    <xs:enumeration value="ASSIGNED"/>
    <xs:enumeration value="RECEIVED"/>
    <xs:enumeration value="ACCEPTED"/>
    <xs:enumeration value="REJECTED"/>
    <xs:enumeration value="IN_PROGRESS"/>
    <xs:enumeration value="POSTPONED"/>
    <xs:enumeration value="COMPLETED"/>
    <xs:enumeration value="CANCELED"/>
    <xs:enumeration value="CLEARED"/>
    <xs:enumeration value="EXPIRED"/>
    </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="source">

    <xs:restriction base="xs:string">
    <xs:enumeration value="NULL"/>
    <xs:enumeration value="DISPATCH"/>
    <xs:enumeration value="SYSTEM"/>
    <xs:enumeration value="ENDUSER"/>
    </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="eventType">

    <xs:restriction base="xs:string">
    <xs:enumeration value="TaskCreated"/>
    <xs:enumeration value="TaskUpdated"/>
    <xs:enumeration value="TaskAssigned"/>
    <xs:enumeration value="TaskDeleted"/>
    <xs:enumeration value="TaskStatusChanged"/>
    <xs:enumeration value="TaskConflicted"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>
    </types>

    <message name="Webservice_listenForEvents">
    <part element="tns:listenForEvents" name="listenForEvents"/>
    </message>

    <message name="Webservice_sendAuthenticationResponseResponse">
    <part element="tns:sendAuthenticationResponseResponse" name="sendAuthenticationResponseResponse"/>
    </message>

    <message name="Webservice_sendAuthenticationResponse">
    <part element="tns:sendAuthenticationResponse" name="sendAuthenticationResponse"/>
    </message>

    <message name="Webservice_upsertTaskResponse">
    <part element="tns:upsertTaskResponse" name="upsertTaskResponse"/>
    </message>

    <message name="Exception">
    <part element="tns:Exception" name="Exception"/>
    </message>

    <message name="Webservice_upsertTask">
    <part element="tns:upsertTask" name="upsertTask"/>
    </message>

    <message name="Webservice_listenForEventsResponse">
    <part element="tns:listenForEventsResponse" name="listenForEventsResponse"/>
    </message>

    <portType name="Webservice">

    <operation name="listenForEvents" parameterOrder="listenForEvents">
    <input message="tns:Webservice_listenForEvents"/>
    <output message="tns:Webservice_listenForEventsResponse"/>
    <fault message="tns:Exception" name="Exception"/>
    </operation>

    <operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
    <input message="tns:Webservice_sendAuthenticationResponse"/>
    <output message="tns:Webservice_sendAuthenticationResponseResponse"/>
    <fault message="tns:Exception" name="Exception"/>
    </operation>

    <operation name="upsertTask" parameterOrder="upsertTask">
    <input message="tns:Webservice_upsertTask"/>
    <output message="tns:Webservice_upsertTaskResponse"/>
    <fault message="tns:Exception" name="Exception"/>
    </operation>
    </portType>

    <binding name="WebserviceBinding" type="tns:Webservice">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="listenForEvents">
    <soap:operation soapAction=""/>

    <input>
    <soap:body use="literal"/>
    </input>

    <output>
    <soap:body use="literal"/>
    </output>

    <fault name="Exception">
    <soap:fault name="Exception" use="literal"/>
    </fault>
    </operation>

    <operation name="sendAuthenticationResponse">
    <soap:operation soapAction=""/>

    <input>
    <soap:body use="literal"/>
    </input>

    <output>
    <soap:body use="literal"/>
    </output>

    <fault name="Exception">
    <soap:fault name="Exception" use="literal"/>
    </fault>
    </operation>

    <operation name="upsertTask">
    <soap:operation soapAction=""/>

    <input>
    <soap:body use="literal"/>
    </input>

    <output>
    <soap:body use="literal"/>
    </output>

    <fault name="Exception">
    <soap:fault name="Exception" use="literal"/>
    </fault>
    </operation>
    </binding>

    <service name="Webservice">

    <port binding="tns:WebserviceBinding" name="WebservicePort">
    <soap:address location="https://webservice.mp.b.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
    </port>
    </service>
    </definitions>
    Following is the pl/sql code using UTL_DBWS
    DECLARE
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_wsdl_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_service_qname UTL_DBWS.qname;
    l_port_qname UTL_DBWS.qname;
    l_operation_qname UTL_DBWS.qname;
    l_input_params UTL_DBWS.anydata_list;
    soap_request xmltype;
    l_result xmltype;
    result_output VARCHAR2(32767);
    BEGIN
    l_wsdl_url := 'https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL';
    l_namespace := 'http://webservice.airclic.com/';
    dbms_output.put_line ('1');
    l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Webservice');
    dbms_output.put_line ('2');
    l_port_qname := UTL_DBWS.to_qname(l_namespace, 'WebservicePort');
    dbms_output.put_line ('3');
    l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'sendAuthenticationResponse');
    dbms_output.put_line ('4');
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_qname);
    dbms_output.put_line ('5');
    l_call := UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => l_port_qname,
    operation_name => l_operation_qname);
    dbms_output.put_line ('6');
    UTL_DBWS.SET_PROPERTY(l_call,'USERNAME',<username to access wsdl>);
    dbms_output.put_line ('7');
    UTL_DBWS.SET_PROPERTY(l_call,'PASSWORD',<password>);
    dbms_output.put_line ('8');
    utl_dbws.set_property(l_call,'OPERATION_STYLE', 'document');
    dbms_output.put_line ('9');
    soap_request := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns2:sendAuthenticationResponse xmlns:ns2="http://webservice.airclic.com/">
    <authenticationResponse>
    <correlationId>4646735802698040711:[email protected]</correlationId>
    <success>true</success>
    <username>changlanih</username>
    <password>abcd1234</password>
    <firstName>hero</firstName>
    <lastName>changlani</lastName>
    <email>[email protected]</email>
    <active>true</active>
    <timeZone>eastern</timeZone>
    <group>Northeast</group>
    <role>Service Manager</role>
    </authenticationResponse>
    </ns2:sendAuthenticationResponse>
    </S:Body>
    </S:Envelope>');
    l_result := UTL_DBWS.invoke ( l_call,soap_request);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    result_output := l_result.getstringval;
    dbms_output.put_line('web svc output ===> ' || result_output);
    END;
    Following is the error from pl/sql code
    1
    2
    3
    4
    DECLARE
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: error.build.wsdl.model: oracle.j2ee.ws.common.tools.api.WsdlValidationException:
    Failed to read WSDL from https://webservice.mp.b.airclic.com/webservice/product/fieldservice/v1/Webservice?WSDL:
    HTTP connection error code is 401
    ORA-06512: at "SYS.UTL_DBWS", line 193
    ORA-06512: at "SYS.UTL_DBWS", line 190
    ORA-06512: at line 20
    Notes
    The program fails at following line of code -
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_qname);
    Web services are SSL.
    The WSDL is at https location and needs username/password for access. The username/password to access WSDL are set using UTL_DBWS.SET_PROPERTY
    To access the SSL site, I have imported the CA in Oracle Wallet, JVM home and JDK home.
    Can anyone tell me what am I doing wrong here. I am not able to even establish connection to web service host.
    This is very frustrating - Oracle has no examples on how to access a SSL Web Service (that needs authentication) from Database.
    This is effecting our project deadlines ......... any help would be greatly appreciated.
    Thanks.

    Hi,
    I presume your Web Service needs HTTP (BASIC?) Authentication.
    All this needs is setting the following 2 properties, which as can be seen, you are setting....
    UTL_DBWS.set_property(l_call, 'USERNAME', '<username>');
    UTL_DBWS.set_property(l_call, 'PASSWORD', '<pwd>');
    This should work as long as your DBWS Callout Utility was downloaded from OTN after June 2008, and it's version is atleast 10.1.3.1.
    Following is a sample code snippet that was tested successfully for this :
    Declare
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_result sys.XMLTYPE;
    l_request sys.XMLTYPE;
    BEGIN
    l_service := UTL_DBWS.create_service(null);
    l_call := UTL_DBWS.create_call(l_service);
    UTL_DBWS.set_target_endpoint_address(l_call, 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    UTL_DBWS.set_property(l_call, 'USERNAME', 'username');
    UTL_DBWS.set_property(l_call, 'PASSWORD', 'pwd');
    UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'true');
    UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'http://xxx.oracle.com:8888/basic/MyWebService1SoapHttpPort');
    l_request := XMLTYPE('<Z_CENTRICITY_GET_DOCLIST
    xmlns:urn="urn:sap-com:document:sap:rfc:functions">' ||
    '<I_INCLUDE_OLD_VERSIONS></I_INCLUDE_OLD_VERSIONS>' ||
    '<I_INSTITUTION>0001</I_INSTITUTION>' ||
    '<I_PATIENT_NR>0000000181</I_PATIENT_NR>' ||
    '</Z_CENTRICITY_GET_DOCLIST>');
    l_result := UTL_DBWS.invoke(l_call, l_request);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlcode || ' ' || sqlerrm);
    END;
    Hope this helps,
    Yogesh

  • Calling a web service using UTL_DBWS

    Hello,
    I am trying to call a web service froma PL/SQL procedure using UTL_DBWS. I've been able to use a different method to determine that the web service is working correctly, so I know my problem is somewhere within my UTL_DBWS call. It seems like my call to the web service is not authenticating correctly. What I would like to do is be able to take a look at the XML header that is created by UTL_DBWS based on the parameters I have supplied, in order to ensure that everything is correct. Does anyone know a way to do this?
    Thanks,
    Jason

    Hello,
    I am trying to call a web service froma PL/SQL procedure using UTL_DBWS. I've been able to use a different method to determine that the web service is working correctly, so I know my problem is somewhere within my UTL_DBWS call. It seems like my call to the web service is not authenticating correctly. What I would like to do is be able to take a look at the XML header that is created by UTL_DBWS based on the parameters I have supplied, in order to ensure that everything is correct. Does anyone know a way to do this?
    Thanks,
    Jason

  • Web Services using UTL_DBWS

    Hiiiii Guys,
    Can you pls give a simple working example of procedure through which we can call a web services. I have tried example given on oracle's site, but it seems its not working.
    I have just installed oracle in my PC, so guys pls give me the names of extra JARs which are required
    Thanks in advance
    Cheers!!!
    Vikas

    Your question makes no sense in this forum.
    This is the XML DB forum.
    XML DB Native web services allows SQL statements and PL/SQL procedures packages and functions to be invoked from any client that understands how to process a WSDL withot requring any additional code or jars to be installed. It is a feature of database 11.1.x
    If you are wanting to invoke a Web Service from PL/SQL code then you can do this with UTL_HTTP, again with no jars required..
    DECLARE
      V_SOAP_REQUEST      XMLTYPE := XMLTYPE(
    '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body>
              <m:CXMLTYPE-POSTInput xmlns:m="http://xmlns.oracle.com/orawsv/SOAPTEST/POST">
                   <m:P_REQUEST-XMLTYPE-IN><Request>4</Request></m:P_REQUEST-XMLTYPE-IN>
              </m:CXMLTYPE-POSTInput>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>');
      V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
      V_REQUEST           UTL_HTTP.REQ;
      V_RESPONSE          UTL_HTTP.RESP;
      V_BUFFER            VARCHAR2(32000);
      V_RESPONSE_TEXT     CLOB;
      V_RESPONSE_XML      XMLTYPE;
      V_WSDL              XMLTYPE;
    BEGIN
         DBMS_LOB.CREATETEMPORARY(V_RESPONSE_TEXT, TRUE);
      begin
        V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
        UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
        V_REQUEST.METHOD := 'POST';
        UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
        UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
        V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);     
         LOOP
          UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
          if (LENGTH(V_BUFFER) > 0) then
            DBMS_LOB.WRITEAPPEND(V_RESPONSE_TEXT,LENGTH(V_BUFFER),V_BUFFER);  
          end if;
         END LOOP;
         UTL_HTTP.END_RESPONSE(V_RESPONSE);
      EXCEPTION
        WHEN UTL_HTTP.END_OF_BODY THEN
          UTL_HTTP.END_RESPONSE(V_RESPONSE);
      END;
      V_RESPONSE_XML := XMLTYPE(V_RESPONSE_TEXT);
      select XMLQUERY
               'declare namespace SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; (::)
                declare namespace SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; (::)
                declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; (::)
                declare namespace xsd="http://www.w3.org/2001/XMLSchema"; (::)
                declare namespace m="http://xmlns.oracle.com/orawsv/WSDLTEST/TEST_CLOB"; (::)
                $resp/SOAP-ENV:Envelope/SOAP-ENV:Body/*'
                passing V_RESPONSE_XML as "resp" returning content
        into V_WSDL
        from DUAL;
      select V_WSDL.getClobVal()
        into :RESULT
        from dual;
         DBMS_LOB.FREETEMPORARY(V_RESPONSE_TEXT);
    END;
    /I've no idea about UTL_DBWS or why you would need it

  • Problem with RAM and slowing of computer when using CS5 can anyone help please?

    Hello I am having big problems at the moment with a slow computer when I am using Photoshop CS5 I am informed that I am low on memory.  I do not store any photographs on my computer they are all on an external hard drive, the only image on the computer are the ones I am working with.  I have been in touch with Norton who think it is an Adobe issue can anyone help please, looking forward to hearing from you and to a swift fix of the problem
    Best wishes
    Sheila

    How much memory do you have installed, and what operating system are you running?
    Mark

  • My I phone 6 plus will not play real racing 3 it is slow and won't let me use the buttons. Help please

    MMy I phone 6 plus will not let me play real racing 3 it is slow and will not let me use the button. help please

    I'm not sure there's anyone here who would know the answer to that. Hopefully someone will come along, but you might want to cross post in the Creative Cloud forum as well:
    http://forums.adobe.com/community/creative_cloud
    Be sure to explain that PSE doesn't have a cloud subscription--not many people there will know much about Elements.

  • Web Dynpro application calling external web server using HTTPS giving error

    Hello,
    I don't know whether this is the right question in this forum but my ABAP web-dynpro applicaiton is expected to call another HTTP application on external web server through HTTPS. Presently it is calling through plain HTTP but we want to have HTTPS.
    Here are the steps that we followed based on the link from help.sap.com
    1] Received the certificate files from external web server
    2] Created SSL Anonymous client
    3] Imported the certificate files under this client and added into the certificate list
    4] Re-started ICM
    5] Created RFC Destination of type HTTP to connect to external server with SSL option and basic authentication. This RFC destination was working under plain HTTP.
    When tried with Test connection it gave error "ICM_HTTP_CONNECTION_FAILED".
    Any idea what might be missing. Thanks in advance.
    Regards
    Rajeev

    Used proper certificate after which the error went away

  • ICloud account is always full even though I have a storage of 55 GB and only 2,1 GB used !!!  HELP Please !!!!

    Hi, I got a serious problem with my iCloud account. Beside the fact that I bought extra storage up to 55 GB my account is always full and I deleted everything except my photos 2,1 GB, That's all I got and if I want to take photo or anything it would say memory full !!! Please help me solve this problem asap

    Hello mate ! Thanks for your reply. However if you take a look at this screen shot you'll see I have nothing more then a few photos (2.1 GB)  and 2 tiny little apps but the memory still looks filled up... with air in my opinion. Maybe you got another suggestion .  Thanks a lot my friend

  • I downloaded the newer version of firefox but when i click on icon to bring it up the older version appears and tells me i am using an old version Help please

    i want to know how to replace the newer version.

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com
    For the full system requirements see http://www.mozilla.com/en-US/firefox/system-requirements.html

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

  • Return NULL when invoke Web Service via UTL_DBWS

    Hi all,
    right now, i'm using UTL_DBWS to acces Web Service via database.. but when i'm trying to get data from WEB SERVICE, using utl_dbws.invoke , i got NULL value.
    It happened if The result more than Varchar2 / 32767 byte.
    i'have tried to change code by :
    result := sys.utl_dbws.invoke(l_call, l_input_params);
    P_clob := sys.anydata.accessCLOB(result);
    The Output IS NULL value even if the data was less than Varchar2 or 32767 byte..
    this is my script looks like ::
    declare
    service sys.utl_dbws.SERVICE;
    l_call sys.utl_dbws.CALL;
    result ANYDATA;
    wsdl_url VARCHAR2(1024);
    service_name VARCHAR2(200);
    operation_name VARCHAR2(200);
    input_params sys.utl_dbws.ANYDATA_LIST;
    p_out VARCHAR2(32767);
    p_xml XMLTYPE;
    p_clob CLOB;
    begin
    wsdl_url := 'http://127.0.0.1/Exercise/WSDL2.php?wsdl';
    service_name :='{urn:hellowsdl}hellwsdl';
    operation_name := 'getData';
    service := sys.UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(wsdl_url),
    service_name => service_name);
    l_call := sys.utl_dbws.create_call(
    service_handle => service,
    port_name => null,
    operation_name => operation_name
    input_params(1) := ANYDATA.ConvertVarchar2('DOCCODE');
    result := sys.utl_dbws.invoke(l_call, l_input_params);
    p_out := sys.anydata.accessVarchar2(result);
    sys.UTL_DBWS.release_call (call_handle => l_call);
    sys.UTL_DBWS.release_service (service_handle => service);
    end;
    Thanx for Any Help

    The basics are simple:
    - format a valid SOAP envelope
    - use UTL_HTTP to make the call
    - process the response (typically XML output)
    Sample source code in {message:id=4205205}.

  • Build script for CXF web service using ant.

    Hi, I am trying to build a CXF web service using ant. Does any one have a sample build script for it or steps (such as 1. build wsdl using java2wsdl task, 2. create a war etc.....) to follow to successfully build a web service using Apache CXF and ANT? Your help is greatly appreciated. I am using tomcat server and spring.
    Thanks

    Hi,
    You can find and download sample of project and build scripts from
    'Design and implement POJO Web services using Spring and Apache CXF, Part 1: Introduction to Web services creation using CXF and Spring':
    http://www.ibm.com/developerworks/library/ws-pojo-springcxf/

Maybe you are looking for

  • How to get total number of nodes in a JTree?

    Hi, I am trying to get total number of nodes in a JTree, and cannot find a way to do it. The current getRowCount() method returns the number of rows that are currently being displayed. Is there a way to do this or I am missing something? thanks,

  • Can't forward messages to external address - it's impossible to choose e-mail from list

    Hello colleagues! Faced with a strange problem... I have Exchange 2010 SP2, need to forward mail from domain recipient to mail contact (I mean - external e-mail address). So I created this external contact in "Recipient configuration->Mail contact" b

  • JavaFX and JDK 1.7.x? (x=latest minor build as of 5/13)

    Good morning. I was playing around with building a standalone GUI app last night and wanted to test drive JavaFX 2.0 as the tool to build the UI. After reading through the documentation on the download site, I downloaded the JDK version 1.7.x (64 bit

  • F.08 & fs10n balance is not matching with fbl3n balance

    Dear all        i have a problem with FBL3N,FS10N,&F.08 Example          G/l a/c :14001200   Sundry Cr - Exp -Dom        in fbl3n balance amount is =  16,820,645.64-        in  Fs10n balance amount is =17,160,867.86-         in f.08 balance=         

  • Dynamic structure

    Hi all, I need to dynamically create a structure. The only thing I know is that the structure needs to contain n fields of type String. Is this generally possible <b>whithout using the new generic types of WAS 6.40</b> and if yes - how would that wor