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.

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

  • 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

  • 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

  • Sender SOAP adapter: get soap header data

    Hi,
    I've been going through various posts and blogs here on SDN + looked in the how to guide for SOAP adapter, but still find it quite difficult to actually find out how to do it. I've tried to follow recommendations seen, but it doesn't add up.
    So can someone please tell me how to get an element situated in the SOAP header of the request sent to XI via sender soap adapter?
    Let's for instance say the request looks like this:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Header>
              <SSN>1234567890</SSN>
         </SOAP-ENV:Header>
         <SOAP-ENV:Body>
              <event>
                   <elem1>data 1</elem1>
                   <elem2>data 2</elem2>
                   <elem3>data 3</elem3>
              </event>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    How can I get the data in the SSN-header element at mapping time?
    I'm sure this can be done by using adapter modules as the first step adapter, but I prefer doing it at mapping time if possible.
    Best Regards,
    Daniel

    I solved it on my own now. My missing link was the fact that I'm using XMLSPY to send request and thus need to replace all '&amp;' with & in Connection Endpoint.
    Message was edited by:
            Daniel Engsig-Karup

  • Is there a way to get SOAP header in bpel?

    Hi,
    My web service returns a SessionID contained in the SOAP header. In Oracle PM, is there a way I could extract the SOAP header, or manipulate the SOAP header when invoking the web services? Any information would be appreciated.
    Thanks!
    Feng

    Edwin,
    I was trying your second approach, which utilizes the bpel extension to hold the header info, but with no luck.
    The provided sample (Salesforce Flow) works well, and I can see the SOAP header using TCPMonitor. Then I created a simple echo service (using bpel) to replace the Salesforce.com Enterprise Web Services, and invoke the echo service from a bpel process with the same bpel extension. However, no header was sent out.
    I guess there are something I was missing. Attached please find the wsdl file of the echo service, as well as the bpel files. Could you give me some idea what I did wrong? Or do you have any documentation about the bpel extensions?
    Thanks a lot for the good support!
    Feng
    echo.wsdl
    <?xml version="1.0"?>
    <definitions name="echo"
    targetNamespace="http://acm.org/samples"
    xmlns:tns="http://acm.org/samples"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    >
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE DEFINITION - List of types participating in this BPEL process
    The BPEL Designer will generate default request and response types
    but you can define or import any XML Schema type and use them as part
    of the message types.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://acm.org/samples"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="echoRequest">
    <complexType>
    <sequence>
    <element name="input" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="echoResponse">
    <complexType>
    <sequence>
    <element name="result" type="string"/>
    </sequence>
    </complexType>
    </element>
    <!-- Header Elements -->
    <element name="SessionHeader">
    <complexType>
    <sequence>
    <element name="sessionId" type="xsd:string"/>
    <element name="InvokeID" type="xsd:string"/>
    </sequence>
    </complexType>
    </element>
    <element name="QueryOptions">
    <complexType>
    <sequence>
    <element name="batchSize" type="xsd:int" />
    </sequence>
    </complexType>
    </element>
    <element name="SaveOptions">
    <complexType>
    <sequence>
    <element name="autoAssign" type="xsd:boolean"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MESSAGE TYPE DEFINITION - Definition of the message types used as
    part of the port type defintions
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <message name="echoRequestMessage">
    <part name="payload" element="tns:echoRequest"/>
    </message>
    <message name="echoResponseMessage">
    <part name="payload" element="tns:echoResponse"/>
    </message>
    <!-- Header Message -->
    <message name="Header">
    <part element="tns:SessionHeader" name="SessionHeader"/>
    <part element="tns:SaveOptions" name="SaveOptions"/>
    <part element="tns:QueryOptions" name="QueryOptions"/>
    </message>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PORT TYPE DEFINITION - A port type groups a set of operations into
    a logical service unit.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- portType implemented by the echo BPEL process -->
    <portType name="echo">
    <operation name="process">
    <input message="tns:echoRequestMessage" />
    <output message="tns:echoResponseMessage"/>
    </operation>
    </portType>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="echo">
    <plnk:role name="echoProvider">
    <plnk:portType name="tns:echo"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    echo.bpel
    <!-- echo BPEL Process [Generated by the Oracle BPEL Designer] -->
    <process name="echo" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:cx="http://schemas.collaxa.com/xpath/extension">
         <!-- ================================================================= -->
         <!-- PARTNERLINKS -->
         <!-- List of services participating in this BPEL process -->
         <!-- ================================================================= -->
         <partnerLinks>
              <!-- The 'client' role represents the requester of this service. -->
              <partnerLink name="client" partnerLinkType="tns:echo" myRole="echoProvider"/>
         </partnerLinks>
         <!-- ================================================================= -->
         <!-- VARIABLES -->
         <!-- List of messages and XML documents used within this BPEL process -->
         <!-- ================================================================= -->
         <variables>
              <!-- Reference to the message passed as input during initiation -->
              <variable name="input" messageType="tns:echoRequestMessage"/>
              <!--
    Reference to the message that will be returned to the requester
    -->
              <variable name="output" messageType="tns:echoResponseMessage"/>
         </variables>
         <!-- ================================================================= -->
         <!-- ORCHESTRATION LOGIC -->
         <!-- Set of activities coordinating the flow of messages across the -->
         <!-- services integrated within this business process -->
         <!-- ================================================================= -->
         <sequence name="main">
              <!-- Receive input from requester.
    Note: This maps to operation defined in echo.wsdl
    -->
              <receive name="receiveInput" partnerLink="client" portType="tns:echo" operation="process" variable="input" createInstance="yes"/>
              <!-- Generate reply to synchronous request -->
              <assign>
                   <copy>
                        <from expression="concat('echo: ', bpws:getVariableData(&quot;input&quot;, &quot;payload&quot;, &quot;/tns:echoRequest/tns:input&quot;))">
                        </from>
                        <to variable="output" part="payload" query="/tns:echoResponse/tns:result"/>
                   </copy>
              </assign>
              <reply name="replyOutput" partnerLink="client" portType="tns:echo" operation="process" variable="output"/>
         </sequence>
    </process>
    bpel process that invokes the echo service
    <!-- testHeader6 BPEL Process [Generated by the Oracle BPEL Designer] -->
    <process name="testHeader6" targetNamespace="http://acm.org/samples" suppressJoinFailure="yes" xmlns:tns="http://acm.org/samples" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:cx="http://schemas.collaxa.com/xpath/extension">
         <!-- ================================================================= -->
         <!-- PARTNERLINKS -->
         <!-- List of services participating in this BPEL process -->
         <!-- ================================================================= -->
         <partnerLinks>
              <!-- The 'client' role represents the requester of this service. -->
              <partnerLink name="client" partnerLinkType="tns:testHeader6" myRole="testHeader6Provider"/>
              <partnerLink name="echo" partnerLinkType="tns:echo" partnerRole="echoProvider"/>
         </partnerLinks>
         <!-- ================================================================= -->
         <!-- VARIABLES -->
         <!-- List of messages and XML documents used within this BPEL process -->
         <!-- ================================================================= -->
         <variables>
              <!-- Reference to the message passed as input during initiation -->
              <variable name="input" messageType="tns:testHeader6RequestMessage"/>
              <!--
    Reference to the message that will be returned to the requester
    -->
              <variable name="output" messageType="tns:testHeader6ResponseMessage"/>
              <variable messageType="tns:echoRequestMessage" name="i2"/>
              <variable messageType="tns:echoResponseMessage" name="o2"/>
              <variable name="header" messageType="tns:Header"/>
         </variables>
         <!-- ================================================================= -->
         <!-- ORCHESTRATION LOGIC -->
         <!-- Set of activities coordinating the flow of messages across the -->
         <!-- services integrated within this business process -->
         <!-- ================================================================= -->
         <sequence name="main">
              <!-- Receive input from requester.
    Note: This maps to operation defined in testHeader6.wsdl
    -->
              <receive name="receiveInput" partnerLink="client" portType="tns:testHeader6" operation="process" variable="input" createInstance="yes"/>
              <!-- Generate reply to synchronous request -->
              <assign>
                   <copy>
                        <from expression="12345">
                        </from>
                        <to variable="i2" part="payload" query="/tns:echoRequest/tns:input"/>
                   </copy>
                   <copy>
                        <from expression="1111">
                        </from>
                        <to variable="header" part="SessionHeader" query="/tns:SessionHeader/tns:sessionId"/>
                   </copy>
              </assign>
              <invoke partnerLink="echo" portType="tns:echo" operation="process" inputVariable="i2" bpelx:inputHeaderVariable="header" outputVariable="o2"/>
              <reply name="replyOutput" partnerLink="client" portType="tns:testHeader6" operation="process" variable="output"/>
         </sequence>
    </process>

  • Getting SOAP Header from Bytes

    Hi,
    I am fairly new to SAAJ. I have a MDB which is dequeing JMS BytesMessage. Below is the code piece:
        if (inMessage instanceof BytesMessage) {
                    // retrieve the object
                    msg = (BytesMessage)inMessage;
                    byte load = msg.readByte();  
          ....             Now I want to be able to cast this byte to SOAP message and retrive the SOAP header say using SAAJ. Fyi, here is the beginning of my message
    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
         <soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
              <wsa:MessageID>GES-6b05eb12e07804b6e54089beb6122767874ae</wsa:MessageID>
    Could you please show me how to tackle this?
    Thanks in advance,
    Mustafa

    I have had no problem calling an external web service from a JCD in 5.1.2 I have been able to access and set the fields of the header portion of this external web service as long as the WSDL for the web service has used an explicit header description. If the WSDL contains and implicit header (the header is described as a separate message) I have not been successful getting visibility to the header. See http://www.softwaresummit.com/2005/speakers/TostPracticalLessonsLearnedInWebServicesDesign.pdf pages 30 - 32 it has a nice summary about the difference for header descriptions. If CAPS is cooperating with you, you should be able to import the WSDL for the external web service, create a JCD that is going to call the web service, include the OTD for the web service in your JCD and then just follow the instructions in the eGate users guide to fire off the invoke of the web service.

  • Can't get SOAP Header parameter

    I am developing web services for Web Logic 9.2 server using JWS annotation. I am getting the following error when I run the service. the error is in ServiceResponse. Both Service Request and ServiceResponse is as following:
    Service Request
    =================
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>test </soapenv:Header>
    <soapenv:Body>
    <echoComplexType xmlns="http://example.org" xmlns:java="java:examples.webservices.complex">
    <struct>
    <java:IntValue>3</java:IntValue>
    <java:StringValue>string</java:StringValue>
    <!--Zero or more repetitions:-->
    <java:StringArray>string</java:StringArray>
    </struct>
    </echoComplexType>
    </soapenv:Body>
    </soapenv:Envelope>
    Service Response
    ================
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header />
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>[Server CodecHandler] Failed to decode Unable to find xml element for parameter: struct1</faultstring>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">weblogic.wsee.codec.CodecException: Unable to find xml element for parameter: struct1
    at weblogic.wsee.codec.soap11.SoapDecoder.checkNullElement(SoapDecoder.java:290)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:234)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:163)
    at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:116)
    at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:138)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:138)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:39)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:85)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:173)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:92)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    </bea_fault:stacktrace>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    The JWS source file is as following;
    package examples.webservices.complex;
    // Import the standard JWS annotation interfaces
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebResult;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    // Import the WebLogic-specific JWS annotation interface
    import weblogic.jws.WLHttpTransport;
    // Import the BasicStruct JavaBean
    import examples.webservices.complex.BasicStruct;
    // Standard JWS annotation that specifies that the portType name of the Web
    // Service is "ComplexPortType", its public service name is "ComplexService",
    // and the targetNamespace used in the generated WSDL is "http://example.org"
    @WebService(serviceName="ComplexService", name="ComplexPortType", targetNamespace="http://example.org")
    // Standard JWS annotation that specifies this is a document-literal-wrapped
    // Web Service
    @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
                   use=SOAPBinding.Use.LITERAL,
                   parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
    // WebLogic-specific JWS annotation that specifies the context path and service
    // URI used to build the URI of the Web Service is "complex/ComplexService"
    @WLHttpTransport(contextPath="complex", serviceUri="ComplexService", portName="ComplexServicePort")
    /** * This JWS file forms the basis of a WebLogic Web Service. The Web Services
    * has two public operations:
    * - echoInt(int)
    * - echoComplexType(BasicStruct)
    * The Web Service is defined as a "document-literal" service, which means
    * that the SOAP messages have a single part referencing an XML Schema element
    * that defines the entire body.
    * @author Copyright (c) 2005 by BEA Systems. All Rights Reserved.
    public class ComplexImpl
         // Standard JWS annotation that specifies that the method should be exposed
         // as a public operation. Because the annotation does not include the
         // member-value "operationName", the public name of the operation is the
         // same as the method name: echoInt.
         // The WebResult annotation specifies that the name of the result of the
         // operation in the generated WSDL is "IntegerOutput", rather than the
         // default name "return". The WebParam annotation specifies that the input
         // parameter name in the WSDL file is "IntegerInput" rather than the Java
         // name of the parameter, "input".
         @WebMethod()
         @WebResult(name="IntegerOutput", targetNamespace="http://example.org/complex")
         public int echoInt(
              @WebParam(name="IntegerInput",
                        targetNamespace="http://example.org/complex")
              int input)
              System.out.println("echoInt '" + input + "' to you too!");
              return input;
         // Standard JWS annotation to expose method "echoStruct" as a public operation
         // called "echoComplexType"
         // The WebResult annotation specifies that the name of the result of the
         // operation in the generated WSDL is "EchoStructReturnMessage",
         // rather than the default name "return".
         @WebMethod(operationName="echoComplexType")
         @WebResult(name="EchoStructReturnMessage",
                   targetNamespace="http://example.org/complex")
         public BasicStruct echoStruct(BasicStruct struct,
                   @WebParam(name="struct1", targetNamespace="http://example.org/complex", mode=WebParam.Mode.IN, header=true)
                   BasicStruct struct1)
              System.out.println("echoComplexType called");
              return struct;
    BasicStruct.java
    package examples.webservices.complex;
    /** * Defines a simple JavaBean called BasicStruct that has integer, String, * and String[] properties */
    public class BasicStruct
         // Properties
         private int intValue;
         private String stringValue;
         private String[] stringArray;
         // Getter and setter methods
         public int getIntValue()
              return intValue;
         public void setIntValue(int intValue)
              this.intValue = intValue;
         public String getStringValue()
              return stringValue;
         public void setStringValue(String stringValue)
              this.stringValue = stringValue;
         public String[] getStringArray()
              return stringArray;
         public void setStringArray(String[] stringArray)
              this.stringArray = stringArray;
         public String toString()
              return "IntValue="+intValue+", StringValue="+stringValue;
    Any help is appreciated.
    Thanks in advance.
    Regards,
    Sanjay

    I am getting a similar error.
    Were you able to resolve this ?

  • 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

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

  • 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

  • SOAP Header authentication in receiver SOAP

    Hi,
    we are interfacining a scenario where in receiver soap we are getting user name and pwd in header.
    my scenairo is proxy to soap and it is asyncronous.
    could you please tell me the solution how to do that. without header information it is working fine. i want what configuration i have to do to get the header information.
    thanks
    Laxmi Bhushan

    Hi Laxmi,
    follow this guide last section deploying SDA file using JSPM .
    If you are not able to see your SDA file then run the comand which i have mentioned iin last section.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00b4a020-4ae6-2c10-5a95-fed4ad9a4b60?quicklink=index&overridelayout=true
    Also  take care of the extension of .SDA file.
    Extract it properly in a folder . After adding content again create SDA and start deployement
    thanks
    sandeep

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

Maybe you are looking for

  • Weird behaviour while inserting in a table

    Hi All, I am coming across a wierd problem. We are using Oracle 10.2.0.3.0. There is a collection system where by we give snapshot of the entire database in a pre-requisite format. Recently a strange thing is happenning. When we try to insert into a

  • 2 ALVs in a single view

    How to use 2 ALVs in a Single view. I need to take refernce of them individually, so that i can confgure them, independant of each other Thanks, Selvakumar M.

  • HT4528 My phone was charging and now it won't power on. Any suggestions?

    I was charging my phone last night and was at 79% before I went to bed.  This morning the screen is black.  It won't power on.  I also connected it with my laptop that has itunes and it was not found.  Has anyone had this problem?  How do you fix it?

  • Erratic behaviour of Concurrent Managers

    We have PCP configured on 2 node EBS. We have recently started seeing that our FNDSM on node 2 stops working and also couple of other managers got deativated. When we try to start them manually they won't start. The only thing we do is to bounce appl

  • How do i get my contacts from my ipod to my textplus account

    i need help getting my contacts back on my textplus account