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

Similar Messages

  • 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

  • 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.

  • 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

  • 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.

  • 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.

  • 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.

  • 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

  • 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;

  • Invoking web service using Weblogic Workshop (JCX)

    Invoking web service using Weblogic Workshop
    Posted: 5 Jan 2005 23:31 PM Reply
    Hi,
    I have WSDL from which I have generated a web service control (.jcx) using Weblogic Workshop.
    I need to write a client which will invoke the web service using the control.
    Can someone help me on how to go about this ?
    BTW .. I also tried the clientgen route and tried to generated the proxy jar from the WSDL but wasn't successful because of a existing clientgen bug.
    Refer bug

    Hi,
    if the consumer of the webservice is a control-aware consumer ( pageflow, control, process ) simply drag the control to this consumer and the control variable is ready for use.
    if the consumer is not control-aware, try to generate a proxy using eg. the axis tool, or handcode your proxy class.
    links :
    how to use webservice control
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/conGettingStartedWithJavaControls.html
    axis
    http://ws.apache.org/axis/
    - Anders M.
    - Anders M.

  • Invoking a web service from a java code

    Hello
    I created a simple Web service using JDevlper. It contains two methods
    1) getInf int () {
    return inf;}
    2) void setInf (int a) {
    inf = a;}
    I have deployed it on Oracle Application server. By inserting the address in a browser, I tried both methods and it works correctly.
    Here I am looking how to invoke this web service using a java client and use the method setInf (5 ) / * for example * /.
    I search but I have not found an answer that works :(. I hope you could help me to solve this problem.
    Thank you in advance

    Because you weren't told what to get, perhaps you already have it eh?
    What you want to read up about is JAX-WS, which is the webservice API bundled by default with your JDK (Java 6 and up). You'll find the wsimport tool in the bin directory of your JDK. I recommend you explore that directory and read up about all the executables you can find there, to be more prepared in the future. Know the tools you work with and all that. Most tools have a manual on this website:
    http://www.oracle.com/technetwork/java/javase/tech/index.html
    (under tools and utilities). Not wsimport, that is part of the jax-ws documentation. Better you look for jax-ws tutorials using Google, it will be quicker.

  • Calling/invoking a web service

    Hi Everybody,
    I am in some serious trouble and need some help.
    Here is my situation :-
    I have a web service hosted in oracle application server.
    I have an xml file that is to be used as input to the web service.
    This is what I require :-
    Is there a way to invoke the web service using command line by just passing the xml and /or its wsdl as input?
    If there is no way to do so, how do I write a simple J2SE client that invokes this web service using my input xml file?
    In fact, i have approximately 1000 or more xml files that need to be invoked on this web service. So, i really need to automate the process. It would be great if someone could suggest a command line invocation method, so that i can write a simple unix script to automate the invocation of the web service for each of my xml files.
    If you have any other idea, do tell, because i am relatively inexperienced in web services and have no clue as to what can be done.
    Thanks in advance.
    Ryan Sukale

    Hi,
    Write a simple java class and right click and use create j2ee web service option run the wizard accepting the default's....after that under the resources folder in Jdev u find a .deploy file deploy on the application server...get the wsdl and consume it in the BPEL process.

  • Dynamically invoking a web service.

    How can i dynamically invoke a web service using jax-ws proxy?

    We will need more information on your use case.
    Typically, a JAX-WS proxy refers to the Java Proxy object that implements the interface for your port. If this is what you have then you could dynamically invoke it using reflection.
    However, if you really want to do dynamic invocation then you should look at the Dispatch interface. You can get a Dispatch instance from your Service object and use this to issue raw requests using SOAPMessage or streams. This will require that your application have expertise in generating SOAP requests from the WSDL of the target endpoint, but this is what is typically done in enterprise service bus type products.
    If that's not your use case, let us know.

  • Using SAML policy while invoking a web service

    I have to invoke a webservice which is secured using the policy wss10_saml_token_client_policy.
    In order to achieve the above i have creates a stub using JAX-WS and while invoking the web service I pass the policy as a SecurityFeature.Code snippet given below:
    SecurityPolicyFeature[] securityFeatures = new SecurityPolicyFeature[] { new SecurityPolicyFeature(
                        getValueFromPropertyFile("oracle/wss10_saml_token_client_policy"))};
    SomeStub stub =(UserManagementPortTypev1_0)SomeService.getPort("...","....",securityFeatures );
    Once deployed in weblogic and when i invoke the service, the soap request formed is correct. It creates for me the soap header with the correct security nodes. The header formed is like below:
    <S:Header>
    <work:WorkContext xmlns:work="http://oracle.com/weblogic/soap/workarea/">rO0ABXoAAAJDADBvcmFjbGUuZG1zLmNvbnRleHQuaW50ZXJuYWwud2xzLldMU0NvbnRleHRGYW1pbHkAAAFPAAAAKXdlYmxvZ2ljLndvcmthcmVhLlNlcmlhbGl6YWJsZVdvcmtDb250ZXh0AAABSaztAAVzcgAxd2VibG9naWMud29ya2FyZWEuU2VyaWFsaXphYmxlV29ya0NvbnRleHQkQ2Fycmllcv1CAh9z5wpPAwACWgAHbXV0YWJsZUwADHNlcmlhbGl6YWJsZXQAFkxqYXZhL2lvL1NlcmlhbGl6YWJsZTt4cHcEAAAAAXNyAEFvcmFjbGUuZG1zLmNvbnRleHQuaW50ZXJuYWwud2xzLldMU0NvbnRleHRGYW1pbHkkU2VyaWFsaXphYmxlSW1wbAAAAAAAAAAAAwABTAARbVdMU0NvbnRleHRGYW1pbHl0ADJMb3JhY2xlL2Rtcy9jb250ZXh0L2ludGVybmFsL3dscy9XTFNDb250ZXh0RmFtaWx5O3hwdykAJzEuMDAwMEl6T0lYQ0swam9PTE1pcDJpZTFEbUNMdjAwMDAwMjt2MHh3AQF4ACZ3ZWJsb2dpYy5kaWFnbm9zdGljcy5EaWFnbm9zdGljQ29udGV4dAAAAX8AAAAyd2VibG9naWMuZGlhZ25vc3RpY3MuY29udGV4dC5EaWFnbm9zdGljQ29udGV4dEltcGwAAAAiMDAwMEl6T0lYQ0swam9PTE1pcDJpZTFEbUNMdjAwMDAwMgAAAAAAAAAAAAAA</work:WorkContext>
    <wsse:Security S:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <saml:Assertion AssertionID="SAML-L0r20MS5CV0y7B6zHnGX5w22" IssueInstant="2011-05-10T05:03:49Z" Issuer="www.oracle.com" MajorVersion="1" MinorVersion="1" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
    <saml:Conditions NotBefore="2011-05-10T05:03:49Z" NotOnOrAfter="2011-05-10T05:08:49Z"/>
    <saml:AuthenticationStatement AuthenticationInstant="2011-05-10T05:03:49Z" AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
    <saml:Subject>
    *<saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">anonymous</saml:NameIdentifier>* <saml:SubjectConfirmation>
    <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</saml:ConfirmationMethod>
    </saml:SubjectConfirmation>
    </saml:Subject>
    </saml:AuthenticationStatement>
    </saml:Assertion>
    </wsse:Security>
    </S:Header>
    The node NameIdentifier is supposed to be populated with the logged in user id, which will be picked up from JAAS principal.
    Now I am invoking the service hosted in weblogic from outside using JSON protocol, I do not have a portal ready to invoke the service.
    My question is, is there any way in which i can replicate/ simulate the JAAS principal such that the nameidentifier is populated even when invoked from outside. THis is a requirement from testing perspective.

    Hi,
    Thanx it is working now.
    BTW can you give me some urls with info of this kind of setting which i need to do for other kind of integarions in J2EE platform.Sorry if i am asking too much as i am a starter in this technology.

Maybe you are looking for

  • Payment advices through F110

    Hi All, Reg: Payment advices, I have the below doubt. In FBZP, we have Paying company code-->Forms. Here we can assign a SAP script.This as the help text shows, is meant for Payment advice. In F110, in Printout/data medium in lists, we have the optio

  • Variant of vmk1 with payment description

    I would like to run vmk1 in order to check my sales order which are blocked due to credit limit or to past overdue invoices... But in vmk1 I would like to see some additional fields: 1) the description of the payment term of the sales order 2) the he

  • User exit for incoming invoice - MIRO/MB60

    Hi, Can anybody suggest me the user exit to set the payment block during the creation of incoming invoice document through MIRO(With PO reference) / FB60 (With out PO reference). Kindly dont run the program and send the list of the exists. Thanks Sur

  • Using JNDI Provider for Oracle JMS Queue

    Hello, I created a JMS Queue in Oracle 9.2.0.1 and would like a Java client to receive events from the Queue. I am not running Oracle9iAS. I have access to WebLogic server 7.0 which is also a JNDI provider. Is there a sample code that shows the steps

  • Doing background processing in a servlet

    Hello folks I'm new here, I wonder if someone can give me an advice in an architecture problem I encountered. This text looks long, but the problem is quite simple � how to allow a servlet to do something independent by the doXXXX() methods invocatio