Read SOAP Header Information

Hello All,
We want to read SOAP header from incoming message. We followed blog from William to use the option "Do not use SOAP Envelop". However, we are not sure if we need to modify Sender Interface to include Envelope / Header in the message structure itself.
How to Read SOAP Header Information
If we modify the message structure , it changes the WSDL as well and generating request message something like below :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aif="urn://transport.nsw.gov.au/test/poc/aif">
   <soapenv:Header/>
   <soapenv:Body>
      <aif:Envelope>   <------- Added by Modifying the structure
         <Header>
            <FileType>?</FileType>
         </Header>
         <Body>
            <MessageHeader>
               <!--Optional:-->
How can we use  "Do not use SOAP Envelop" feature without modifying the WSDL structure?
If we don't modify the message structure , it is failing to identify the receiver and also we would not be able to see the fields while doing graphical mapping.
Thanks !!

Hi,
Did you check the namespaces in your receiver determination? In interface determination, this could be solved by creating another mapping. Which PI version are you using?
Regards,
Mark

Similar Messages

  • SOAP header information [continued]

    Dear,
    It all started here Get SOAP header information
    The fact is that I get the WSDL delivered and I need to upload that into the ESR.
    Next step is to create/generate a Service Interface.
    What I see in the WSDL binding
    After I generated a Service Interface
    Where is my SOAP header part? It seems to be gone in the Service interface?
    I tried this for both SOAP 1.1 and 1.2. Both the same phenomenon.
    Any suggestions?
    Thanks a lot
    Kind regards, Dimitri

    Hello Dimitri,
    Have you got any solution of the issue ?
    I think William's blog answer's that :
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/07/30/how-to-read-soap-header-information
    However, It suggests to modify XML structure for sender interface as well. By doing so , it gives other challenge as described below :
    If we modify the message structure , it changes the WSDL as well and generating request message something like below :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aif="urn://transport.nsw.gov.au/test/poc/aif">
      <soapenv:Header/>
      <soapenv:Body>
          <aif:Envelope>   <------- Added by Modifying the structure
             <Header>
                <FileType>?</FileType>
             </Header>
             <Body>
                <BusinessPartner>
                   <!--Optional:-->
    How can we use  "Do not use SOAP Envelop" feature without modifying the WSDL structure?
    If we don't modify the message structure , it is failing to identify the receiver and also we would not be able to see the fields while doing graphical mapping.
    Let me know if you got any other alternative.
    Thanks & Regards,
    Dijesh Tanna

  • 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

  • Extension of Standard SOAP Header Information in SOAP Adapter

    We are currently trying to call an eBay Web Service via SAP XI and we are using the SOAP Adapter in XI to achieve this.
    The following Authentication Information is required in the SOAP Header for accessing the eBay Web Service:
    - Token
    - ApplicationID
    - DevelopmentID
    - CertificationID.
    Unfortunately, the standard SOAP Adapter supports only certain SOAP Header Information (like User Authentication or Certificate Authentication).
    Is it possible to extend the SOAP Header Information in the SOAP Adapter (or somewhere else in XI) beyond the standard configurations?
    Thanks for your support.
    Alexander Bange

    Hi Jin,
    thanks for your input and sorry for my late reply but I wanted to wait for feedback from SAP who actually confirmed your recommendation.
    I had a second thought about this and it came to my mind that I actually don't want to extend the SOAP Header elements but simply fill the mentioned authentication elements with values. This cannot be done in the message mapping as only the SOAP body elements (i.e. the payload) can be mapped.
    Do you know if and how I can fill the SOAP header elements with values in XI?
    I already tried to include this information as fixed values in the WSDL description and load it into XI. Then I looked into the WSDL description and an error message occured stating that XI could not parse the XML Document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException:  = expected in attlist(:main:, row:18074, col:54)).
    If there is no solution for the latter, I will have to try nosoap solution. Still this would be a little awkward.
    Thanks again for your valuable support.
    Best Regards.
    Alex

  • Read SOAP Header tag

    Hi,
    I'm using with great success JDEV9.0.3prod for create and deploy web services. I maked all with wizard.
    All work, but now I would read and manage SOAP header tag.
    This is the question: how is possible to read the header tag of the SOAP Message, using jdev wizard?
    Any help would be very appreciated.
    Thank in advanced.
    massimo

    Unfortunately, the JDev wizards don't help access the header characteristics, yet.
    It is further complicated in that the Oracle9iAS Web Services implementation right now does not have a good way to get the header information, however, the Apache SOAP implementation that also ships with Oracle9iAS does.
    As we go forward to JAX-RPC the API's for the header will be exposed. If absolutely necessary now, you can use the Apache SOAP implementation (we are actually at 2.3.1) so the doc at xml.apache.org on Apache SOAP and pointers to headers should give you an idea of how to approach it.
    Sorry I don't have any code samples to point you at.
    Mike.

  • Get SOAP header information

    Dear,
    In our synchronous scenario SOAP <-> SAP PI <-> ABAP proxy, I face a problem reading the SOAP header from the incoming message.
    PI version used is 7.11
    This is how the incoming SOAP header looks like
    What I need is the content of field UserId.
    Already tried a lot and also ticked this option in the sender SOAP adapter: Do Not User SOAP Envelope.
    If I do that, I get an error saying premature end of file.
    Any lead is welcome.
    Thanks a lot!
    Dimitri

    Hi Dimitri,
    Have you tried to set a technical name in the ASMA attributes (Configuring the Sender SOAP Adapter (SAP Library - SAP NetWeaver Exchange Infrastructure) and later take this variable with the dynamic configuration during the mapping?
    I havent tried it, it's only an idea.
    Regards.

  • Reading MP3 header information from file

    Hi,
    Im currently using the JMF bean to play a specified location. Such as a media player would do. Now I would like to read the ehader information of MP3 files - if provided as a source. How can I access this data ?
    thanks,
    detlef

    You need to read about the .DWG file format somewhere. Use some binary file editor like Ultraedit and try to understand the file's layout.
    Hint: if it is a binary format, do not use "readLine". Read the raw bytes and try to get the structure of the file piecewise.

  • Soap Header information

    Hi All,
    We are doing a CRM->XI->webservice(SOAP) scenario. I need to put in 2 headers in the SOAP envelope. The 2 headers are like identfiers (eg: trading partner). Is it enough if I set this in the adapter configuration Variable Header Name? If so How do I set the values.?
    For example: If need to set tradingpartner = “Dell” in the header of the SOAP envelope, how can I go about setting this?
    Thanks,
    Teresa

    Hi,
    You will have to create the SOAP envelope manually in your mapping!
    1. In the receiver SOAP adapter , select the option ,  "<b>Do Not Use SOAP Envelope."</b> When you select this option, the SOAP adapter will not embed your XML message with the SOAP envelope. Instead, it will expect the output of the mapping to have the SOAP envelope.
    2. Now, use a Java or XSL mapping and create the entire SOAP message out of your mapping. JAVa and XSL mapping do not validate the target message against the XSD.
    Regards
    Bhavesh

  • Creating Custom SOAP header in the Sender soap scenario

    Hello Experts,
    Currently i have a SOAP to RFC scenario . In which in the request parameter i have single input parameter. But as per the requirement we need to have some xml parameters in the soap header .
    So i want the soap request looks like below,
    <?xml version="1.0"?>
    -<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    -<SOAP-ENV:Header>
    -<ns0:TestHeader xmlns:ns0="http://testcustomer.com">
    -<MessageDetails>
    <ServiceType/>
    <ServiceAction>String</ServiceAction>
    <MessageRole rtype=""/>
    -<MessageSource>
    <SourceName/>
    <SourceID idtype=""/>
    </MessageSource>
    -<MessageDestinations>
    -<MessageDestination>
    <DestinationID idtype=""/>
    <DestinationName/>
    </MessageDestination>
    </MessageDestinations>
    <Property Name=""/>
    </MessageDetails>
    </ns0:TestHeader>
    </SOAP-ENV:Header>
    -<SOAP-ENV:Body>
    -<m:MT_CERT_IP xmlns:m="http://mydzit.gov.sa/zakat">
    <INPUT1>102140000007</INPUT1>
    </m:MT_CERT_IP>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Kindly let me know the steps, how can i achieve this ??
    I have referred the AddSOAPHeaderBean  module but still not received the needed output.
    Best Regards,
    Amit

    Hi Amit,
    My few cents.
    You have an example in Dimitri Sannen's blog Read SOAP header information doing the mapping with XSLT.
    Also, you have an other example like Dev Noronha suggestion, in William Li's blog How to Read SOAP Header Information
    Regards.

  • Dynamic Receiver Determination using Soap header

    Hi ,
       I am trying to use a field in SOAP Header to determine the receivers dynamically.
    1, Using XPATH gives me only values in the Payload and not the SOAP header. Is it possible to pull the value from the SOAP header to the payload and then do dynamic receiver determination.
    2. Using Context Object is it possible to transfer the value of the field in SOAP header to variable header Xheadername1 and then use it to determine the receiver. I am having problems in passing the value of the field in soap header to XHeadername1.
    Any help is appreciated and points will be awarded.
    Joe Vellaiparambil

    Hi Joe,
    This is a good blog by William, hope this is helpful.
    /people/william.li/blog/2009/07/30/how-to-read-soap-header-information
    Let us know if you need more information.
    Regards,
    Neetesh

  • Get data from SOAP Header in udf

    Hi,
    I want to get value of a SOAP header Runtime Field and use it in udf.
    The field I need is <SAP:EOReferenceInbound type="TID">. I think I need to use function getTransformationParameters() but I don't know how to use it.
    Can you help me to retrieve this value of SOAP Header in a mapping ?
    Thank you.

    Check this blog: /people/william.li/blog/2009/07/30/how-to-read-soap-header-information
    Make sure that your message structure is defined properly so that it even includes the header fields...otherwise it will throw an error....once you get the value in the field then transfer it as you like using the mapping.
    From the above blog:
    The SOAP sender communication channel gives us an option to send the complete SOAP XML, including the header. Then, we just
    need to construct a message type in the Enterprise Service Repository (ESR) or Integration Repository (IR) to represent the XML.
    With that, message mapping can be performed.
    Regards,
    Abhishek.

  • OSB get the untouched soap header  / body

    Hi
    I have usecase where I need to pass xml signature messages through the OSB. When I create a passthrough proxy and business service without a assign or other operation then the soap message is passed through and the message is valid.
    When I try to get the header and body of the soap message and put this in canonical message and serialize the header and body. then transports this to a other osb server where I try to reconstruct the original message then it fails.
    it looks like when I try to get the $header and $body variable the OSB adds some namespaces to it and changes the message a little bit. Is there a way to get the original header and body.
    thanks Edwin

    Check this blog: /people/william.li/blog/2009/07/30/how-to-read-soap-header-information
    Make sure that your message structure is defined properly so that it even includes the header fields...otherwise it will throw an error....once you get the value in the field then transfer it as you like using the mapping.
    From the above blog:
    The SOAP sender communication channel gives us an option to send the complete SOAP XML, including the header. Then, we just
    need to construct a message type in the Enterprise Service Repository (ESR) or Integration Repository (IR) to represent the XML.
    With that, message mapping can be performed.
    Regards,
    Abhishek.

  • How to modify the soap header of ebxml control?

    I need to change the soap header information of the ebxml control
    from
    <eb:CPAId>http://www.openuri.org/cpa</eb:CPAId>
    to
    <eb:CPAId>MyString</eb:CPAId>
    and I want to add some additional information to the header such as the wsse feature
    <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
    <wsse:UsernameToken>
    <wsse:Username>1234</wsse:Username>
    <wsse:Password>5678</wsse:Password>
    <Organization>abc</Organization>
    <Domain>DEFAULT</Domain>
    </wsse:UsernameToken>
    </wsse:Security>
    Does anyone know where I can change the type value?
    Thanks, Kun

    Your code works. But if I place the TextInput in the formItem
    and form tags, the Y value becomes 0. You can try this one:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Form paddingBottom="0" paddingTop="0"
    paddingRight="0">
    <mx:FormItem label="Title:">
    <mx:TextInput width="275" id="newSongTitle"/>
    </mx:FormItem>
    <mx:FormItem>
    <mx:Button id="submitSongData" label="Add Song"
    width="150"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Text text="{newSongTitle.x}" width="322"/>
    <mx:Text text="{newSongTitle.y}" width="322"/>
    <mx:Button label="set Y" click="{newSongTitle.y =
    newY.value}"/>
    <mx:NumericStepper id="newY" value="50" minimum="0"
    maximum="400"/>
    </mx:Application>

  • How to get SAMl assertion from SOAP Header and propagate user context to BW

    Hello to all,
    we implemented this scenario:
    3rdparty System to SAP PI 7.11 to SAP BW.
    sync. communication via SOAP Sender adapter and Receiver XI PROXY.
    We get a SAMl assertion in the SOAP Header from the 3rd-Party System.
    The SAP BW System could not read the Header information.
    How can we get the information of the SOAP Header in the PI System and send the usercontext via XI Proxy to the SAP BW system?
    Can we read the Header information in the SOAP adapter and mapping it to another field in the payload or Headerinformation which could read in the backend system in the proxy class?
    Thanks for your help and regards
    Martin

    Dear Fox,
    Thanks for your reply.
    Is it mandatory to have the Header elements and the message defined in the Mediator wsdl?
    At present I have not defined it in the WSDL.
    Thanks,
    Subin

  • Processing soap header in ejb, help me !!!

    Could anyone tell me how can i get the soap header information in ejb to process? I have implement the headercallback in the implementation bean and add the processheader method, but when i invoke the ejb method through proxy, the exception like "you must implement headercallback.." arise. Did i leave any step undone? Thank you very much!

    netbeans.org has a lot of resources on developing EJB. Just search at netbeans.org upper-right corner:
    http://www.netbeans.org/
    One of them is a 30-min tutorial:
    http://www.netbeans.org/kb/55/ejb30.html
    You can also read JavaEE Tutorial, especially the chapter Get Started with EJB:
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    -cheng

