Calling Web Service with SOAP header from BPEL

Hi,
I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
Below is the error message (copied from clipboard).
+<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
+<pSubnoin>+
+<insubno>12345678</insubno>+
+</pSubnoin>+
+</getsubinfoElement>+
+</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
start fault message:+
Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
*:end fault message*</summary>
+</part></bindingFault></fault></messages>+
As said, no header information is visible in the Invoke activity.
Please provide help for the above issue.
-MJ

Hello Patrick,
Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
+<assign name="Assign_Header">+
+<copy>+
+<from expression="'tkl12'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'tkl123'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'TKL'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+</assign>+
The expected input by the web service is as below with the header information highlighted.
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
+*<soap:Header>*+
+*<ns1:LOGIN_INFO>*+
+*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
+*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
+*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
+*</ns1:LOGIN_INFO>*+
+*</soap:Header>*+
+<soap:Body>+
+<ns1:substatusElement>+
+<ns1:pInparam>+
+<ns1:insubno>7674988</ns1:insubno>+
+</ns1:pInparam>+
+</ns1:substatusElement>+
+</soap:Body>+
+</soap:Envelope>+

Similar Messages

  • Calling web service with basic authentication from EP "unauthorized"

    Hello,
    I need to call a .NET web service with basic authentication on the IIS from my portal application (no http proxy between portal and IIS). But always I get the following exception:
    <b>com.sap.engine. services.webservices.jaxm.soap.accessor. NestedSOAPException:
    Problem in server response: [Unauthorized].</b>
    I'm using the following code for calling the .NET web service:
    <b>...</b><i>Licence_GetList lParameter = new Licence_GetList();
    lParameter.setStatus(CEnvironment.TransformStatus_WebService(search));
    ILicenceManager lLicMan = (ILicenceManager) PortalRuntime.getRuntimeResources().getService("LicenceManager");
    ILicenceManager lLicManSecure = lLicMan.getSecurisedServiceConnection(request.getUser());
    Licence_GetListResponse lGetListResponse = lLicManSecure.Licence_GetList(lParameter);</i><b>...</b>
    I've also configured a http system in the portal system landscape using the following parameters:
    <i>Authentication Method : Basic Authentication
    Authentication Type : Server
    User Mapping Type : admin,user</i>
    The user mapping is also personalized for this system!
    What's wrong? Please help! This is really urgent!
    Kind Regards
    Joerg Loechner

    Hello Renjith,
    here is a small cutout of my "portapp.xml";
    <services>
      <service alias="LicenceManager" name="LicenceManager">
        <service-config>
          <property name="className" value="de.camelotidpro.
                 pct.xi.scm.webservice.LicenceManager"/>
          <property name="startup" value="false"/>
          <property name="WebEnable" value="false"/>
          <property name="WebProxy" value="true"/>
          <property name="SecurityZone" value="de.camelotidpro.
                 pct.xi.scm.webservice.LicenceManager/
                   DefaultSecurity"/>
        </service-config>
        <service-profile>
          <property name="SystemAlias" value="LicMan_NET"/
        </service-profile>
      </service>
    </services>
    I'm using a http system created in the system landscape (alias LicMan_NET). But it seems that this system is not used by the web service call (No error, even if I delete this system!). The code used to call this web service can be found at the top of this threat...
    Regards
    Joerg Loechner

  • Invoking Web Service with PKI Authentication from BPEL process

    Hello --
    I am trying to test calling a Web service utilizing PKI-based authentication from BPEL running under the 10.1.2.0.2 Process Manager. When I access the service from a browser I am prompted for Username and Password the first time. When I attempt to access it from BPEL I receive this error:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
    Is it possible to access this service from BPEL in 10.1.2.0.2? How can I pass the service the required credentials?
    Thank you for your time,
    Paul Camann

    I've gotten past the original error by importing the security certificate of the Web service into my keystore/truststore. I'm also running the process on SOA 10.1.3.1.0. Now when I invoke the Web service from the BPEL process I get this error:
    exception on JaxRpc invoke: HTTP transport error:
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException:
    javax.xml.soap.SOAPException: Bad response: 403 Forbidden
    I've tried passing the credentials every way I can -- partner link properties, Oracle Web Services Manager, whatever -- and still get the same error. I would expect to see a 401 error for problems with credentials, not a 403.
    Any suggestions?
    Thanks for your time.
    Paul Camann

  • Generating Web Service with SOAP Header

    Hello,
    I have a WSDL for a web Service using document encoding and with a soap header.
    I generate a jws file using WL Workshop 81.SP4 but I always have this error message :
    ERROR: AjoutContactService.jws:13: The binding for AjoutContact does not declare one part.
    ERROR:      SUGGESTION: A document literal binding must have at most one part. Make sure you have a WSDL that declares just one part for each message with a document literal binding.
    The header is a recent adding on an existing Web Service, and I can't change the wsdl definition. I also need to use data contained by the header in conjunction with data in the body.
    Is it a limitation with workshop or a problem with with my binding file ?
    I give sample of my two wsdl files.
    Given wsdl file
         <wsdl:message name="inputAjoutContact">
              <wsdl:part name="body" element="xsdin:NouveauContact"/>
    <wsdl:part name="header" element="xsdinhead:EnTeteRequete"/>          
         </wsdl:message>
         <wsdl:message name="outputAjoutContact">
              <wsdl:part name="body" element="xsdout:StatutAjoutContact"/>
         </wsdl:message>
         <wsdl:message name="faultAjoutContact">
              <wsdl:part name="body" element="xsdfault:Exception"/>
         </wsdl:message>
         <wsdl:portType name="AjoutContactPortType">
              <wsdl:operation name="AjoutContact">
                   <wsdl:input name="ParametresEntree" message="tns:inputAjoutContact"/>
                   <wsdl:output name="ParametresSortie" message="tns:outputAjoutContact"/>
                   <wsdl:fault name="ParametresException" message="tns:faultAjoutContact"/>
              </wsdl:operation>
         </wsdl:portType>
    binding file
              <wsdl:operation name="AjoutContact">
                   <soap:operation soapAction="urn:#AjoutContact"/>
                   <input>
    <soap:header part="header" use="literal"/>
    <soap:body parts="body" use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
    <fault name="ParametresException">
    <soap:fault use="literal" name="ParametresException" />
    </fault>
         </wsdl:operation>

    Hi,
    This appears to be a known limitation and is addressed by CR227689
    which has a workaround that needs the wsdl to be modified.
    I am not sure if this is possible given that we don't control the wsdl most times.
    Could you please open a BEA support case and refer to CR227689?
    Vimala-
    p.s:
    I found some info on the issue which could help:
    1) Refer to <http://lists.oasis-open.org/archives/regrep/200306/msg00071.html>
    you will see that only one part is allowed in the message part for doc/literal webservices Snippet from the above link
    "Also, keep in mind that WS-I BP permits only one <part> on document/literal messages, so to be WS-I compliant, you would have to include it in the message structure. "
    2) Refer to http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html#refinement35722968 <http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html>
    below R2208)
    "For document-literal bindings, the Profile requires that at most one part, abstractly defined with the element attribute, be serialized into the soap:Body element."
    This implies Soap body contains message which contains a at most one part.

  • Building client proxies for web services with SOAP attachemtns

    Hi all.
    I'm currently building a series of web services that take SOAP attachments as
    input, but I am unable to generate the java proxies for testing the services via
    WebLogic Workshop 8.1. When I attempt to build the proxy, I get the following
    error:
    Warning: Failed to generate client proxy from WSDL definition for this service.
    Suggestion: Please verify the <types> section of the WSDL.
    Is there something I need to alter to get this to work, or does workshop not support
    client proxies for web services with DataHandler parameters?
    Thanks.
    -Brian

    Thanks for the help. This is my first web service with SOAP attachments, so it
    may have been a long time till I realized that.
    -Brian
    "Michael Wooten" <[email protected]> wrote:
    >
    Thanks Brian,
    The problem is that you are trying to use the "document" soap-style :-)
    If you change this to "rpc", you'll should be able to successfully generate
    the
    client proxy jar. The soap-style property, is at the bottom of the "protocol"
    property sheet section, for the JWS.
    Regards,
    Mike Wooten
    "Brian McLoughlin" <[email protected]> wrote:
    Sure, sorry about that. Attached is the wsdl for a sample web service
    I created
    just to test the proxy generation.
    "Michael Wooten" <[email protected]> wrote:
    Hi Brian,
    Would it be possible for you to post the WSDL, so we can see what might
    be causing
    the problem?
    Regards,
    Mike Wooten
    "Brian McLoughlin" <[email protected]> wrote:
    Hi all.
    I'm currently building a series of web services that take SOAP attachments
    as
    input, but I am unable to generate the java proxies for testing theservices
    via
    WebLogic Workshop 8.1. When I attempt to build the proxy, I get the
    following
    error:
    Warning: Failed to generate client proxy from WSDL definition for
    this
    service.
    Suggestion: Please verify the <types> section of the WSDL.
    Is there something I need to alter to get this to work, or does workshop
    not support
    client proxies for web services with DataHandler parameters?
    Thanks.
    -Brian

  • How to consume Web Service with Password digest from PLSQL

    We have Oracle 10g (10.2.0.3.0) 64 bit. We have a situation where we need to consume web service whose security header looks like as follow,
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-50">
    <wsse:Username>weblogic</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">d2enK45chjBPVvvukbYU6OX56kI=</wsse:Password>
    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">YAhEtLJfp4lzycLd3hZYjQ==</wsse:Nonce>
    <wsu:Created>2013-01-22T06:28:38.897Z</wsu:Created>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    Here we need passowrd digest, Nonce and Timestamp.
    How to create password digest from PLSQL? or if any other alternatives available please response soon.

    I do not see why it will not be possible to do digest authentication with a web server using PL/SQL.
    As for the digest password - the web server supplies a token (a nonce) which you need to use for creating the hashed authentication token (the digest password). The URL I posted explains this authentication process.
    As for the technical how-to in PL/SQL - as I mentioned, never had to do this (only dealt with Basic and NTLM authentication thus far). But as other auth methods (such as Microsoft's NTLM) can be implemented, I do not see why digest authentication could not.
    Suggest you spend some time googling for technical articles/sample code on the subject - and try to find specific PL/SQL related sample code too.

  • Jdev web service and SOAP header

    Hello,
    How can I implement a web service in jdev that extracts some elements from the SOAP header ?
    How can I implement a web service proxy in jdev so that it inserts elements in SOAP header?
    Thank you.
    The operation WSDL looks approx like this:
              <operation name="SoapDDXML">
                   <soap:operation soapAction="someaction"/>
                   <input>
                        <soap:body
                             use="encoded"
                             namespace="ns"
                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                             parts="psXML"/>
                   </input>
                   <output>
    <soap:Header>
    <OurCredentials xmlns="ns">
    <UserName>string</UserName>
    <Password>string</Password>
    </OurCredentials>
    </soap:Header>
                        <soap:body
                             use="encoded"
                             namespace="ns"
                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                             parts="Result"/>
                   </output>
              </operation>

    Hello,
    When using OracleAS/JDeveloper 10.1.3.x you are creating Web Service using the standard JAX-RPC API. This API uses the SOAP with Attachments API for Java (SAAJ) to manipulate SOAP messages.
    When dealing with SOAP Header, it is common usage to use the notion of "handler" to set/read header from the messages.
    The chapter "Using JAX-RPC Handler" is a good point to start to see how do deal with this requirement,
    When manipulating the header in the handler, the code will look like:
    SOAPHeader header = message.getSOAPHeader();
    Name headerName = soapFactory.createName("OurCredentials", "ns", "http://schemas.xmlsoap.org/soap/encoding/");
    .. // add sub element
    SOAPHeaderElement headerElement = header.addHeaderElement(headerName);also..
    Could you specify the version of JDeveloper and the type of Web Service that you are using when ascking a question on the forum it help community member to provide a better answer.
    Regards
    Tugdual Grall

  • Calling Web services using SOAP

    Hi,
    I am trying to execute a function through a webservice using a SOAP
    package and am getting the following error:ORA-30625: method dispatch
    on NULL SELF argument is disallowed. I think this is to do with one of
    the parameters being null but dont know how to fix this. Following is
    the function:
    CREATE OR REPLACE FUNCTION ILACPMSPRC.GET_GREETING_fnc (p_name IN
    VARCHAR2
    --, p_date VARCHAR2
    , p_age VARCHAR2 )
    RETURN NUMBER
    AS
    l_request soap_api_pkg.t_request;
    l_response soap_api_pkg.t_response;
    l_price NUMBER;
    -- DBMS_OUTPUT.ENABLE(20000);
    BEGIN
    DBMS_OUTPUT.ENABLE(20000);
    DBMS_OUTPUT.PUT_LINE('BEGIN');
    -- 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 => 'myusername',
    -- p_password => 'mypassword');
    l_request := soap_api_pkg.new_request(p_method => 'ns1:validate',
    p_namespace => 'xmlns:ns1="http://
    impl.webservice.validation.workmgt.cb.irishlife.ie/xsd"');
    -- parameter 1 is name
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'workType',
    p_type => 'xsd:string',
    p_value => p_name);
    -- parameter 2 is date
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'workItemNo',
    p_type => 'xsd:string',
    p_value => 'ABC');
    --p_value   => '2007-01-01T00:00:00Z');
    -- parameter 3 is age
    soap_api_pkg.add_parameter(p_request => l_request,
    p_name => 'indexName',
    p_type => 'xsd:string',
    p_value => p_age);
    l_response := soap_api_pkg.invoke(p_request => l_request,
    p_url => 'http://
    10.253.55.139:7400/axis2/services/ValidationService',
    p_action => 'http://
    10.253.55.139:7400/axis2/services/ValidationService/validate');
    if l_response.doc is not null then
    dbms_output.put_line('the doc is not null');
    end if;
    DBMS_OUTPUT.PUT_LINE ( 'p_name = ' || p_name );
    HERE l_price := soap_api_pkg.get_return_value(p_response =>
    l_response,
    p_name =>
    'validateResponse',
    p_namespace =>
    'xmlns:ns1="http://impl.webservice.validation.workmgt.cb.irishlife.ie/
    xsd"');
    if l_price is null then
    dbms_output.put_line('opps, the price is null');
    end if;
    DBMS_OUTPUT.PUT_LINE('PRICE:'||l_price);
    RETURN l_price;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLCODE || ', ' || SQLERRM);
    RETURN NULL;
    END GET_GREETING_fnc;
    Where HERE is marked is where the problem lies...the package body is
    here:
    CREATE OR REPLACE PACKAGE BODY SOAP_API_PKG AS
    -- Name : http://www.oracle-base.com/dba/miscellaneous/soap_api
    -- Author : DR Timothy S Hall
    -- Description : SOAP related functions for consuming web services.
    -- Ammedments :
    -- When Who What
    -- =========== ========
    =================================================
    -- 04-OCT-2003 Tim Hall Initial Creation
    -- 23-FEB-2006 Tim Hall Parameterized the "soap" envelope tags.
    -- 08-JUN-2006 Tim Hall Add proxy authentication functionality.
    g_proxy_username VARCHAR2(50) := NULL;
    g_proxy_password VARCHAR2(50) := NULL;
    PROCEDURE set_proxy_authentication(p_username IN VARCHAR2,
    p_password IN VARCHAR2) AS
    BEGIN
    g_proxy_username := p_username;
    g_proxy_password := p_password;
    END;
    FUNCTION new_request(p_method IN VARCHAR2,
    p_namespace IN VARCHAR2,
    p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
    RETURN t_request AS
    l_request t_request;
    BEGIN
    l_request.method := p_method;
    l_request.namespace := p_namespace;
    l_request.envelope_tag := p_envelope_tag;
    RETURN l_request;
    END;
    PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
    p_name IN VARCHAR2,
    p_type IN VARCHAR2,
    p_value IN VARCHAR2) AS
    BEGIN
    p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    DBMS_OUTPUT.PUT_LINE ( 'p_request.body = ' || p_request.body );
    END;
    --PROCEDURE add_parameter(p_request    IN OUT NOCOPY  t_request,
    -- p_name IN VARCHAR2,
    -- p_type IN DATE,
    -- p_value IN VARCHAR2) AS
    --BEGIN
    -- p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    --END;
    --PROCEDURE add_parameter(p_request    IN OUT NOCOPY  t_request,
    -- p_name IN VARCHAR2,
    -- p_type IN INTEGER,
    -- p_value IN VARCHAR2) AS
    --BEGIN
    -- p_request.body := p_request.body||'<'||p_name||' xsi:type="'||
    p_type||'">'||p_value||'</'||p_name||'>';
    --END;
    PROCEDURE generate_envelope(p_request IN OUT NOCOPY t_request,
    p_env IN OUT NOCOPY VARCHAR2) AS
    BEGIN
    p_env := '<'||p_request.envelope_tag||':Envelope xmlns:'||
    p_request.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"
    ' ||
    'xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">' ||
    '<'||p_request.envelope_tag||':Body>' ||
    '<'||p_request.method||' '||p_request.namespace||' '||
    p_request.envelope_tag||':encodingStyle="http://schemas.xmlsoap.org/
    soap/encoding/">' ||
    p_request.body ||
    '</'||p_request.method||'>' ||
    '</'||p_request.envelope_tag||':Body>' ||
    '</'||p_request.envelope_tag||':Envelope>';
    END;
    PROCEDURE show_envelope(p_env IN VARCHAR2) AS
    i PLS_INTEGER;
    l_len PLS_INTEGER;
    BEGIN
    i := 1; l_len := LENGTH(p_env);
    WHILE (i <= l_len) LOOP
    DBMS_OUTPUT.put_line(SUBSTR(p_env, i, 60));
    i := i + 60;
    END LOOP;
    END;
    PROCEDURE check_fault(p_response IN OUT NOCOPY t_response) AS
    l_fault_node XMLTYPE;
    l_fault_code VARCHAR2(256);
    l_fault_string VARCHAR2(32767);
    BEGIN
    dbms_output.put_line('midas8-1');
    l_fault_node := p_response.doc.extract('/'||
    p_response.envelope_tag||':Fault',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/');
    dbms_output.put_line('midas8-2');
    IF (l_fault_node IS NOT NULL) THEN
    dbms_output.put_line('midas8-3');
    l_fault_code := l_fault_node.extract('/'||
    p_response.envelope_tag||':Fault/faultcode/child::text()',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/').getstringval();
    dbms_output.put_line('midas8-4');
    l_fault_string := l_fault_node.extract('/'||
    p_response.envelope_tag||':Fault/faultstring/child::text()',
    'xmlns:'||
    p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/').getstringval();
    dbms_output.put_line('midas8-5');
    --RAISE_APPLICATION_ERROR(-20000, l_fault_code || ' - ' ||
    l_fault_string);
    END IF;
    END;
    FUNCTION invoke(p_request IN OUT NOCOPY t_request,
    p_url IN VARCHAR2,
    p_action IN VARCHAR2)
    RETURN t_response AS
    l_envelope VARCHAR2(32767);
    l_http_request UTL_HTTP.req;
    l_http_response UTL_HTTP.resp;
    l_response t_response;
    BEGIN
    dbms_output.put_line('Invoking request');
    dbms_output.put_line('url :'||p_url);
    dbms_output.put_line('action :'|| p_action);
    generate_envelope(p_request, l_envelope);
    show_envelope(l_envelope);
    l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.0');
    dbms_output.put_line('midas1');
    IF g_proxy_username IS NOT NULL THEN
    DBMS_OUTPUT.PUT_LINE('PROXY USERNAME IS NOT NULL');
    UTL_HTTP.set_authentication(r => l_http_request,
    username => g_proxy_username,
    password => g_proxy_password,
    scheme => 'Basic',
    for_proxy => TRUE);
    END IF;
    UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
    UTL_HTTP.set_header(l_http_request, 'Content-Length',
    LENGTH(l_envelope));
    UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
    UTL_HTTP.write_text(l_http_request, l_envelope);
    dbms_output.put_line('midas2');
    l_http_response := UTL_HTTP.get_response(l_http_request);
    dbms_output.put_line('midas3');
    UTL_HTTP.read_text(l_http_response, l_envelope);
    dbms_output.put_line('midas4');
    UTL_HTTP.end_response(l_http_response);
    dbms_output.put_line('midas5');
    l_response.doc := XMLTYPE.createxml(l_envelope);
    dbms_output.put_line('midas6');
    l_response.envelope_tag := p_request.envelope_tag;
    dbms_output.put_line('midas7');
    l_response.doc := l_response.doc.extract('/'||
    l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/
    child::node()',
    'xmlns:'||
    l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/
    envelope/"');
    -- show_envelope(l_response.doc.getstringval());
    dbms_output.put_line('midas8');
    check_fault(l_response);
    dbms_output.put_line('midas9');
    RETURN l_response;
    END;
    FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
    p_name IN VARCHAR2,
    p_namespace IN VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    -- RETURN p_response.doc.extract('//'||p_name||'/
    child::text()',p_namespace).getstringval();
    dbms_output.put_line('function');
    dbms_output.put_line(p_name);
    DBMS_OUTPUT.PUT_LINE (p_response.doc.extract('//'||p_name||'/
    child::text()', p_namespace).getstringval());
    RETURN p_response.doc.extract('//'||p_name||'/child::text()',
    p_namespace).getstringval();
    END;
    END SOAP_API_PKG;
    Any help greatly appreciated!!

    Hello,
    I have not looked in detail to you code but I would like to point out that Oracle provides utilities to call Web Services from the database, using a DB package and/or Java in the DB.
    Have you looked to the documentation about:
    - Developing a Web Service Client in the Database
    regards
    Tugdual Grall

  • How to call Web Services (with javascript) in a view load event ?

    Hello to the expert community,
    I'm looking for a piece of javascript code allowing to call Web Services in a view load event ?
    Any ideas will be really appreciated.
    Regards.
    Have a nice week.

    Thank you for your answer, dongmei.
    It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
    E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
          <s:element name="GetWeatherReport">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="GetWeatherReportResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="string" nillable="true" type="s:string" />
        </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
    The question is how can I get the response GetWeatherReportResult from the service.

  • Calling Web Service with Flex 3.0 from WAS 6.40 and WAS 7.0

    I have followed Axel Kratel's tutorial from
    "How to Develop Flex Applications that Invoke Web Services" and tested it against a WAS 6.40 and a WAS
    7.00.
    In both cases, I get in the fault handler: faultCode="Channel.Security.Error".
    Could you tell for which systems it is supported?
    The error might have to do with crossdomain.xml file??
    Thanks for your insight!
    Tanguy Mezzano
    PS: I am testing it through a VPN, through a proxy, and with Basic Authentication.

    tanguy,
    In most cases it has to be the crossdomain.xml file.
    One way to check it out ...
    I use flexbuilder - if I run the application within flexbuilder then the application runs fine - i.e I execute the application from flexbuilder.
    However if I compile the same as an SWF and run the SWF through my browser I get the security error.
    You might want to also give the development environment you are using - are you using the SDK ??
    Also since you are working on VPN- just check if you are able to get the WSDL for your web service through the browser - we have a problem of having to execute the web service locally to check the same- I get an error page  ( URL ending in ssocntl... or something to do with SSO ... )
    Edited by: Arun Varadarajan on Feb 3, 2009 2:32 PM

  • SSL web service task SOAP header Action was not understood..

    Hi all,
    While I create  web service task to consum a wcf service using SSL and execute the task it give the following error: But the same WCF service is deployed in nonSSL (basicHTTPBinding) , it works well and the results are received. Could any one suggest
    what is missing?
    Error: 0xC002F304 at Web Service Task, Web Service Task: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: SOAP
    header Action was not understood..
     at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)
       at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".
    Task failed: Web Service Task
    SSIS package "Package.dtsx" finished: Success.
    Regards
    Venkatesh G

    Can you provide more information? Are you using BasicHttpBinding with transport security? If you access the service from a console client instead of SQL Server Web Service Task, does it work?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact
    [email protected] But please do not ask technical questions in the email.

  • Calling web service with utl_dbws and parsing the xml result with Xpath

    I'm invoking a web service from the database(10.2.0.2.0) using sys.utl_dbws and all is working well. After executing response := sys.utl_dbws.invoke(call_, request); I execute dbms_output.put_line(substr(response.getstringval(),1,1500)); which results with:
    <refCursor10gProcessResponse xmlns="http://xmlns.oracle.com/refCursor10g">
    <result xmlns="http://xmlns.oracle.com/refCursor10g">
    <Row xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/ADM/SERVICES/GETST/">
    <Column name="C_ID" sqltype="VARCHAR2">20292</Column>
    <Column name="AYR" sqltype="VARCHAR2">2002</Column>
    <Column name="EDT" sqltype="VARCHAR2">2002-06-13</Column>
    <Column name="ETUS" sqltype="VARCHAR2">O</Column>
    <Column name="PC" sqltype="NUMBER">537</Column>
    <Column name="SG" sqltype="VARCHAR2"/>
    <Column name="VD" sqltype="VARCHAR2">Y</Column>
    <Column name="VR" sqltype="VARCHAR2">R</Column>
    <Column name="TS" sqltype="VARCHAR2">31</Column>
    <Column name="D" sqltype="VARCHAR2">I</Column>
    <Column name="T" sqltype="VARCHAR2">1</Column>
    <Column name="P" sqltype="VARCHAR2"/>
    <Column name="MT" sqltype="VARCHAR2">2</Column>
    <Column name="PTAT" sqltype="VARCHAR2"/>
    </Row>
    </result>
    </refCursor10gProcessResponse>
    How do I parse out just the value 20292 of Column name="C_ID" using xpath? I've tired but I don't think i have the xpath set up correctly:
    dbms_output.put_line(response.extract('//result/Row/Column/child::text)','xmlns="http://xmlns.oracle.com/refCursor10g"').getstringval());
    Error messgae is:
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "ADM.CONSUME_WEB_SERVICES", line 439
    ORA-06512: at 3
    Thanks

    Tried getting by the attribute but I don't think I have the format correct:
    dbms_output.put_line(response.extract('//result/Row/Column@C_ID/child::text()','xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/ADM/SERVICES/GETST"').getstringval());
    Here's the full soap response envelope:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <refCursor10gProcessResponse xmlns="http://xmlns.oracle.com/refCursor10g">
    <result xmlns="http://xmlns.oracle.com/refCursor10g">
    <Row xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/ADM/SERVICES/GETST/">
    <Column name="C_ID" sqltype="VARCHAR2">20292</Column>
    <Column name="AYR" sqltype="VARCHAR2">2002</Column>
    <Column name="EDT" sqltype="VARCHAR2">2002-06-13</Column>
    <Column name="ETUS" sqltype="VARCHAR2">O</Column>
    <Column name="PC" sqltype="NUMBER">537</Column>
    <Column name="SG" sqltype="VARCHAR2"/>
    <Column name="VD" sqltype="VARCHAR2">Y</Column>
    <Column name="VR" sqltype="VARCHAR2">R</Column>
    <Column name="TS" sqltype="VARCHAR2">31</Column>
    <Column name="D" sqltype="VARCHAR2">I</Column>
    <Column name="T" sqltype="VARCHAR2">1</Column>
    <Column name="P" sqltype="VARCHAR2"/>
    <Column name="MT" sqltype="VARCHAR2">2</Column>
    <Column name="PTAT" sqltype="VARCHAR2"/>
    </Row>
    </result>
    </refCursor10gProcessResponse>
    </env:Body>
    </env:Envelope>
    Any thoughts?

  • Unable to call Web Service with Username Token

    -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    I posted this in the JDeveloper forum but got no response.
    -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
    I have JDeveloper 10g release 3.
    I created a regular Java application. Added a Web service proxy with no special mappings or anything. Right clicked on the proxy and said "Secure Proxy". I only used basic plain text username token. Added a method to my class that call instantiates a client, and called the operation.
    However when I run this I get the following error message.
    SEVERE: No username found
    Error::oracle.j2ee.ws.common.soap.fault.SOAP11FaultException: No username found
    The Web Service Security Proxy Wizard created an xml in my src file, that I updated to put the username and password of the web service. Below is the xml file.
    <oracle-webservice-clients xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/oracle-webservices-client-10_0.xsd'>
    <webservice-client>
    <service-qname namespaceURI="http://tempuri.org/SOAPTestWS/Service1" localpart="Service1"/>
    <port-info>
    <wsdl-port namespaceURI="http://tempuri.org/SOAPTestWS/Service1" localpart="Service1Soap"/>
    <runtime enabled="security">
    <security>
    <inbound/>
    <outbound>
    <username-token name="myusername" password="xxxxx" password-type="PLAINTEXT" add-nonce="false" add-created="false"/>
    </outbound>
    </security>
    </runtime>
    <operations>
    <operation name='TryMe'>
    </operation>
    </operations>
    </port-info>
    </webservice-client>
    </oracle-webservice-clients>
    And this configuration file is processed in the stub file.
    setupConfig("project2/runtime/Service1Soap_Stub.xml");
    What am I doing wrong. I cannot find any documentation on the secure web service client wizard and it's generated code.
    Thanks, MIke L.

    Mike,
    I updated the 3 xml files with the name and password and I get a different error now ...
    WARNING: Unable to connect to URL: https://dssd001.ca.boeing.com:443/bartinterface/SOAP/resSetup.cgi due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr
    I am using the simple text based username auth, but jdev for some reason still goes and looks for the x509 cert? How did you get yours to work?
    Thanks
    Sriram

  • Calling web service with SSL (HTTPS) hangs client stub

    If anyone can help it would make my day! I've spent way too much time on this!!!
    I'm running:
    - Web service is running on Linux RedHat with Oracle9iAS 9.0.3
    - Client is running from Windows XP under Jdeveloper
    I've successfully installed and run the web security demo "ws_security" at http://otn.oracle.com/sample_code/tech/java/web_services/wssecurity/ws_security.jar.
    This demo goes through installing the web service, certificates, etc... and the demo runs fine. I'm also able to connect to the web service from a browser using https://server1:4443/CreditCardValidator/CreditCardValidator. I can download the proxy, look at the WSDL, etc...
    Now I've written my own very simple stateless java class web service, deployed it to 9iAS , and then downloaded the proxy stub jar. Using the proxy stub I can call my web service and everything works fine.
    Then I configure the web service to use HTTPS by making the following changes to the proxy stub (per the ws_security demo).
    1) Copy the following 5 lines to the proxy stub
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\Data\\Oracle\\WALLETS\\ws_security\\wallet.txt");
    System.setProperty("oracle.wallet.password","thewalletpassword");
    2) modify the "m_soapURL" by changing "http" to "https" and the port number to 4443
    3) add the following 3 jar files to my projects library class list:
    C:\Program Files\jdev9031\jlib\jssl-1_2.jar
    C:\Program Files\jdev9031\jdk\jre\lib\ext\jcert.jar
    C:\Program Files\jdev9031\lib\jsse.jar;C:\Program Files\jdev9031\jlib\javax-ssl-1_2.jar
    When I run the proxy stub it just hangs. I've traced the hang to the "Response response = call.invoke(new URL(m_soapURL), soapActionURI);" statement in the "makeSOAPCallRPC" method in the proxy stub.
    Again, this works fine if I simply change the "m_soapURL" to use "http" instead of "https". It looks like it's hanging on the client side and the call is never making it to the server.
    Any help is GREATLY appreciated!!!!!

    Could you explain it a little more, please.
    Since my first message, I used the wallet manager to add the certificate the server where the web service is at, uses.
    What else do I need to make it work??
    Thanks in advance again.

  • Calling Web Service With ABAP

    Hi all,
    I want to create a call to a Web Service of XI from another R/3 server.
    I've created client proxy in system as said
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    But when I try I get the following error:
    <i><CODE>INTERNAL.SYSTEM_NOT_CONFIGURED_AS_XMB</CODE>
    <ERRORTEXT>System not configured as XI Integration Engine</ERRORTEXT></i>
    I know I've left some configuration, I've to say to XI that R/3 server is going to use call to XI as application server, but how I do this conf?
    If I try from XI I get:
    <i>INTERNAL.PROXY_NOT_ALLOWED_ON_IS</i>
    Is possible to call a web service from the XI server?
    Thanks in advance.
    Urtzi

    HI,
    Also see the below links
    error:INTERNAL.SYSTEM_NOT_CONFIGURED_AS_XMB
    DESTINATION_NOT_FOUND
    HTTP destination IED_100 does not exist (system , transaction SM59)
    CCM2.0 Config in NW2004s (PI7.0) u0096 XI Error
    CCM2.0 Config in NW2004s (PI7.0) u0096 XI Error
    Regards
    Chilla

Maybe you are looking for

  • Firefox just upgraded my computer to version 5.0. I do not have a what is referred to as a firefox button. How do I fix this?

    Is there a way to get the firefox button? When version 5.0 installed for some reason I don't have it. Is there a way to change this? I have looked everywhere and do not see a way to get the firefox button.

  • Synching to a new computer

    Hello all, I have an iPhone that I have music on synched to a Windows PC.  I just bought an iMac and want to synch my phone to the iMac instead.  However, when I plug it in to synch, it wants to wipe my iPhone and use the music from the iMac (of whic

  • Interest on customer calulation problem

    hai, Regarding interest on customers, the interest is calculating on cleared items. but i need, interest to be calculated only on open items. for example bill due date is 05.04.2007 but the payment made on 10.04.2007 so there is no outstanding. But t

  • So what's the hype about?

    having recently bought an ipod nano, and tried to help two other friends set theirs up i'm convinced not to bother switching to the world of Mac. what a **** hassle, and what crap software updates. see the other posts concerning the 03/23 update and

  • PQAH Set operations

    Hi, In the tcode:PQAH, Extras,Show set operations is disabled. Can any body help me on what role/authorization object need to be activated for this option? Regards, Anil.