Invoking P6 web services using PL/SQL block

Hi Team,
We have requirement like
Oracle jobs will invoke PL/SQL code to authenticate and establish a session with the P6 Web services.
Web service will export Project data from One Primavera database as an XML and copy to common location.
Then this XML project files will be imported into archive database.
Could anyone help me how I can establish sessio between Pl/SQL and P6 webservices?
Please let me know if you need any more information.
Regards,
Santosh
Edited by: SantoshV Singh on Apr 29, 2013 10:09 PM

It will be no different than connecting to any web services through PL/SQL which is pretty hard to do and if you are asking how to do it then you have a steep learning curve ahead of you and not a great deal in the way of good examples out there.
I wouldn't even attempt the approach you suggest.  Instead I would probably write a Java application to do it and use your PL/SQL to enqueue a message that routed to the Java application.  Then the java application with the Web Services support and P6 client would be easier to do what you want with web services.

Similar Messages

  • Error invoking SSL web service using pl sql UTL_HTTP

    Web Services Gurus,
    I am invoking a secure web service based on the following WSDL file from a pl/sql program using UTL_HTTP package.
    The web service is secure and prompts for authentication.
    The web services certificate is imported in Oracle Wallet on Database Server.
    I am listing the WSDL file, the pl/sql code and error message as follows -
    1. The WSDL file -
    <definitions
    name="Webservice"
    targetNamespace="http://webservice.airclic.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://webservice.airclic.com/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0" xmlns:tns="http://webservice.airclic.com/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Exception" type="tns:Exception"/>
    <xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
    <xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
    <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: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:simpleType>
    <xs:simpleType name="source"></xs:simpleType>
    <xs:simpleType name="eventType"></xs:simpleType>
    </xs:schema>
    </types>
    <message name="Webservice_sendAuthenticationResponse">
    <part name="sendAuthenticationResponse" element="tns:sendAuthenticationResponse"/>
    </message>
    <message name="Webservice_sendAuthenticationResponseResponse">
    <part name="sendAuthenticationResponseResponse" element="tns:sendAuthenticationResponseResponse"/>
    </message>
    <portType name="Webservice">
    <operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
    <input message="tns:Webservice_sendAuthenticationResponse"/>
    <output message="tns:Webservice_sendAuthenticationResponseResponse"/>
    <fault name="Exception" message="tns:Exception"/>
    </operation>
    </portType>
    <binding name="WebserviceBinding" type="tns:Webservice">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <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>
    </binding>
    <service name="Webservice">
    <port name="WebservicePort" binding="tns:WebserviceBinding">
    <soap:address location="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
    </port>
    </service>
    </definitions>
    2. The pl/sql code that calls the web service operation sendAuthenticationResponse
    procedure send_auth_response
    as
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    begin
    -- initiate wallet for AirClic certificate
    dbms_output.put_line ('1');
    utl_http.set_wallet('file:/etc/oracle/wallet','<wallet password>');
    -- create soap request
    dbms_output.put_line ('2');
    soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:sendAuthenticationResponse xmlns="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <success xsi:type="xsd:boolean">true</success>
    <username xsi:type="xsd:string">changlanih</username>
    <password xsi:type="xsd:string">abcd1234</password>
    <firstName xsi:type="xsd:string">hero</firstName>
    <lastName xsi:type="xsd:string">changlani</lastName>
    <email xsi:type="xsd:string">[email protected]</email>
    <active xsi:type="xsd:boolean">true</active>
    <timeZone xsi:type="xsd:string">eastern</timeZone>
    <group xsi:type="xsd:string">Northeast</group>
    <role xsi:type="xsd:string">Service Manager</role>
    <errorCode xsi:type="xsd:string"></errorCode>
    <errorMessage xsi:type="xsd:string"></errorMessage>
    </ns1:sendAuthenticationResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>';
    -- request that exceptions are raised for error Status Codes
    dbms_output.put_line ('3');
    utl_http.set_response_error_check (true);
    -- allow testing for exceptions like UTL_HTTP.http_server_error
    dbms_output.put_line ('4');
    utl_http.set_detailed_excp_support (true);
    --utl_http.set_transfer_timeout (ln_time_out);
    dbms_output.put_line ('5');
    utl_http.set_body_charset ('UTF-8');
    -- begin request
    dbms_output.put_line ('5.5');
    http_req:= utl_http.begin_request
    ('https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice/sendAuthenticationResponse', ------ is the url correct here ?
    'POST',
    'HTTP/1.1'
    dbms_output.put_line ('6');
    utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>');
    dbms_output.put_line ('7');
    utl_http.set_persistent_conn_support (http_req, false);
    dbms_output.put_line ('8');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    dbms_output.put_line ('9');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    dbms_output.put_line ('10');
    utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
    dbms_output.put_line ('11');
    utl_http.write_text(http_req, soap_request);
    dbms_output.put_line ('12');
    http_resp := utl_http.get_response(http_req);
    -- debug messages
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
    DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
    DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
    DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
    DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
    DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
    utl_http.read_text(http_resp, soap_respond);
    dbms_output.put_line ('13');
    utl_http.end_response(http_resp);
    dbms_output.put_line ('14');
    resp := XMLType.createXML(soap_respond);
    dbms_output.put_line ('15');
    resp := resp.extract('/soap:Envelop/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    i:=0;
    dbms_output.put_line ('16');
    loop
    dbms_output.put_line(substr(soap_respond, 1 + i * 255, 250));
    i := i + 1;
    if (i * 250) > length(soap_respond) then
    exit;
    end if;
    end loop;
    exception
    when utl_http.request_failed then
    dbms_output.put_line('request failed: ' || utl_http.get_detailed_sqlerrm);
    when utl_http.http_server_error then
    dbms_output.put_line('server error: ' || utl_http.get_detailed_sqlerrm);
    when utl_http.http_client_error then
    dbms_output.put_line('client error: ' || utl_http.get_detailed_sqlerrm);
    when others then
    dbms_output.put_line(sqlerrm);
    end send_auth_response;
    3. Output when I run the send_auth_response procedure
    Connecting to the database cpdev.
    1
    2
    3
    4
    5
    5.5
    ORA-12560: TNS:protocol adapter error
    Process exited.
    Disconnecting from the database cpdev.
    Comments -
    The web service operation only has input message. The input message consists of a complex type as seen in WSDL.
    Questions -
    1. This is my first attempt in invoking a web service from pl/sql program. Is the code in SOAP body correct as mapped to the complex type in WSDL ?
    2. As seen from the dbms_out - the last message before ORA-12560 is 5.5, that means the call is erroring at following code line -
    http_req:= utl_http.begin_request ------ what am I doing wrong here ?
    3. The web service is SSL as seen from WSDLand needs a username/password for access - which is being performed by following code line -
    utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>'); ------- is that correct ?
    4. I am not using any proxy server - should I be using it ? When is it necessary to use proxy ?
    Appreciate any help.
    Thanx.

    Oracle is hosted by HOST A - this is where the pl/sql program resides.
    The Web Service being accessed by pl/sql program is hosted by HOST B and there are 4 firewalls in between.
    Oracle was not even able to establish connection to web services host.
    Escalated the issue with networking folks and they resolved the connectivity problem.
    Hope that helps.

  • Have Error invoking SSL web service using pl sql procedure

    Hi All,
    Please any one can tell where i am going wrong,in calling ssl soa web service from plsql procedure.
    Below steps i followed ssl configure in soa server
    1- For configuring ssl in soa 11g, i am going to weblogic console->environment-> servers-> soa_server1-> check ssl box of port 8002.
    2- restart the server.
    3- One process i devloped, deployed in em console, while trying to acces the service with 8002 port, i need to use https://servicepath.
    Is there is any problem in the above approch for configuring ssl in soa server.
    Now coming to the procedure part, in below i given the deatails
    DECLARE
    HTTP_REQ UTL_HTTP.REQ;
    HTTP_RESP UTL_HTTP.RESP;
    URL_TEXT VARCHAR2(32767);
    lv_process_xml_body varchar2(4000);
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    lv_process_xml_body:='<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Body xmlns:ns1="http://xmlns.oracle.com/SOA_RND_jws/Sample/DemoBPELProcess">
              <ns1:process>
                   <ns1:input></ns1:input>
    </ns1:process>
    </soap:Body>
    </soap:Envelope>';
    UTL_HTTP.SET_WALLET('file:/db/oracle/app/oradb/product/11.2.0/dbhome_1/bin/client', 'abcd123');
    HTTP_REQ := UTL_HTTP.BEGIN_REQUEST('https://172.28.40.20:8002/soa-infra/services/Client/Sample/demobpelprocess_client_ep', 'POST' , 'HTTP/1.0');
    UTL_HTTP.set_header(http_req, 'Content-Type', 'text/xml');
    UTL_HTTP.set_header(http_req, 'Content-Length', LENGTH(lv_process_xml_body));
    UTL_HTTP.SET_HEADER(HTTP_REQ, 'SOAPAction', 'process');
    UTL_HTTP.write_text(http_req, lv_process_xml_body);
    HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);
    UTL_HTTP.END_RESPONSE(HTTP_RESP);
    dbms_output.put_line('success');
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    END;
    But i am getting the error, unable to open the file
    Regarding certificate i have taken from the browser while running the above soa service in browser with 8002 port.
    Please let me know where i am doing wrong...
    Please if some one knows about steps ...... to do it to work
    Its urgent please help me out on this
    Thanks
    Dillip
    Edited by: 903915 on Dec 21, 2011 9:51 PM
    Edited by: 903915 on Dec 21, 2011 10:11 PM

    Oracle is hosted by HOST A - this is where the pl/sql program resides.
    The Web Service being accessed by pl/sql program is hosted by HOST B and there are 4 firewalls in between.
    Oracle was not even able to establish connection to web services host.
    Escalated the issue with networking folks and they resolved the connectivity problem.
    Hope that helps.

  • How to invoke a Web Service from PL/SQL with Complex Type as  input.

    Hello,
    I am trying to invoke a web service from PL/SQL using the UTL_DBWS package.
    The web service expects a complex type as input (defined below):
    <xs:complexType name="MsgType">
    <xs:sequence>
    <xs:element name="sender" type="xs:string"/>
    <xs:element name="messageId" type="xs:string"/>
    <xs:element name="messageType" type="xs:string"/>
    <xs:element name="dateSent" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    How to construct input to this in PL/SQL Procedure?
    Has any body tried this before?
    An exmaple will be helpful.
    Thanks

    Dear,
    I have read your article, it is useful for me. But I cannot Apply to my case. Please kindly help me. Thank you.
    When running, the error occurs:
    1:39:31 Execution failed: ORA-20000: soapenv:Server.userException - org.xml.sax.SAXParseException: Attribute name &quot;password&quot; associated with an element type &quot;user&quot; must be followed by the &apos; = &apos; character.
    My webservice Url: http://abc.com.vn:81/axis/ABC_WS_TEST.jws?wsdl
    I make PL/SQL (similiar as your example)
    FUNCTION INVOKESENDMT
    RETURN VARCHAR2
    AS
    l_request soap_api.t_request;
    l_response soap_api.t_response;
    l_return VARCHAR2(32767);
    l_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_method VARCHAR2(32767);
    l_soap_action VARCHAR2(32767);
    l_result_name VARCHAR2(32767);
    p_zipcode VARCHAR2(160);
    BEGIN
    --p_zipcode:='''TEST'' ; ''TEST'';''84912187098'';''84912187098'';''0'';''8118'';''1'';''000001'';''ThuNghiem'';''''';
    p_zipcode:='TEST';
    -- Set proxy details if no direct net connection.
    --UTL_HTTP.set_proxy('myproxy:4480', NULL);
    --UTL_HTTP.set_persistent_conn_support(TRUE);
    -- Set proxy authentication if necessary.
    --soap_api.set_proxy_authentication(p_username => 'TEST',
    -- p_password => 'TEST');
    l_url := 'http://abc.com.vn:81/axis/ABC_WS_TEST.jws';
    l_namespace := 'xmlns="' || l_url || '"';
    l_method := 'sendMT';
    l_soap_action := l_url || '#sendMT';
    l_result_name := 'sendMTResponse';
    l_request := soap_api.new_request(p_method => l_method,
    p_namespace => l_namespace);
    soap_api.add_parameter(p_request => l_request,
    p_name => 'user password sender receiver chargedflag servicenumber messagetype messageid textcontent binarycontent',
    p_type => 'xsd:string',
    p_value => p_zipcode);
    l_response := soap_api.invoke(p_request => l_request,
    p_url => l_url,
    p_action => l_soap_action);
    l_return := soap_api.get_return_value(p_response => l_response,
    p_name => l_result_name,
    p_namespace => l_namespace);
    RETURN l_return;
    END;

  • How to invoke a web service using https

    Hi,
    I have a few security related questions surrounding BPEL process manager.
    1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
    2. If not, what needs to be done to enable accessing a https based web service?
    3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
    Thanks,
    Pranav

    1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
    We currently don't have support for HTTP over SSl. We are working on it to include this functionality in near future.
    2. If not, what needs to be done to enable accessing a https based web service?
    I am not sure it is possible with current product offering. I will confirm it after discussing with our concerned development group. There is some work going to integrate with Oblix security mechanism [recently acquired by Oracle].
    3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
    This will be easier to do if we can use Oblix along with BPEL PM. Could you please let us know more about your application so that we can provide you the customized solution till it's part of the product. You can send this query to [email protected] so that our product management team can give you more detailed roadmap regarding this.
    HTH.
    Thanks,
    Rakesh

  • Invoking a Web Service using XI 2.0

    Hi all,
    I am attempting to create a scenario where an SAP application invokes a web service through XI 2.0.
    I have created an ABAP proxy to allow my ABAP to start the call process and have set up the message interfaces within the Integration Directory.
    I want XI to receive a call from this proxy and then act as the client to an existing Web Service.. calling it and bringing back a response... but it doesn't look like I can import the existing WSDL as a I would have expected.
    So... instead I have exported the Message Interface for the "out of XI" portion of the interface as a WSDL and have asked the Web Service provider to amend their service according to this XI generated WSDL.
    My difficulty now is how to use the SOAP adapter. Within the Integration Directory I presumably need to define the endpoint with XI Connectivity but I am not sure how to fill in the URL address of the SOAP adapter...
    Any help on how to configure the actual SOAP adapter to fulfill this requirement would be great too.
    I have looked around the boards to see if I could work this out from previous posts but without success so far.
    It's a synchronous scenario and basically should look like...
    ABAP Proxy->XI->SOAP Adapter->Web Service->XI->ABAP Proxy
    Many thanks,
    Gordon

    Hi Gordon,
    here is an example for SOAP-Adapter config:
    # Bubble adapter java class
    classname=com.sap.aii.messaging.adapter.ModuleBubble
    # Sets the bubble module helper that can instantiate your bubble bag
    Bubble.Helper=com.sap.aii.messaging.adapter.ModuleBubbleHelperXMBWSImpl
    ###### Part 0 (FromWS and ToWS) : common part ######
    # Keeps the XMB headers in web service messages
    XMBWS.KeepHeaders=false
    # Encodes the xmb headers into a special HTTP header string x-xmb_ws_encoded
    XMBWS.UseEncoded=false
    # The target URL for the web service, to which the adapter sends web service messages.
    # The address is part of the WSDL
    XMBWS.TargetURL=http://www.extensio.com:8080/ExtensioInfoServer/servlet/rpcrouter
    # Proxy configuration from SAP
    XMBWS.proxyHost=PrOxY
    XMBWS.proxyPort=8080
    # The port and path where the adapter waits for XMB messages from clients.
    XMBWS.XMBPort=8400
    XMBWS.XMBPath=/soap/stockquote
    # The default SOAPAction HTTP request header to the web Service server
    # The SoapAction is part of the WSDL
    XMBWS.DefaultSOAPAction=
    Of course you have to set URL, proxy and SOAP-action to your belongings.
    You define the endpoint as:
    "http://<Adapter-Server>:<XMBPort><XMBPath>"
    in this example:
    "http://localhost:8400/soap/stockquote"
    Stefan

  • Call MTOM web service using pl/sql (utl_http)

    Hi All,
    Is anyone able to call a MTOM web service using utl_http from pl/sql ?
    A typical request looks like this:
    --uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>......</s:Body></s:Envelope>
    uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1
    A microsoft C# tool is provided to generate some requests and using fiddler I can see the content type is in the header as well as in the request. In the requests it doesn't contain the UID. Connection is set to keep-alive, is that possible using pl/sql ?
    The part that builds the header looks like:
    l_http_request := UTL_HTTP.begin_request(url => 'http://' || l_host_name || ':' || l_port || '/CRUDService.svc', method => 'POST', http_version => 'HTTP/1.1');
    UTL_HTTP.set_header(l_http_request, 'Host', l_host_name || ':' || l_port);
    UTL_HTTP.set_header(l_http_request, 'SOAPAction', '"action"');
    UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_string_request));
    UTL_HTTP.set_header(l_http_request, 'Content-ID', '<http://tempuri.org/0>');
    UTL_HTTP.set_header(l_http_request, 'Content-Transfer-Encoding', '8bit');
    UTL_HTTP.set_header(l_http_request, 'Content-Type', 'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:fd1fbed8-7042-4673-a304-becc1ffb037f+id=1";start-info="text/xml"');
    I've played with the request by adding or removing information, the http response is (400) "Bad Request - Invalid Header", so should be somewhere in the header? Anyone ideas?
    Kind regards,
    Michiel

    HI Michiel
    I am also trying to achieve something similar to that. I am trying to call a web service that sends an xml attachment over MTOM? Kindly, let me know if this was achievable from your end? I mean how did the issue got resolved.
    thanks
    vijay

  • 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

  • REST web service using PL/SQL

    Hello,
    I am trying to learn how a REST web service can be created using PL/SQL and how it can be used.
    I am using this as a starting point.
    Also, I am using the pre-build "Oracle Developer Days" setup for this (which means I have 11.2 version of oracle database installed).
    I have done all the steps mentioned in the above blog post but when I try to access the web service in browser, I get the
    "404 Not found - The requested URL /devtest/rest-demo/departments was not found on this server" message.
    Here is my DAD setup :
    SQL> declare
      l_name dbms_epg.varchar2_table;
      l_value dbms_epg.varchar2_table;
    begin
      DBMS_EPG.GET_ALL_DAD_ATTRIBUTES (dad_name => 'devtest', attr_names => l_name, attr_values => l_value);
      for i in l_name.first..l_name.last
      loop
        dbms_output.put_line(l_name(i)||' => '||l_value(i));
      end loop;
    end;
      2    3    4    5    6    7    8    9   10   11  database-username => HR1
    path-alias => rest-demo
    path-alias-procedure => rest_handler.handle_requestI have created the package and procedures as mentioned in that blog post
    SQL> desc hr1.rest_handler
    PROCEDURE HANDLE_REQUEST
    Argument Name                  Type                    In/Out Default?
    P_PATH                         VARCHAR2                INHave I missed something ?
    Any help will be appreciated.
    Thanks

    Probably an security issue, I guess. The article (http://ora-00001.blogspot.com/2009/07/creating-rest-web-service-with-plsql.html) mentioned is a very good one (if not only I like what the site has become in recent years - much good tips and articles). As an alternative for your problems, have a look at the explaination of how Tim Hall has done it...
    http://www.oracle-base.com/articles/misc/XMLOverHTTP.php
    Edited by: Marco Gralike on Nov 21, 2011 11:31 AM

  • Help Urgent : Invoking SMS Web Services Using ABAP FM HTTP_POST

    Dear Gurus,
    Our client requirement is in such a way that ,
    They want to invoke web services for sending SMS through ABAP program.
    Please suggest the way .
    I am using FM HTTP_POST in order to call the URL for web service for SMS.
    My URL is as follows,
    'http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?&mobile_no=9987536748&message=HI' .
    and my code is as follows,
    ========================================================================
    report ztesturl.
    data : begin of t_request_body occurs 0 ,
            body(1025),
            end of t_request_body.
    data : begin of t_request_header occurs 0 ,
            body(1025),
            end of t_request_header.
    data : str(20) value '9987536748' ,int(20) value 'text',uri(460),
           status_code(100),
           status_text(100),
           len type i.
    data : begin of t_response_body occurs 0 ,
            body(1025),
            end of t_response_body.
    data : begin of t_response_header occurs 0 ,
            body(1025),
            end of t_response_header.
    uri = 'http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?mobile_no=9987536748&message=HI' .
    concatenate 'mobile_no=' str into t_request_body-body.
    append t_request_body.
    concatenate 'message=' int into t_request_body-body.
    append t_request_body.
    move: url to t_request_header-body.
    append t_request_header.
    call function 'HTTP_POST'
      exporting
        absolute_uri                = uri
        request_entity_body_length  = 300
        blankstocrlf              = 'X'
        proxy                       = 'IP Address:Port'                  ===> Same as Interner Tools -> Connection
        proxy_user               = EMAIL ID                            ===> Which i am using Userid for Internet
        proxy_password       = 'password123'
      importing
        status_code             = status_code
        status_text              = status_text
        response_entity_body_length = len
      tables
        request_entity_body         = t_request_body
        request_headers             = t_request_header
        response_entity_body        = t_response_body
        response_headers            = t_response_header.
    I am getting Following log in t_response_body
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2 3 5                                             
    ERROR                                             
    6                                             
    Cache Accesss
    7                                             
    8                                             
    9 While trying to retrieve the URL: 10 http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?
    11
    12 The following error was encountered:
    13                              
    14
    15 16 Cache Access Denied. 17 18
    19
    20 21
    Sorry, you are not currently allowed to request: 22
        http://IP ADDRESS :PORT /invoke/crm_sms/send_crm_sms?
    23 from this cache until you have authenticated yourself. 24
    25 26
    27 You need to use Netscape version 2.0 or greater, or Microsoft Internet 28 Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please 29 contact the cache administrator if you have 30 difficulties authenticating yourself or
    31 change your default password.
    32                    
    33
    34                                             
    35                                             
    36 Generated Thu, 26 Jun 2008 11:18:54 GMT by ProxyServer.VakolaProxy (Squid/2.4.STABLE7) 37                                                                                
    Thanks in advance.
    With Regards,
    Rajesh C

    slen = strlen( user ).
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field user        id 'KEY'         field key
      id 'SCR'         field 'X'         id 'DESTINATION' field user
      id 'DSTLEN'      field slen.
    slen = strlen( password ).
    call 'AB_RFC_X_SCRAMBLE_STRING'
      id 'SOURCE'      field password    id 'KEY'         field key
      id 'SCR'         field 'X'         id 'DESTINATION' field password
      id 'DSTLEN'      field slen.

  • Java web service using pl/sql DB package - JDev 10.1.3.1

    Hi All,
    I wanted to create a java web service, instead of a pl/sql web service, that calls a pl/sql package in my DB.
    Jdev (10.1.3.1) can generate java code for my pl/sql package. But the generated code can't be used with a java web service. I've found that the generated code uses types that can't be serialized for a webservice (ie. java.sql.Timestamp).
    Does anyone know of a work around?
    Thanks!

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    It's pretty well documented within Jdev also.
    Thanks, Rob

  • Invoking a web Service using Service Control

    Hi All,
    I am getting the below exception when I am trying to execute a process containing a simple Service Control generated using a WSDL file.
    Any thoughts/solutions is appreciated.
    Exception in getPendingOrdersForApprover
    com.bea.control.ServiceControlException: Unexpected exception raised invoking getPendingOrdersForApprover on control com.verisign.controls.MSL_ORDERSoapServiceControl. Use getCause() to see the root cause.[java.rmi.RemoteException: Failed to invoke; nested exception is:
        weblogic.wsee.handler.InvocationException: [Client CodecHandler]Failed to decode]
    Caused by: java.rmi.RemoteException: Failed to invoke; nested exception is:
    weblogic.wsee.handler.InvocationException: [Client CodecHandler]Failed to decode
    ... 38 more
    Caused by: weblogic.wsee.handler.InvocationException: [Client CodecHandler]Failed to decode
    ... 44 more
    Caused by: weblogic.wsee.codec.CodecException: Found more elements in the soap envelope than required by WSDL:{ld:Physical/MSL_ORDER}MSL_ORDER. WSDL Message for this operation is: (WsdlBindingMessage@20764897 <name=> <type=1> <extensionList=(NameValueList@29534392 <list[]{(SoapBody@13827654 <encodingStyle=null> <use=literal> <namespace=null> <parts=null>)}>)>)
    ... 53 more
    at com.bea.control.servicecontrol.impl.ServiceControlImpl.invoke(ServiceControlImpl.java:678)
    at com.verisign.controls.MSL_ORDERSoapServiceControlBean.getPendingOrdersForApprover(MSL_ORDERSoapServiceControlBean.java:323)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.bea.wli.knex.runtime.jcs.container.JcsProxy.invokeBeehiveControl(JcsProxy.java:666)
    at com.bea.wli.knex.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:446)
    at $Proxy71.getPendingOrdersForApprover(Unknown Source)
    at com.verisign.processes.WebServiceInvokeProcess.mSL_ORDERSoapServiceControlGetPendingOrdersForApprover(WebServiceInvokeProcess.jws:48)
    Thanks,
    Ram

    I solved the problem :-)
    it happened due to JAVA_HOME env var. It has to point to jdk that comes along with wl812. mine was pointing to sun jdk 1.4.2. However, this is a bug, because, for wlwlbuild task , i was setting the proper bea java home, still it was failing due to system java_home var. And i did not face this problem with WL813. After facing lot of issues with 812, now i feel, 812 is not a stable production version.
    Anyways, now the prob;em is solved.

  • Invoking RESTful Web Service using APEX_WEB_SERVICE.MAKE_REST_REQUEST

    Hello All,
    APEX Version: 4.0.2.00.07
    DB: Oracle 11G R2
    WebServer: EPG
    Wallet info has been configured at APEX Instance Level, so APEX can access SSL enabled sites.
    When I run following code in page process, to make SOAP request to our intranet JIRA instance, everything just works fine.
    DECLARE
         l_envelope CLOB;
         l_xml XMLTYPE;
         lv_faultcode VARCHAR2(4000);
         lv_faultstring VARCHAR2(4000);     
    BEGIN
         l_envelope := '<?xml version="1.0" encoding="UTF-8"?>'
      ||'<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" xmlns:m0="http://beans.soap.rpc.jira.atlassian.com">'
      ||'<SOAP-ENV:Body>'
      ||'  <m:getIssuesFromFilterWithLimit xmlns:m="http://soap.rpc.jira.atlassian.com" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
      ||'            <in0>'||:F_JIRA_TOKEN||'</in0>'
      ||'         <in1>'||HTF.escape_sc(:P4_IN1)||'</in1>'
      ||'         <in2>'||HTF.escape_sc(:P4_IN2)||'</in2>'
      ||'         <in3>'||HTF.escape_sc(:P4_IN3)||'</in3>'     
      ||'  </m:getIssuesFromFilterWithLimit>'
      ||'  </SOAP-ENV:Body>'
         ||'</SOAP-ENV:Envelope>';
         l_xml := APEX_WEB_SERVICE.MAKE_REQUEST(
                                  p_url => 'https://jira.xyz.com/tracker/rpc/soap/jirasoapservice-v2',
                                  p_action => 'https://jira.xyz.com/tracker/rpc/soap/jirasoapservice-v2/getIssuesFromFilterWithLimit',
                                  p_envelope => l_envelope
    END;However If i'm calling a RESTful webserivce using "apex_web_service" API then I always end-up with following error message.
    The webservice was unreachable because either the URL you supplied was invalid, your environment requires a valid proxy server address for HTTP requests, or a wallet needs to be configured for HTTPS requests.Code (RESTful call)
    DECLARE
         lc_response CLOB;
    BEGIN     
         apex_web_service.g_request_headers(1).name := 'Authorization';
         apex_web_service.g_request_headers(1).value := 'Basic '||:F_JIRA_TOKEN_REST;
         lc_response:= APEX_WEB_SERVICE.MAKE_REST_REQUEST(
                                                                     p_url => 'https://jira.xyz.com/tracker/rest/api/2.0.alpha1/search?jql=assignee=John&startAt=1&maxResults=5',
                                                                     p_http_method => 'GET'
    END;As you can see, both requests are made to same server. However during SOAP request I'm not getting any error, but during RESTful request I'm getting error. Can anyone tell me what could be wrong?
    Best Regards,
    Hari

    Hi Hari,
    this was bug 16212066 - apex_web_service make_rest_request doesn't use instance wallet if not specified
    which will be fixed in APEX 4.2.2.
    As a workaround you can specify the p_wallet_path and p_wallet_pwd parameter when calling apex_web_service.make_rest_request.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Invoking a web service not created using oracle web service lib

    Hi All,
    I have a need to invoke my web service from oracle sql command. My web service not created using oracle web service library, but it is created using axis c++ libraries. Is it possible to do so,
    Thanks in advance,
    Regards,
    Monica

    In order to call out from the database process, is SQL (or PL/SQL) you need to generate some client code, that understand the details about the specific of the service you want to invoke and can produce the correct SOAP request. Once this proxy is uploaded in the Database, you can use it.
    There is a set of Database Web services samples that should help you get started. You can also take a look at the developer's guide - see Developing a Web Service Client in the Database.
    Hope it answers your question.
    --eric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to invoke a web service asynchronously using ws-addressing model?

    Hi Gurus,
    We are invoking an external web service asynchronously using Oracle Work Flow Business events using the following mechanism -
    1)Created a web service invoker event to invoke the web service.
    2)Created a subscription that invokes the web service (provided the wsdl address, operation info).
    3)Defined a subscription parameter WFBES_CALLBACK_EVENT with value pointing to a recieve event.
    4)Created a receive event(parameter value for WFBES_CALLBACK_EVENT) and a subscription that directs the response to a custom PL/SQL function to process response.
    so far so good. We were able to invoke the web service and get and process the response.
    Problem: The external web service can take upto 10 hrs to process the request. A time out of 2 hrs is set on the server hosting the external web service. So when the external web service takes more than 2 hrs to process the request and it times out and we get the following error on EBS side -
    'l_error_message:oracle.apps.fnd.wf.bes.InvokerException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html; charset=iso-8859-1'
    Now the external web service providers are suggesting that we are not calling their web service asynchronously and we should use ws-addressing model to do so.
    Is there a way to invoke this web service using ws-addressing model using business events or from PL/SQL or OA middle-tier?
    Regards,
    Sunil
    CMRO Development.
    I am providing here the WSDL of the external web service -
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://service.sdk.webservices.enigma.com" 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:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax21="http://service.sdk.webservices.enigma.com/xsd" xmlns:ns="http://service.sdk.webservices.enigma.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com/xsd" xmlns:ax22="http://service.sdk.webservices.enigma.com">
    <xs:import namespace="http://service.sdk.webservices.enigma.com"/>
    <xs:complexType name="JCGWebServicesException">
    <xs:complexContent>
    <xs:extension base="ax22:Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="JCGServiceReply">
    <xs:sequence>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="pdfStatus" nillable="true" type="ax21:PdfStatus"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="PdfStatus">
    <xs:sequence>
    <xs:element minOccurs="0" name="jobCardID" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="pdfPath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.sdk.webservices.enigma.com" xmlns:ax23="http://service.sdk.webservices.enigma.com/xsd">
    <xs:import namespace="http://service.sdk.webservices.enigma.com/xsd"/>
    <xs:complexType name="Exception">
    <xs:sequence>
    <xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="JCGWebServicesException">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="JCGWebServicesException" nillable="true" type="ax21:JCGWebServicesException"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCard">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="a_WorkpackageFilePath" nillable="true" type="xs:string"/>
    <xs:element minOccurs="0" name="a_userName" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="runJobCardResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="ax21:JCGServiceReply"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="JCGWebServicesException">
    <wsdl:part name="parameters" element="ns:JCGWebServicesException">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardResponse">
    <wsdl:part name="parameters" element="ns:runJobCardResponse">
    </wsdl:part>
    </wsdl:message>
    <wsdl:message name="runJobCardRequest">
    <wsdl:part name="parameters" element="ns:runJobCard">
    </wsdl:part>
    </wsdl:message>
    <wsdl:portType name="JCGServicePortType">
    <wsdl:operation name="runJobCard">
    <wsdl:input message="ns:runJobCardRequest" wsaw:Action="urn:runJobCard">
    </wsdl:input>
    <wsdl:output message="ns:runJobCardResponse" wsaw:Action="urn:runJobCardResponse">
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException" message="ns:JCGWebServicesException" wsaw:Action="urn:runJobCardJCGWebServicesException">
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="JCGServiceSoap11Binding" type="ns:JCGServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="JCGServiceSoap12Binding" type="ns:JCGServicePortType">
    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="runJobCard">
    <soap12:operation soapAction="urn:runJobCard" style="document"/>
    <wsdl:input>
    <soap12:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="JCGWebServicesException">
    <soap12:fault name="JCGWebServicesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="JCGService">
    <wsdl:port name="JCGServiceHttpSoap12Endpoint" binding="ns:JCGServiceSoap12Binding">
    <soap12:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    <wsdl:port name="JCGServiceHttpSoap11Endpoint" binding="ns:JCGServiceSoap11Binding">
    <soap:address location="http://localhost:8080/JCG/services/JCGService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: sikumar on Jun 22, 2010 1:50 PM

    Bharat,
    You dont need a Business Event setup to invoke a BPEL process from PL/SQL unless you have a special case and you need to process the response from the BPEL process in a separate thread (or in background)..
    For a straight call to BPEL process from PL/SQL, here is a sample script -
    function "MYTEST0" return varchar2 AS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    helpStr varchar2(30000);
    BEGIN
    soap_request:= '<?xml version = ''1.0'' encoding = ''UTF-8''?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="
    http://xmlns.oracle.com/TestWS">
    <env:Body>
    <ns0:TestWSProcessRequest>
    <ns0:input>abc</ns0:input>
    </ns0:TestWSProcessRequest>
    </env:Body>
    </env:Envelope>
    /* the BPEL process name is TestWS */
    http_req:= utl_http.begin_request
    ( 'http://hostname:7777/orabpel/default/TestWS/1.0'
    , 'POST'
    , 'HTTP/1.1'
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', 'process');
    utl_http.write_text(http_req, soap_request);
    http_resp:= utl_http.get_response(http_req);
    utl_http.read_text(http_resp, soap_respond);
    utl_http.end_response(http_resp);
    resp:= XMLType.createXML(soap_respond);
    resp:= resp.extract('/soap:Envelope/soap:Body/child::node()',
    'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
    helpStr := '';
    i:=0;
    loop
    helpStr := helpStr || substr(soap_respond,1+ i*255,250);
    i:= i+1;
    if i*250> length(soap_respond)
    then
    exit;
    end if;
    end loop;
    return helpStr;
    END;

Maybe you are looking for

  • Finder "blinks" when I try to install software, various other weirdnesses

    If anyone can help me, I'd really appreciate it! I'm operating under a significant constraint, which is that I don't have the install disks for the OS... This issue is most troubling right now because I want to install an updated Flash player. So I d

  • Error in Downloading iTunes 9 on G5

    When downloading I get a message at the bottom of the Safari window that states an error occurred and to go to Window>Activity. iTunes continues to download. When I check Window>Activity, it states, "Frame Rate Interrupted." When iTunes completes the

  • Lightroom 5 to edit in Photoshop CS-5

    Whn I edit my photos in Lightroom 5 and after i am done I send the edited image to Photoshop SC-5 for further adjustments, the previous Lightroom adjustments are NOT showing up in Photoshop SC-5 . Why? With other words the Lightroom edit is not taken

  • Pages not loading correctly anymore

    Running firefox 7.01 on win7 64 bit. I just recently got a popup asking me whether I would like to see additional information from when I click on a link (on my nas) or not. I selected no. However, now I do not get any confirmation dialogs anymore an

  • Determining the Listener serving the DB from SQL

    Oracle Version: 10.2, 11.1, 11.2 OS : Solaris 5.10 From within the DB (ie. querying Data dict or V$ views, etc..) , is there any way we could determine the listener name which is serving the DB ? Edited by: J.Kiechle on Aug 16, 2011 5:14 AM Changed t