Maybe you are looking for

  • Faulty Nvidia GeForce 8600M GT  - Should I leave computer on?

    Hi All, I recently began encountering issues with my MacBook Pro, purchased April 2008. Never had any problems before, and a few day ago, I tried to use skype and green vertical lines appeared across the screen and the system froze. I did a hard shut

  • No video out from old iPhone/UniverslDock/CompositeCable

    Ok - what's up with this - I've got iPhone (the original one) with the latest update (2.0) connected to my TV via Apple Universal Dock and the Apple Composite Cable. I get audio, no video. What's up with this? I do remember a LOOooong time ago having

  • R/3 forms on Portal

    Hi, System: We have EP6SP2, ITS and R/3 4.7 installed on three diff machines. Situation: When I create SmartForm and call it in the portal via the ITS, automatically the output goes to Adobe Acrobat Reader from where I can print the form output. Prob

  • How do I put a drawer in the dock?

    I want to group my applications in the dock into drawers. I keep frequently used programs in the dock to make it quick to open. But I would also like to group (for example all the programs for photos) some applications into one dock space. There are

  • Help!!!!!using multiple submit form in java servlet

    I am trying to build a application where i have 2 submit buttons. This is what i want to do. This code is in html <html> <head> <script language="JavaScript"> function altSubmit() { document.MyForm.action = "Second.html"; </script> </head> <body> <fo