Accessing SOAP Headers in BPEL

Hi All,
I have been trying to access a custom soap header in BPEL but in vain.
I have the header like this in my wsdl
    <wsdl:message name="doTransactionRequest">
        <wsdl:part name="part1" element="tns:doTransaction"/>       
    </wsdl:message>   
    <wsdl:message name="doTransactionHeader">
        <wsdl:part name="teamName" element="tns:myName"/>
    </wsdl:message>
    <wsdl:message name="doTransactionResponse">
        <wsdl:part name="part1" element="tns:doTransactionReply"/>
    </wsdl:message>
    <wsdl:binding name="RequestHandlerProxySoapBinding" type="tns:RequestProxyPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="doTransaction">
            <soap:operation soapAction=""/>
            <wsdl:input name="doTransactionInput">
                <soap:header message="doTransactionHeader" part="teamName" use="literal"/>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="doTransactionOutput">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>In BPEL I have a corresponding header variable defined for the header "teamName".
Now how do I tell BPEL "receive" to copy the incoming header to this variable ? There is no parameter called "headerVariable" or so for the receive element. As far as I understand, when the soap header "myName" comes, it is copied as a property in the normalized message. Now I need to tell BPEL service engine some how to copy the property to the header variable. But I don't know how to do that.
I Really need some help. Thanks in advance.
best regards,
bala

I would try defining the soap:header under the <operation> description in your .wsdl
to look something like this:
<Input>
<soap:header message="tns:SessionHeader" part="SessionHeader"/>
<soap:body message="[yourprocess]RequestMessage"/>
</Input>
Then create a variable of the sessionHeader message type and assign it in the adapters tab.
You'll probably also need to add this namespace to your wsdl:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
I haven't tested this but it should get you on the right track...

