Access to SOAP Header/SOAP Envelope in OSB

We have a need where we need to copy the SOAP header request to SOAP header response. Is there a way to access SOAP Header/SOAP Env in OSB ?
Thanks,
Pavan
Edited by: user10413378 on Mar 6, 2010 7:14 AM

There is $header variable with headers:
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1093911
You can pass all headers through using "Get All Headers" option in Proxy settings and Transport Headers - Pass all Headers in your flow:
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125345

Similar Messages

  • SAP WebAS SOAP runtime cannot recognize empty soap:Header /soap:Header

    Hi expert,
    I 'm trying to send a SOAP request to SAP WebAS ABAP.  I found that if the WebAS cannot recongize <soap:Header/> but not <soap:Header></soap:Header>.   Any idea?  Is it a bug?  Thanks.
    Regards,
    Ken

    Resolved with the following blog
    /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi

  • SOAP Header based user/password authentication in OSB 11g Proxy Service

    Hi,
    I have implemented SOAP Header based authentication in my OSB 11g Proxy Service.
    In the Security settings of my AnySOAP(Soap 1.1) HTTP Proxy service, I have amde the following changes:
    1.
    In Transport Access Control link, i selected the User predicate, and provided an user already existing on weblogic server with following roles(AppTesters, Monitors, Operators).
    The AuthorizationProvider was XACMLAuthorizer
    2.
    Under Custom Authentication, I selected the Custom User Name and Password option, and provided the below mentiioned xpaths
    User Name XPath: ./*/*:Username/text()
    User Password XPath: ./*/*:Password/text()
    3.
    In Message Access Control link, i selected the User predicate with the same user as mentioned in Transport Access Control link.
    Now, when I am testing this service from OSB Test Console, I am providing the following input.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:N1="http://abcd.com/common/bodcomponents/transactional/model/1.0/">
    <soap:Header>
    <AuthHeader>
    <N1:Username>userXYZ</N1:Username>
    <N1:Password>passXYZ</N1:Password>
    </AuthHeader>
    </soap:Header>
    <soap:Body>
    <!-- body payload -->
    </soap:Body>
    </soap:Envelope>
    The response is "The invocation resulted in an error: ."
    The OSB server logs show the below error:
    ####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-387082> <Proxy service access denied (proxy: ABCD/Services/Common_HTTP_Proxy, subject: Subject: 0
    )>
    ####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Kernel> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-382004> <Failed to process request message for service ProxyService ABCD/Services/Common_HTTP_Proxy: com.bea.wli.sb.security.AccessNotAllowedException
    com.bea.wli.sb.security.AccessNotAllowedException
         at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:136)
         at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:117)
         at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:586)
         at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:329)
         at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
         at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
         at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
         at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
         at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
         at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
         at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
         at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
         at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please suggest where I am going wrong in this. I have cross checked the user/pass credentials with what I am giving in the input, and it is perfectly fine.

    I have added the Username and Password as follows, since the namespace declaration was required due to the namespace prefix 'N1' in the XPath
    declare namespace N1="http://abcd.com/common/bodcomponents/transactional/model/1.0/";./AuthHeader/N1:Username/text()
    declare namespace N1="http://abcdp.com/common/bodcomponents/transactional/model/1.0/";./AuthHeader/N1:Password/text()
    I have removed the Message Access Control conditions, have only kept Transport Access Control conditions.
    If i keep the condition in Transport Access Control as "Allow access to everyone", and test with proper credentials in the Username/Password tags in SOAP Header, then it works fine. However, if I try to give an incorrect password in the SOAP Header, it denies the access. So that means the XPaths given for Username/Password are working fine. The OSB logs show the below message
    +####<Feb 10, 2011 12:59:21 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000ef2> <1297322961536> <BEA-386008> <Message level username/password authentication failed: [Security:090304]Authentication Failed: User weblogic javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User weblogic denied>+
    However if i add the condition with predicate as "User" and user name argument as "weblogic", and try to pass the same in the SOAP Header as well with the correct password, it denies the access with below message in the logs.
    +####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-387082> <Proxy service access denied (proxy: ABCD/Services/Common_HTTP_Proxy, subject: Subject: 0+
    +)>+
    +####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Kernel> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-382004> <Failed to process request message for service ProxyService ABCD/Services/Common_HTTP_Proxy: com.bea.wli.sb.security.AccessNotAllowedException+
    com.bea.wli.sb.security.AccessNotAllowedException
    at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:136)
    at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:117)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:586)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:329)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

  • Access to SOAP header in synchronous SOAP response?

    Hi,
    Scenario: message received via synchronous SOAP adapter call.
    In the response which is sent back to the sender i can influence the SOAP body but not the SOAP header.
    Is there a possibility to manipulate/add/map the SOAP header in synchronous response messages?
    Thank you very much in advance for your hints.
    Greetings
    Michael

    Hi Christophe,
    per default PI is sending back something like this
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
         <SOAP:Header/>
         <SOAP:Body>
              Payload, which can be accessed via mapping
         </SOAP:Body>
    </SOAP:Envelope>
    but required are some fields in the Header tag like:
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
         <SOAP:Header>
                                   <SOAP:ABC>date</SOAP:ABC>
         </SOAP:Header>
         <SOAP:Body>
              Payload, which can be accessed via mapping
         </SOAP:Body>
    </SOAP:Envelope>
    Greetings
    Michael

  • Apache Axis Soap Envelope soap:Header

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
    <DataHeader xmlns="http://mySite/">
    <HeaderUsername>string</HeaderUsername>
    <HeaderPassword>string</HeaderPassword>
    </DataExportHeader>
    </soap:Header>
    <soap:Body>
    <ReturnDataList xmlns="http://mySite/">
    <functionName>getAll</functionName>
    </ReturnDataList>
    </soap:Body>
    </soap:Envelope>
    I am using Apache Axis, how can i embed DataHeader{HeaderUsername, HeaderPassword} in my request? Thanks,

    I can generate the code from .wsdl by using JAP+RPC, but there is not Header class in the code. Any help?

  • Create/access 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>

    Also facing the same problem - has anyone found an answer?
    Thanks,

  • How can I get SessionID from SOAP Header in MessageMapping

    Hello experts,
    I've got a Abap Proxy --> PI --> WebService scenario. I do the call to the web service and it returns me the data and a SessionID in the SOAP header. I've got a message mapping for the response, and in this message mapping I need to get this sessionID because I have to use it later.
    I have tried with a UDF with this code:
    String headerField = "";
    try
      String key="SessionID";
      java.util.Map map;
      // get runtime constant map
      map = container.getTransformationParameters();
      // get value of header field by using variable key
      headerField = (String) map.get(key);
    catch(Exception e){}
    if(headerField==null)
        headerField = "";
    return headerField;
    But it returns me nothing.
    In sxmb_moni I can see the sessionID (see attached file), so It should be possible to access it.
    How can I do to get this data????
    Many thanks.

    Thanks Indrajit.
    I have found a solution. I have to use the option: Do Not Use SOAP Envelope in my communication channel.
    But as I am using web services I have to create the SOAP Envelope in my mapping (in request and in response).
    I have created 2 xslt mapping files: one for request and one for response. The xslt mapping for the request it is placed in second position in my operation mapping. This xslt maping just move the fields and add the soap envelope (header and body, and inside the body places the data from 1st mapping).
    The response xslt mapping it is placed directly in my operation mapping (in response area). It transforms the SOAP response into my Message Type.
    Here you can find my xslt for request (sessionID, in0, in1 and in2 are fields from my source message type):
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope">
          <SOAP:Header>
         <ses:sessionIDHeader xmlns:ses="http://xml.apache.org/axis/session">
                 <sessionID><xsl:value-of select="*/sessionID"/></sessionID>
             </ses:sessionIDHeader>
          </SOAP:Header>
          <SOAP:Body>
          <ser:invokeService xmlns:ser="http://www.w3.org/2003/05/soap-envelope">
             <in0><xsl:value-of select="*/in0"/></in0>
             <in1><xsl:value-of select="*/in1"/></in1>
             <in2><xsl:value-of select="*/in2"/></in2>
          </ser:invokeService>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:stylesheet>
    Here is xslt for response (invokeServiceReturn,sessionIDare fields from my target message type):
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <ns1:MT_invokeServiceResponse xmlns:ns1="http://saras.com/pi/creditoycaucion">
            <invokeServiceReturn><xsl:value-of select="/*/*/*/invokeServiceReturn"/></invokeServiceReturn>
            <sessionID><xsl:value-of select="*/*/*/sessionID"/></sessionID>
        </ns1:MT_invokeServiceResponse>
      </xsl:template>
    </xsl:stylesheet>
    Kind Regards.

  • WSSE usename token not in the SOAP Header

    Background:
    Webservice with four methods; OpGet, OpCreate, OpGetList, OpSet. Setup a jcx with this webservice URL, generate a test harness from workshop, and running this test harness and looking at the SOAP messages being send and received to verify that the web services are working. The OpGet is working since it doesn't require user credentials. But the OpCreate is currently not working. Remedy is rejecting it because of access control.
    Problem #1:
    Need to pass the user credential in the SOAP header. Here's the required information in WSDL regarding Authentication.
    <wsdl:operation name="OpCreate">
    <soap:operation soapAction="urn:SimpleWebService/OpCreate" style="document"/>
    <wsdl:input>
    <soap:header message="s:ARAuthenticate" part="parameters" use="literal">
    </soap:header>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    Solution that I have implemented so far:
    I have setup a WSSE file with the simple username/password in the <wsSecurityOut> element and was expecting to see this in the SOAP Header element in the WSDL message. When I look at the SOAP message in the test harness that I have generated in Workshop, I don't see this credential information. I have set the "ws-security-service property to the wsse file. I know that the harness has seen the wsse file since it gives me warning about having the password in simple text without encryption.
    Shouldn't I be seeing this userNameToken information in the SOAP Header when I run the test harness (jws) from workshop? As you can see below (Problem #2) no SOAP header is being generated.
    Problem #2:
    I see that in the SOAP message that test harness is sending wrong "xsi:type" information. It seems to be sending the "StatusType" for all the parameters except the one "Status" where it needs to?
    SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <ns:OpCreate xmlns:ns="urn:SimpleWebService">
    <ns:Assigned_To xsi:type="ns:StatusType">donnab</ns:Assigned_To>
    <ns:Short_Description xsi:type="ns:StatusType">testing from weblogic 8.1 SP3 Workshop</ns:Short_Description>
    <ns:Status>New</ns:Status>
    <ns:Submitter xsi:type="ns:StatusType">donnab</ns:Submitter>
    </ns:OpCreate>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Here's the WSDL where the OpCreate is defined:
    <xsd:element name="OpCreate" type="s:CreateInputMap"/>
    <xsd:complexType name="CreateInputMap">
    <xsd:sequence>
    <xsd:element name="Assigned_To" type="xsd:string"/>
    <xsd:element name="Short_Description" type="xsd:string"/>
    <xsd:element name="Status" type="s:StatusType"/>
    <xsd:element name="Submitter" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>

    I've never been able to see that information because I assume Weblogic server strips it out the minute it receives it and uses it to authenticate the user against a principal in the server.
    You can get ahold of this info, though. In your .jws file, in workshop, add this as a context:
    /** @common:context */
    JwsContext context;
    In your web services method, access the context to get the username:
    context.getCallerPrincipal().getName();
    That will return a String w/ the username passed in the username token.
    -Becky

  • To populate SOAP Header

    Hi,
      We have a scenario proxy -> XI -> SOAP. In the receiver side we need to populate the soap header in the following format.
    <SOAP:Envelope>
    <SOAP:Header>
    <CustomTag1>fddgg</CustomTag1>
    <CustomTag2>uduh</CustomTag2>
    <CustomeTag3>yyyy</CustomTag3>
    <CustomTag4>ZZZZ</CustomTag4>
    </SOAP:Header>
    <SOAP:Body>
    ....Some data ...
    </SOAP:Body>
    </SOAP:Envelope>
        How can we achieve this in the receiver SOAP adapter. Can we achive this by ASMA.Thanks for all the inputs.
    Thanks And Regards
    Sripathi

    Hi Udo,
      When i imported my WSDL to external defnitions,all the methods got moved to my external defnitions. The problem
    i am facing now is i don't see the SOAP header elements( When i move one of this method) in my mapping objects to
    map the header elements.
    <SOAP:Header>
    <CustomTag1>fddgg</CustomTag1>
    <CustomTag2>uduh</CustomTag2>
    <CustomTag3>YYYY</CustomTag3>
    <CustomTag1>ZZZZ</CustomTag1>
    </SOAP:Header>
       Do you want us to create this data strucute mannually in the required format or is there any way in which i can access the header elements. Thanks for the input.
    Thanks And Regards
    Sripathi G Yogesh

  • Passing SOAP header while invoking a web service partner link from BPEL

    I followed the steps of adding bpelx.inputheadervariable. Which is supposed to add the soad header. But after running the BPEL process if I see the message in the console, I don't see the SOAP header. Is there any way to see how the SOAP header is passed or did I set it incorrectly?
    This is what the message looks like:
    <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:Header>
    <ns0:Context xmlns:ns0="http://www.informatica.com/wsh">
    <SessionId>[string]</SessionId>
    </ns0:Context>
    </soap:Header>
    <soap:Body>
    <ns0:StartWorkflow xmlns:ns0="http://www.informatica.com/wsh">
    <DIServiceInfo>
    <DomainName>[string]</DomainName>
    <ServiceName>[string]</ServiceName>
    </DIServiceInfo>
    <FolderName>[string]</FolderName>
    <WorkflowName>[string]</WorkflowName>
    <WorkflowRunId>[int]</WorkflowRunId>
    <WorkflowRunInstanceName>[string]</WorkflowRunInstanceName>
    <Reason>[string]</Reason>
    <Attribute>
    <Name>[string]</Name>
    <Value>[string]</Value>
    </Attribute>
    <Key>
    <Key>[string]</Key>
    <mustUse>[boolean]</mustUse>
    </Key>
    <ParameterFileName>[string]</ParameterFileName>
    <Parameters>
    <Parameters>
    <Scope>[string]</Scope>
    <Name>[string]</Name>
    <Value>[string]</Value>
    </Parameters>
    </Parameters>
    <RequestMode>[ETaskRunMode]</RequestMode>
    <TaskInstancePath>[string]</TaskInstancePath>
    <IsAbort>[boolean]</IsAbort>
    <OSUser>[string]</OSUser>
    </ns0:StartWorkflow>
    </soap:Body>
    </soap:Envelope>
    I am trying to invoke the 'startworkflow' operation of Informatica web service Dataintegration.wsdl
    Edited by: user611166 on Apr 1, 2010 10:10 AM

    Hi,
    Try using obtunnel with your bepl console.
    Alternatively, if your server is on unix/ linux, try tcpdump to capture packets to a particular server and then open the file in wireshark to analyse the contents.
    Wish SOA suite would allow us to view this by default!
    Regards,
    Sappy

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

  • Error during parsing of SOAP header

    Hi all,
    I have configured the j-meter to send an http request to inegration engine of PI.
    The request xml that I am sending is as follows:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    <SOAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30"
    versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1">
    </SOAP:Main>
    </SOAP:Header>
    <SOAP:Body>
    <ns1:UnitOfMeasure xmlns:ns1="urn:sapappl:mdm:cp:eame:masterdata:uom:620">
    <Record>
    <FinishedMaterialCode>000000000000000233</FinishedMaterialCode>
    <BaseUOM>KG</BaseUOM>
    <AlternateUOM>GEB</AlternateUOM>
    <UnitsInAlternateUOM>100</UnitsInAlternateUOM>
    <UnitsInBaseUOM>2268</UnitsInBaseUOM>
    <Active_Deleted></Active_Deleted>
    </Record>
    </ns1:UnitOfMeasure>
    </SOAP:Body>
    </SOAP:Envelope>
    I am getting the following response from the XI:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    </SOAP:Header>
    <SOAP:Body>
    <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during parsing of SOAP header</faultstring><faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail><SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSER"/><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>System error in parser
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    </SOAP:Body>
    </SOAP:Envelope>
    Any idea as to why PI is not able to parse the request header?
    Thanks,
    Amit

    Hi,
    Better to take WSDL from PI(ID window) and try.

  • Add field inside SOAP header PI 7.1

    Hello,
    by proyect needs we need to add into SOAP header some dynamic information
    (Web Services calls to target systems from PI 7.1). This information is
    needed in target application for validating permissions of the web
    services calls.
    The tags are
    <soap:Header>
    <CarHeader xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
    <TicketCar>xxxxxxxxxxxxxxxxxxxxxx......</TicketCar>
    </CarHeader>
    </soap:Header>
    TicketCar's value (xxxxxx....) will be different in each call.
    We think that this is not possible with standar or Axis PI SOAP receiverchannel and a solution could be making a Abap mapping for composing the
    SOAP call with this tags and values, and in the comunication channel
    check the parameter "Do not use SOAP Envelope".
    It's rigth? Is there any other solution for doing it?
    An example of a call will be:
    <?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:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
    <CarHeader xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
    <TicketCar>C4A8A61D86C56DC27......</TicketCar>
    </CarHeader>
    </soap:Header>
    <soap:Body>
    <E000xx xmlns="http://xxxxx.xxxxxxxx.xxx.org/">
    <_request>
    <NumeroExpedienteAdministrativo>xxx</NumeroExpedienteAdministrativo>
    <CodigoDocumentoInterno>xxx</CodigoDocumentoInterno>
    <Status>xx</Status>
    <NumeroExpedienteContable>xxx</NumeroExpedienteContable>
    </_request>
    </E000xx>
    </soap:Body>
    </soap:Envelope>
    Any idea will be welcome
    Edited by: Ramon Coma Alcantara on Feb 2, 2010 4:15 PM

    Hi Ramon,
    The axis adapter comes with a convenient header insertion handler where you can insert an arbitrary header using a template.
    For example, you can define a template like this in the module configuration.
    <x:header xmlns:x="urn:x"><me>i say </me><you>you say </you></x:header>
    where , , ... are variable place holders.
    and you associate these variables with any context value available in the message.
    For example, when you pass Hello and Bye for these variables, you soap message will get the header:
    <x:header xmlns:x="urn:x"><me>i say Hello</me><you>you say Bye</you></x:header>
    You can look at the examples described in Note 1039369 Axis Adapter FAQ.
    As I said before, the mileage you can go with the do-not-use-envelope mode is very limited. But if you are happy with it, why not.
    Best regards, Yza

  • How to add a custom element to a SOAP Header in c#

    I am new to SOAP and web-services, and not an expert on c# either so sorry if I have made an infuriatingly simple error.
    I am calling several web-services and I now need to add an element called *pcimask* to the SoapHeader in order to get a response that is PCI Compliant.
    The web-services/WSDL don't expose this property so I guess I need to add it at runtime.
    My application creates SOAP messages like the below: (the Soap Request and Response are output into a text file by a SOAP Logging class)
    <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:Header>
    <AutHeader xmlns="http://edb.com/ws/WSCommon_v21">
    <SourceApplication>myApp</SourceApplication>
    <DestinationApplication>theirApp</DestinationApplication>
    <Function>CardCreate</Function>
    <Version>3.0.0</Version>
    <ClientContext>
    <userid>myID</userid>
    <credentials>SecureToken</credentials>
    <channel>NBA</channel>
    <orgid>123456</orgid>
    <orgunit>654321</orgunit>
    <customerid />
    <locale xsi:nil="true" />
    <ip>123.456.789.012</ip>
    </ClientContext>
    </AutHeader>
    </soap:Header>
    As I understand it, I need to add an element `pcimask="true` to the
    <ClientContext element, and it must be after the <ip>
    However the wsdl doesn't expose this as a property.
    So I have looked at the below resources:
     Bytes.com - how-add-soap-header-soap-message
     Stackoverflow: (18980689) adding-custom-soapheader-in-c-sharp-for-a-web-service-call
     Stackoverflow: (4035423) add-child-elements-to-custom-soap-header-in-spring-ws
    and I came up with a little class inside my `common.cs` as below:
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    namespace EvryCardManagement
    [XmlRoot(Namespace = "http://edb.com/ws/WSCommon_v21")]
    [SoapHeader("EDBHeaderType", Direction = SoapHeaderDirection.In)]
    public class CardCreateEx : SoapHeader
    public string Value;
    public CardCreateEx pcimask;
    public static class Common
    public static bool closeMe { get; set; }
    public static int iMQRowID;
    public static string impNme;
    public static string impPwd;
    and I wanted to try and use it in my code that creates the SoapHeader as below:
    private EDBHeaderType wsSoapHeader()
    EDBHeaderType wsSoapHeader = new EDBHeaderType();
    /* ClientContext */
    ClientContextType clientContext = new ClientContextType();
    clientContext.userid = edb_service[0].userid;
    clientContext.credentials = Common.SOToken;
    //clientContext.pc
    clientContext.orgid = edb_service[0].orgid;
    clientContext.orgunit = edb_service[0].orgunit;
    clientContext.customerid = "";
    clientContext.channel = edb_service[0].channel;
    clientContext.ip = edb_service[0].ip;
    /* PCI MASK added to ClientContext in header; P-02925; Jan 2015 */
    CardCreateEx cardCreateExt = new CardCreateEx(); // P-02925; Jan 2015
    cardCreateExt.Value = "true";
    /* EDBHeader */
    wsSoapHeader.SourceApplication = edb_service[0].SourceApplication;
    wsSoapHeader.DestinationApplication = edb_service[0].DestinationApplication;
    wsSoapHeader.Function = edb_service[0].Function;
    wsSoapHeader.Version = edb_service[0].Version; // P-02925; Oct-Nov 2014
    wsSoapHeader.ClientContext = clientContext;
    return wsSoapHeader;
    but I get a build error:
        Attribute 'SoapHeader' is not valid on this declaration type. It is only valid on 'method' declarations.
    so what is the correct way to do this?

    Hi,
    >>Attribute 'SoapHeader' is not valid on this declaration type. It is only valid on 'method' declarations.
    Base on this situation, just as the error message says, the 'SoapHeader' attribute can only use on method, such as:
    [SoapHeader("myHeader", rection=SoapHeaderDirection.InOut)]
    //Receive any SOAP headers other than MyHeader.
    [SoapHeader("unknownHeaders",Required=false)]
    public string MyWebMethod() {
    return "Hello";
    For mire information:
    http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapheader(v=vs.110).aspx
    Besides, about Defining and Processing SOAP Headers:
    http://msdn.microsoft.com/en-us/library/77hkfhh8(v=vs.71).aspx
    http://stackoverflow.com/questions/18980689/adding-custom-soapheader-in-c-sharp-for-a-web-service-call
    Regards

Maybe you are looking for