Async client with Soap Header (jax-wsi 2.0)

Hi my name's Michele
i have a problem!
I developed simply ws with JWSDP 2.0 (jax-wsi)
I use wsimport for generate artifcats (with XAdditionalHeader), but for Method Async i don't have object for header, in other words
i have this situation
1)Proxy with call Sync ok:
public void WebMetod(Obj body,SoapAut header); // ok body and SoapAut (Header Soap)
2) Async ko:
public Response<ResponseDU>WebMetodAsync(Obj body); //ko, becausw i can't invoke web method withi Header Soap
where is SoapHeader in asynck call ???
i expected th async call:
public Response<ResponseDU>WebMetodAsync(Obj body,SoapQut header) but in Proxy this call not exist
Help me please
bye
sorry for my Pitiful English.

Try this :
In the composite.xml of your mediator process, add "passThroughHeader" property. Probably, that might help.
Read this : Creating Oracle Mediator Routing Rules
Hope it helps !

Similar Messages

  • ASMX to WCF Migration with SOAP Header

    Hi All,
    I am migrating my current Web Service to WCF. Everything seems to be ok with simple asmx service. But for some of my web methods I have SoapHeaders defined for authentication. In those webmethods I have at some places used custom classes too as parameters or return values.
    Now when I am converting my webservice to WCF, how do I write code so that it takes SOAP headers too. I tried to use Message Contract and Message Headers. But could not get hat right. In one of the posts on google, I saw code like the one below:
    SoapHeader("authHeader", typeof(ServiceHeader), Direction = SoapHeaderDirection.In)]
    but it gives a compile time erro of wrong no of arguments. Am I missing some using directive? Or is there any other way I can include SoapHeaders in my Operation Contracts for authentication?

    I appreciate you response to my query. However it is not fully gratifying my needs. Here is another explanation. I have an exisitng web service something like the the code below
    //My Soap Header Class
    public class ServiceHeader : SoapHeader
    public string userName;
    public string pasword;
    //My ASMX Class
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class Service1 : System.Web.Services.WebService
    public ServiceHeader authHeader;
    [WebMethod]
    [SoapHeader("authHeader", Direction = SoapHeaderDirection.In)]
    public string HelloWorld()
    string result = String.Empty;
    if (authHeader.userName == "uid" && authHeader.pasword == "password")
    result = "Hello User!!!!";
    return (result);
    This code works perfectly fine with asmx web services. Now I converted it to WCF with a condition that it should still work with my exisitng web service users. Here is my code after convertion:
    //My Soap Header Class
    [DataContract]
    public class ServiceHeader : SoapHeader
    [DataMember]
    public string userName;
    [DataMember]
    public string pasword;
    //My WCF Class
    [WebService(Namespace = http://tempuri.org/)]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ServiceContract(Namespace = "http://tempuri.org/")]
    public class Service1 : System.Web.Services.WebService
    public ServiceHeader authHeader;
    [WebMethod]
    [SoapHeader("authHeader", Direction = SoapHeaderDirection.In)]
    [OperationContract]
    public string HelloWorld()
    string result = String.Empty;
    if (authHeader.userName == "uid" && authHeader.pasword == "password")
    result = "Hello User!!!!";
    return (result);
    I have also made necessary changes to web.config. My Client code is:
    protected void btnInvokeAsmx_Click(object sender, EventArgs e)
    Service1 oAsmx = new Service1();
    ServiceHeader authHeader = new ServiceHeader();
    authHeader.userName = "uid";
    authHeader.pasword = "password";
    oAsmx.ServiceHeaderValue = authHeader;
    Response.Write(Asmx.HelloWorld());
    The above code works perfectly fine with asmx service. But when I convert it to WCF, I am not able to pass header values to the service. Can anyone let me know the issue or ways to pass my service header values to new WCF service?

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

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • Consume web service in ABAP with SOAP header

    I'm trying to call a SalesForce Web Service from ABAP.
    After the login I use the WS_HEADER to pass header information.
      TRY.
    Additional Header:
          CONCATENATE
          '<soap:Header>'
          '<s1:SessionHeader>'
          '<s1:sessionId>' login_output-result-session_id '</s1:sessionId>'
          '</s1:SessionHeader>'
          '</soap:Header>' INTO l_string.
    convert to xstring
          l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
          ws_header ?= obj_add->get_protocol('IF_WSPROTOCOL_WS_HEADER').
          IF NOT l_string IS INITIAL.
    create iXML DOM document from XML xstring
            CALL FUNCTION 'SDIXML_XML_TO_DOM'
              EXPORTING
                xml           = l_xstring
              IMPORTING
                document      = xml_document
              EXCEPTIONS
                invalid_input = 1
                OTHERS        = 2.
            IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
              xml_root = xml_document->get_root_element( ).
              xml_element ?= xml_root->get_first_child( ).
    add header element by element to SOAP header
              WHILE NOT xml_element IS INITIAL.
                name = xml_element->get_name( ).
                namespace = xml_element->get_namespace_uri( ).
                namespace = 'urn:partner.soap.sforce.com'."xml_element->get_namespace_uri( ).
                IF NOT xml_element IS INITIAL.
                ENDIF.
    get WS_HEADER protocol
                ws_header->set_request_header(
                name = name
                namespace = namespace
                dom = xml_element ).
                xml_element ?= xml_element->get_next( ).
              ENDWHILE.
            ENDIF.
          ENDIF.
        CATCH cx_ai_system_fault .
      ENDTRY.
    I get the following exception: CX_SXML_PARSE_ERROR
    I guess the error has to do with the wrong description of the additional header.
    In soapUI the header looks like that:
       <soapenv:Header>
          <urn:SessionHeader>
             <urn:sessionId>1234567890</urn:sessionId>
          </urn:SessionHeader>
       </soapenv:Header>
    Is there somebody who knows how I should "translate" this to ABAP?
    Thanks,
    Daniel

    Hi Jelena
    Thanks for your answer.
    I've already created the proxy.
    The question is how or where I get the correct format for the header of this string in ABAP:
    CONCATENATE
    '<soap:Header>'
    '<s1:SessionHeader>'
    '<s1:sessionId>' login_output-result-session_id '</s1:sessionId>'
    '</s1:SessionHeader>'
    '</soap:Header>' INTO l_string.
    This example is wrong. I get the following error: CX_SXML_PARSE_ERROR
    As I mentioned before in soapUI the header looks like that:
    <soapenv:Header>
    <urn:SessionHeader>
    <urn:sessionId>1234567890</urn:sessionId>
    </urn:SessionHeader>
    </soapenv:Header>
    Daniel

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

  • Need to generrate a XSD with SOAP HEader

    i have a following XMl request that i need to send as to a REST service. its not a regular SOAP/http service but does have a soap envelope on it. i need to create a xsd for this request xml but i could not add the soap:envelope and soap:body correctly. it keeps giving me an error with envelope element not found. i managed to generate a xsd from the soapPrice element but not its parent. below is the xml and the xsd i have.
    how can i also include the sopa header into this xsd
    Request xml:
    <soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soapPrice xmlns="http://tempuri.org/">
    <a>
    <request
    input1="1"
    input2=" 1"
    input3="1"
    input4="A"
    input5="B"
    input6="1"
    />
    </a>
    </soapPrice>
    </soap:Body>
    </soap:Envelope>
    xsd:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="soapPrice" targetNamespace="http://tempuri.org/" xmlns:mstns="http://tempuri.org/" xmlns="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
    <xs:element name="soapPrice" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="1">
    <xs:element name="a">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="request" minOccurs="0" maxOccurs="1">
    <xs:complexType>
    <xs:attribute name="input1" form="unqualified" type="xs:string" />
    <xs:attribute name="input2" form="unqualified" type="xs:string" />
    <xs:attribute name="input3" form="unqualified" type="xs:string" />
    <xs:attribute name="input4" form="unqualified" type="xs:string" />
    <xs:attribute name="input5" form="unqualified" type="xs:string" />
    <xs:attribute name="input6" form="unqualified" type="xs:string" />
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hi,
    You can use the enhancement MM06E005 for this..
    GO to CMOD..create a project and give the enhancement..
    Activate the project..
    GO to SE51..give the program SAPLXM06 and screen 0101 for header level data.
    Press create..
    GIve the screen type as SUBSCREEN..
    In the layout give the field.
    Activate the screen..Now you can see the field in ME21N
    Thanks
    Naren

  • How to convert the Variable with soap header to non soap variable.

    I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
    Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
    Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.

    HI,
    In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
    Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
    Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
    Thanks,
    Venugopal sss Raja

  • Issue with SOAP Header

    Hi All,
    I am beginner in SOA . Please excuse me if my phrasing is not quite right . Please do let me know if you require additional information to answer this question
    Jdev : 11.1.1.3.0
    UseCase :
    Trying to learn SOA . In this regard, I created a SOA project that BPEL process, call this as Calling process. This BPEL will call another SOA project through partner link.
    Step1  : From the calling process I am passing the header information . Assigned this header to a simple string like "Test"
    <invoke name="Invoke_1" inputVariable="Invoke_1_execute_InputVariable"
                outputVariable="Invoke_1_execute_OutputVariable"
                partnerLink="Service1" portType="ns2:execute_ptt"
                operation="execute" bpelx:inputHeaderVariable="HeaderVariable"/>
    Step 2: Has a Mediator and a BPEL . In the Mediator.mplan , below is what I am trying to do . That is trying to access the header that was passed in from calling process  and getting the error as below
                   <assign>
                      <copy target="$out.payload/client:process/client:header"
                            xmlns:inp1="http://xmlns.oracle.com/singleString"
                            xmlns:client="http://xmlns.oracle.com/WebService_jws/HelloWorld/HelloWorldBPELProcess"
                            expression="$in.header.inp1_singleString/inp1:singleString/inp1:input"/>
                   </assign>
    oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01001:[Error in assign operation]Error occurred while assigning to target "$out.payload/client:process/client:header" using expression "$in.header.inp1_singleString/inp1:singleString/inp1:input".Possible Fix:Check if source message has right values or source expression is valid.
    Thanks
    Sandeep

    Try this :
    In the composite.xml of your mediator process, add "passThroughHeader" property. Probably, that might help.
    Read this : Creating Oracle Mediator Routing Rules
    Hope it helps !

  • Exception "main" javax.xml.ws.soap.SOAPFaultException: Missing SOAP Header

    Hi
    I need to integrate E-Business Suite with ADF using JAX-WS proxy client. When I tried to invoke a method exposed in webservices, I am getting the below error
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Missing in SOAP Header
    how to pass password with SOAP header?
    In a thread "https://forums.oracle.com/forums/thread.jspa?threadID=2125723", they mentioned to include "wss_username_token_client_policy" and to set override property to set user/pw from a csf key. I included that policy while generating the proxy client in "Step 7" and after then what should I do?
    Is it the only way to invoke secured webservices? if not what are the ways to do it?
    Can anyone give me good example or sample codes to invoke secured webservice through "JAX-WS Proxy client"
    Thanks

    I suppose that this is duplicate of How to pass username/password through WebService proxy client to E-BS.
    For full example check: http://www.javadb.com/using-a-message-handler-to-alter-the-soap-header-in-a-web-service-client
    Dario

  • 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

  • SOAP Header in SOAP Receiver adapter

    Hi All,
    I am doing a Proxy to  Webservice scenario where webservice requires the SOAP request as below.
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP-ENV:Header>
            <mh:CustomHeader xmlns:mh="http://schemas.test.com/customHeader">
                <mh:MessageData>
                    <mh:MessageId>12345</mh:MessageId>
                    <mh:Timestamp>2004-06-09T14:41:44Z</mh:Timestamp>
                </mh:MessageData>
            </mh:CustomHeader>
            <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
                <wsse:UsernameToken>
                    <wsse:Username>test</wsse:Username>
                    <wsse:Password>test123</wsse:Password>
                </wsse:UsernameToken>
            </wsse:Security>
        </SOAP-ENV:Header>
        <SOAP-ENV:Body>
        </SOAP-ENV:Body>
    Need your help to understand how can we achieve this using Standard SOAP adapter to customize the Header part as it requires to include "<mh:CustomHeader " & "UsernameToken".
    Or Do i need to go for adapter module development to create this SOAP request.
    Please provide your suggestion to achieve this scenario.
    Thanks & regards
    Ashwin
    Edited by: ashwin dhakne on May 17, 2010 5:32 PM

    Hi all,
    Created  a below target payload in a message mapping with  SOAP Header & Body part as per the requirement.
    In SOAP receiver communication channel, checked the option " Do Not Use SOAP Envelope".
    But while executing an sceanrio, i am facing  an error in SOAP receiver channel as Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    And if i don't check the option " Do Not Use SOAP Envelope" it gives an error as
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Unable to obtain service binding,error=Payload Envelope is not a known message for TestWebserviceService.
    Please provide your suggestions to handle this issue.
      <?xml version="1.0" encoding="UTF-8" ?>
    <ns1:Envelope xmlns:ns1="http://schemas.test.com/CustomrHeader">
    <ns1:Header>
    <ns1:CustomrHeader>
    <ns1:MessageData>
      <ns1:MessageId>Constant</ns1:MessageId>
      <ns1:Timestamp>Constant</ns1:Timestamp>
      </ns1:MessageData>
    <ns1:Security>
    <ns1:UsernameToken>
      <ns1:Username>Constant</ns1:Username>
      <ns1:Password>Constant</ns1:Password>
      </ns1:UsernameToken>
      </ns1:Security>
      </ns1:CustomrHeader>
      </ns1:Header>
    <ns1:Body>
    <ns1:Details>
    <ns1:Information>
      <ns1:Title>Test</ns1:JobTitle>
      </ns1:Information>
    <ns1:Contacts>
      <ns1:Street>Test Drive</ns1:Street />
      </ns1:Contacts>
      </ns1:Details>
      </ns1:Body>
      </ns1:Envelope>
    Thanks
    Ashwin
    Edited by: ashwin dhakne on May 18, 2010 5:47 PM
    Edited by: ashwin dhakne on May 18, 2010 5:48 PM
    Edited by: ashwin dhakne on May 18, 2010 5:48 PM

  • Post user and pass to SOAP Header message in ABAP Proxy

    Hi Folks!
    I'm trying to post user and pass to SOAP Header on an ABAP proxy. I've already read the thread [Consume web service in ABAP proxy with SOAP header|Re: Consume web service in ABAP proxy with SOAP header; and I see that is possible to manipulate SOAP Header but I cannot understand how I work with function module SDIXML_XML_TO_DOM.
    Do I need pass to parameter xml a complete SOAP Envelope? If it is right how can I get the complete xml message to pass to this parameter? I think I don't need the build the xml strucuture as I did on WebAS 6.40, isn't it?
    Thanks in advanced.

    Hi Rafael,
    I would be interested in the solution... could you please post it into forum.
    Thanks and best regards
    Stefan Bosshard

  • Jax-ws ws client with saml 1.1 sender vouches policy

    Hi,
    In wls 10.3 I defined a SAML source site , now I want to use the sender voucher policy on a webservice. So far so good.
    Now I want to generate a jax-ws proxy client, but there are no sample how to use this policy in java, only some wlst examples.
    Is there some more information how to do this.
    thanks Edwin

    hi
    This is not an answer to your question but a question since you have created a SAML Source Site in wls 10.3.
    Have you been able to use SAML Authenication from a weblogic client to web-service on different domain ?
    I am not able get this work ?
    I am done the following
    SAML relying party on SAML Credential Mapper on domain1
    with
    target url =endpoint of webservice at domain2
    and asserting Party on SAML Identity Asserter
    with target url= relative url of the web service.
    At Source Site , I saw that wls is not attaching any security information in the SOAP header .
    Can someone Help me with Configuration .
    The end goal is to access a secure web-service
    Thanks
    Sanyam

  • Adding C# Soap Header to a client that calls BT2010 Orchestration published as a WCF Web Service

    I've added code from this reference to my orchestration (that is published as a WCF webservice):
    Accessing SOAP Headers in Orchestrations.
    I have a C# client that I was previously using before I was using any of the SOAP Headers.  I've been looking at dozens of blogs, and find the answers to anything related to SOAP Headers most confusing (and often specific to unique cases). 
    I'm using BT2010.  How can I add username, password, and a custom header called "ApplicationID" to my existing C# program and pass it to the orchestration/web service?
    Thanks,
    Neal

    Neal,
    The BizTalk WCF Service Publishing Wizard does not include custom SOAP header definitions in the generated metadata. To publish metadata for WCF services using custom SOAP headers, you should manually create a Web Services Description Language (WSDL) file.
    You can use the externalMetadataLocation attribute of the
    <serviceMetadata> element in the Web.config file that the wizard generates to specify the location of the WSDL file. The WSDL file is returned to the user in response to WSDL and metadata exchange (MEX) requests instead of the auto-generated WSDL.
    The following XML data shows an example of a part of the WSDL file defining custom SOAP headers:
    <wsdl:operation name="Request">
    <soap12:operation soapAction="http://Microsoft.Samples.BizTalk.NetTcpAdapter/OrderProcess/IOrderProcess/Request" style="document" />
    <wsdl:input name="Order">
    <soap12:header message="i0:Order_Headers" part="SalesAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output name="OrderConfirmation">
    <soap12:header message="i0:OrderConfirmation_Headers" part="PaymentAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    Refer:
    SOAP Headers with Published WCF Services
    Rachit
    Please mark as answer or vote as helpful if my reply does

Maybe you are looking for