Similar Messages

  • Manipulating soap headers in BPEL 11g doesn't work

    Hi,
    I need to change the values of the soap header elements MessageId and RelatesTo in SOA Suite 11.1.1.5. The documentation is not very clear on how to achieve this. In the development guide bpelx:inputHeaderVariable is mentioned for manipulating soap headers. If you use the "Headers" tab on the invoke activity I instead get bpelx:headerVariable. But I've tried both and then run the calls through TCP Monitor. The messageId/RelatesTo is still not changed.
    I have also tried the "Properties" tab on the invoke activity. There are two properties called wsa.messageId and wsa.relatesTo which sounds perfect. But still nothing happens when I use them.
    My invoke looks like this (if e.g. using bpelx:headerVariable):
    <invoke name="InvokeSomeProcess" partnerLink="SomeProcess"
    portType="ns1:SomeProcessCallback" operation="onResult"
    inputVariable="someProcessInputVariable"
    bpelx:invokeAsDetail="no"
    bpelx:headerVariable="relatesTo,MessageIdHeader">
    </invoke>
    This worked perfectly in 10.3.4 which is what I'm migrating from (then using bpelx:inputHeaderVariable).
    Is this not working in 11g?? Or have I missed some crucial detail? Has anybody got it to work?
    Thankful for any help!
    Kind Regards
    Kerstin

    Ok, there are at least two bugs that are related to this problem:
    1) JDeveloper adds the wrong property when you add a header through the GUI tab "Headers" on an invoke activity. It should be "bpelx:inputHeaderVariable" and NOT "bpelx:headerVariable". (Bug #12541901).
    2) Currently in SOA Suite 11g the WS-Addressing headers are overwritten when the SOAP call is made. Enhancement Request #13718140 has been logged asking for this behaviour to be changed in a future release. This is currently being considered by Product Management.
    Oracle support suggests that you use OSB to set the headers.
    Kind Regards
    Kerstin

  • SOAP Headers

    Is it possible to access SOAP headers from with in the WebService backend, for
    example, from within the EJB implementation of the service itself?
    I know SOAP headers can be accessed from within the handlers.
    My goal is to somehow have access to certain header information from within the
    EJB.
    Also, if I employ a handler only implementation, and do away with the backend,
    how well would the container manage the handler classes (which are non-EJB) as
    opposed to the EJB implementation?
    I am using WLS 7.0 SP1.
    Thanks a lot.
    Suteertha

    no ideas?

  • How to Post XML Messages with SOAP Headers to a Trading Partner URL

    Hi All,
    Greeting to the Oracle B2B Community. We are currently working on how to post a Custom XML Message with SOAP Headers to a Trading Partner URL. I would really appreciate if anybody could provide me some inputs or links to some documentation on how to achieve the above requirement. The details are below:
    1. Our Internal Application generates a Flat File (PO Extract).
    2. The Extract then needs to be transformed to an XML Message. We are planning to use BPEL to do the transformation to XML Message.
    3. Once it is transformed to an XML message it needs to be posted to the Trading Partner URL as an HTTP Post and with SOAP Headers.
    We are planning to use B2B to do the posting but I am not sure on how to do the set-ups and what all parameter files in B2B needs to be updated in order to achieve the same. Also it is mandatory that we send SOAP Headers in the XML Message.
    Thanks In Advance for your help.
    Regards,
    Dibya

    Hello Dibya,
    As you are already doing the transformation from Flat file to XML in BPEL which is typically the capability of B2B, please use the Soap binding in BPEL to send the document to Trading partner.
    Rgds,Ramesh

  • How to Capture SOAP Header in BPEL

    Hi All,
    I have a requirement to pass a value from SOAP Header to BPEL and has to capture the value in BPEL and manipulate the data.
    In the receive activity i created a variable and assigned Header to it, but iam getting NULL value when i check the instance, this is the code i used in receive
    activity.
    <receive name="receiveInput" partnerLink="bpelsensor_client" portType="client:BPELSensor" operation="process" variable="inputVariable" createInstance="yes"
    bpelx:inputHeaderVariable="headerID"/>
    Any suggestions how to do this?

    How did you define headerID?
    You can also see an example here:
    http://java.net/projects/oraclesoasuite11g/pages/BPEL
    Arik

  • Web service response contains SOAP Headers with "mustUnderstand" true

    Hi
    I have a requirement where in I have to consume a web service as adaptive web service model, and while executing the service pass a mandatory parameter to the soap header. We are able to set the mandatory parameter to the soad header. We got the code snippet to do this from a wiki link
    http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ-Models-AdaptiveWebService#FAQ-Models-AdaptiveWebService-WhatarethefunctionalgapsofthecurrentAdpativeWSModelImporter%3F
    On executing the service now through web dynpro we are getting the below error
    "Web service response contains SOAP Headers with "mustUnderstand" true which are not handled by the client runtime"
    Any thoughts on how to handle this mustUnderstand attribute with some code snippet? Appreciate all help.
    Thanks,
    KN.

    Hi
    Have you found the workaround?
    Sorry for refreshing topic. Flag mustUnderstand ='1' in response is unussual thing.
    BR

  • Accessing Soap header in webservices

    Hi,
    My webservice needs to read a soap header "locale" and do some processing based on this soap header.
    I understand the concept of handlers..but anywhere I see examples, the handler handles it and returns the data back.
    My requirement is that once this locale is retrieved, each of the webservice method should be able to read this locale, and do some processing based on that, as they need to return the localized data.
    I am not sure if I am missing something, but not yet able to find a direct way of doing it..
    Any response would be highly appreciated..
    Thanks

    user10455639 wrote:
    Yes I can..what I still dont understand from yourr email is why are you askign this..
    "if you can get the soap header"
    Because any header we should be able to retrieve from this context...Because I saw the following statement from [JavaDoc | http://e-docs.bea.com/wls/docs103/javadocs/weblogic/wsee/jws/JwsContext.html#getInputHeaders()].
    <<<<<<<<<<
    ....The SOAP headers used by WebLogic Workshop to manage conversations are included in the list of headers returned.
    <<<<<<<<<<
    If it works, then just use it :) because it is public supported
    Edited by: LJ on Apr 23, 2009 10:04 PM
    Edited by: LJ on Apr 23, 2009 10:21 PM

  • Problem in setting Soap Headers

    Hi All,
    While setting SOAP Headers through Dynamic configuration, I'm getting errors, If i don't use the same, it is passing correctly....
    Here I tried to set SOAP Action from mapping....Is there any predefined settings required to do the same?
    Thanks

    Hi,
    What are the errors you are facing?
    Plz go through the link below
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Plz check out the steps you have performed, you can revert back in case of further queries.
    Reward points in case satisfied.
    Regards,
    Sushama

  • Accessing SOAP header information in a custom adaptor module

    Hi Guys,
    Could anyone point me in the direction of information on how to access the SOAP:Header element when writing a custom adaptor module for a http/ SOAP communication channel?
    I'm trying to add some WS-Security stuff which isn't available in XI 3.0.
    Many thanks,
    John

    The solution is as follows:
    Mark as Do Not Use SOAPEnvelope in the communication channel.
    It may be possible to use the SAP implementation of MessageFactory, SOAPEnvelope etc., I forced XI the Apache Axis implementation, a thread on which can be found here Link: [Accessing SOAP header information in a custom adaptor module;
    The SOAP Envelope is created by
    javax.xml.soap.MessageFactory mf= org.apache.axis.soap.MessageFactoryImpl.newInstance();
    This doesn't work it creates a com.sap.engine.services.webservices.jaxm.soap.SOAPMessageImpl
    org.apache.axis.message.SOAPEnvelope env = new org.apache.axis.message.SOAPEnvelope();
    org.apache.axis.Message iSoapMessage = new org.apache.axis.Message(env);
    SOAPMessage sm = iSoapMessage;
    SOAPBody iBody = se.getBody();
    if(iBody!=null)
         iBody.addDocument(iDoc);
         addDocument failed for some reason when called in XI returning
         Exception caught by adapter framework: Exception in method process.
         The code below is copied straight from the addDocument method, but it works.
         org.w3c.dom.Element iDocRoot= iDoc.getDocumentElement();
         org.apache.axis.message.SOAPBodyElement bodyElement = new org.apache.axis.message.SOAPBodyElement(iDocRoot);
         iBody.addChildElement(bodyElement);
    In order to get a document representation of the Envelope you can use
    Document iEnvelopeDoc = ((org.apache.axis.message.SOAPEnvelope)env).getAsDocument();
    You are now in a position to add or adjust the SOAP Envelope as your require. It enabled me to add WS-Security information to a message.
    It is normally possible to use javax.xml.transform.Transformer on the various classes SOAPEnvelope, SOAPBody etc. as they implement Node. However doing this in XI caused a crash.
    The final document can be then be set in the xmlPayload before being sent out the door.
    Hope this helps someone,
    John

  • Securing web services SOAP headers against OWSM policy

    Hi,
    I need to authenticate the user against the OWSM policy. The caller will pass username and password in SOAP headers and I need to attach WSS policy to my exposed web service.
    How to extract the Header information and then validate them against the policy.
    A simple HelloWorld sample will be of great help.
    regards
    Sanjeev

    Hi,
    For service authentication add policy wss_username_token_service_policy to client composite.Create user in security realms in adminstration console.
    While testing the service select wss username token option under security tab and test with valid credentails or from, soap UI
    <wsse:Security 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 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>USER CREATED IN SECURITY REALMS</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PSWD ENTERED FOR THE SAME USER IN SECURITY REALMS</wsse:Password>
    </wsse:UsernameToken></wsse:Security> WITH INPUT

  • Access SOAP:Header section

    Hello,
    I need to call a WebService with some extensions in the SOAP:Header. I don't find a solution without a custom develop Adaptermodul which renders the whole SOAP request and uses the SOAP Adapter without the SOAP functions.
    What do you think ?
    Regards,
    Gerald

    Hi,
    We have the same problem with SP14.
    Looks like the soap adapter can't handle soap headers correctly.
    A workaround may be to use the http adapter instead and generate the xml envelope messages for request and parsing the response. We have tried this for document based soap and it works.
    Obbviously you would like to have the soap adapter fixed so it can support soap headers.
    Best regards otto

  • Passing HTTP Headers from BPEL to a RESTFul service in SOA 11g PS2.

    Hi All,
    We have the following requirement.
    We need to pass the following headers to RESTFul service.
    x_invensys_wss_username = "Some UserName"
    x_invensys_wss_password = "Some Password".
    I tried to first pass username and password properties by following below post.
    Attach Http headers in BPEL Process
    Specifically below steps..
    Hi,
    If you are talking about how to invoke a secured webservice...please follow this...
    After creating the reference for your secured webservice in your composite, right click on the composite and say configure web service policies...
    Add the security policy named "oracle/wss_http_token_client_policy"
    And also, for the reference, create two binding properties
    1. oracle.webservices.auth.username
    2. oracle.webservices.auth.password
    For the above two properties, provide the appropriate values.....
    Please test the same after making this changes and let me know....
    Thanks,
    Narsing Pumandla
    ======================================================
    Somehow i don't see the headers getting added to the call.
    The service i am calling don't really need these headers.But the URL we will be calling shortly for the real application need them.
    Can someone let me know whether this SOA version supports this or not.?
    If yes , Then what is the best way to solve this issue.[i.e Able to send hardcoded values and also user specified values.]
    Thanks,
    Sid.

    I am using this URL : api.geonames.org/postalCodeSearch?postalcode=90110&username=siddhardha
    I see below message in audit trail.Not sure why the headers are not visible.
    Am i missing something which is very fundamental.?
    <messages>
    <Rest_InputVariable>
    <part name="Input">
    <Input>
    <postalcode>90110</postalcode>
    <username>Siddhardha</username>
    </Input>
    </part>
    </Rest_InputVariable>
    <Rest_OutputVariable>
    <part name="geonames">
    <geonames>
    .....results.............
    </geonames>
    </part>
    </Rest_OutputVariable>
    </messages>
    Edited by: Siddhardha M on Jul 19, 2012 5:44 AM

  • Could not access SOAP header - sending sopa message using weblogic

    i am using saaj to send a SOAP message ,through weblogic, i am getting an error like below
    Could not access SOAP header
    what should i do for sending a soap message using weblogic

    You're going to have to provide many more details than that. If it's useful, you could go here and read all the documentation books covering web services.

  • Is there any way to pass SOAP Headers ?

    I have created a Web Service based on a Portal Service using the project wizard. I find that SOAP headers (<SOAP-ENV:Header>) are not passed in the SOAP Envelope while calling the Web service. Is it possible to do this ?
    Thanks in advance. Any suggestion is appreciated.

    I would like to know this as well.
    I am trying to pass username and password to a target web-service that requires this information to be in the Header section of the SOAP request.
    I am using EP 6.0.   Does anyone know if this can be done in  EP 7.0?

  • Send Extra Information to SOAP Headers

    Does anybody know what Java class I should extend to send extra information to the SOAP headers that are being sent to the EDK API?
    I am trying to pass the extra name=value pairs added to the querystring to be passed to portlets via EDK.
    Oguz

    Hi Oguz,
    Could you explain a bit more what you want information you want to send to the portlets? Normally you can use the portal's admin UI to configure what user info, prefs, and portal values (login token, SOAP end point etc..) to a given portlet. This is configurable in the Web Service Remote Portlet portal admin object.
    ross

Maybe you are looking for