SOAP Header in SOAP Receiver adapter

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

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

Similar Messages

  • Handling SOAP HEADER using SOAP Receiver Adapter

    Hi Experts,
    I need to implement SOAP Receiver Scenario and passing ( Header fields  User, Password and token)  I have seen a lot of scenario using a XSLT Mapping, to handling the SOAP Header. So  need to help to understand some details:
    Suppose I need to implement the SOAP Header below? In this case I need add only the fields u201CUsername, Password and AuthenticationTokenu201D. I created the XSLT Transform, the source XML? Where I put it? Or can create it into Message Interface?
    Is it possible to do this in Java Mapping?
    Thanks!
    Best Regards
    Fábio Ferri
    <soap:Header>
          <v1:ExecutionHintHeader>
             <v1:Name></v1:Name>
             <!Optional:>
             <v1:Arguments>
                <!1 or more repetitions:>
                <v1:Argument Name="?" Value="?"/>
             </v1:Arguments>
          </v1:ExecutionHintHeader>
          <v1:CredentialsHeader>
             <!Optional:>
             <v1:Username>pi</v1:Username>
             <!Optional:>
             <v1:Password>jhjhjjhjhjius</v1:Password>
             <!Optional:>
             <v1:AuthenticationToken></v1:AuthenticationToken>
          </v1:CredentialsHeader>
       </soap:Header>

    You need to put XSLT mapping in 2° step mapping in request.
    SourceMessageRequest -> Message Mapping -> XSLT Mapping -> DestinationMessageRequest
    If you test mapping program, this should be working fine.
    In adapter module, put localejbs/AF_Modules/MessageTransformBean with parameter value text/xml; charset=utf-8 and correctly set Conversion Parameter "Do not use Soap Envelop"
    XSLT Request Mapping
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <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>
    <ServiceAuthHeader  xmlns="http://WIND.WEBSERVICES.DMS/">
    <Username>USER</Username>
    <Password>PASSWORD</Password>
    </ServiceAuthHeader>
    </soap:Header>
    <soap:Body>
    <xsl:copy-of select="*"/>
    </soap:Body></soap:Envelope>
    </xsl:template>
    </xsl:stylesheet>

  • OSB: Attach SOAP Header for SOAP Fault

    Hi,
    Is there a way to return OSB SOAP Fault with custom SOAP Header?
    Currently, when SOAP Fault happens, SOAP Header is not returned. I would like to insert some elements in the SOAP header and return when SOAP Fault happens.
    Thanks.

    Hi Eric,
    Thanks for your tips. It was helpful!
    I've managed to insert custom SOAP header to a SOAP fault.
    In service error handler,
    1. Construct custom header and replace header variable content
    2. Replace body content with fault variable
    3. Reply with failure
    Thanks.

  • 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

  • Envelop header for HTTP receiver adapter

    Hi,
    In one of the business scenario's XI has to send data to an external party using an envelope header(Sample document to be sent is given below.)
    <b>Message-ID:ABC.JavaMail.SYSTEM@ztxwmwspro02
    Date: Thu, 16 Oct 2003 17:02:04 -0400 (EDT)
    Mime-Version: 1.0
    Content-Type: multipart/related
    Content-ID: 4bafd2e2-7971-1000-a6a3-0fe8304d0001
    x-Date-Sent: 01 Dec 2005 11:26:47 CST referenceId:
    x-Document-Type: Error
    x-Priority: 5
    x-Correlation-Id: 4bafd2e2
    x-Request-Annotation: normal
    <Order>
      <OrderHeader>
        <OrderNumber>
          <BuyerOrderNumber>XXX</BuyerOrderNumber>
        </OrderNumber>
        <OrderIssueDate>20050223T12:00:00</OrderIssueDate>
    <OrderHeader>
    <Order></b>
    1) How can this be acheived?
    2) How/Where can i see the header data of the message that is being sent out by a receiver HTTP adapter?
    Regards,
    Siva Maranani

    hi Siva,
    Did you see this link ?? 
    http://help.sap.com/saphelp_nw04/helpdata/en/44/79973cc73af456e10000000a114084/frameset.htm
    it provides good information aboutPlain HTTP: Outbound Channel.
    cheers,
    Naveen

  • Extract SOAP Header from JMS Adapter PartnerLink

    Hi Chintan,
    I have next problem:
    I have a JMS queue. The message in this queue are "SOAP Message" with Body and SOAP Header.
    I have developed a "BPEL JMS service" with a JMS Adapter PartnerLink.I need extract SOAP Header from PartnetLink JMS Adapter, but with headerVariable into "Receive activity" it´s not work OK.
    Could anybody help me with this problems?
    Thanks a lot.
    Regards.

    HI,
    Try your luck at this link
    http://orasoa.blogspot.com/2007/09/using-custom-headers-in-bpel.html

  • HTTP 415 Unsupported Media Type with SOAP adapter trying to put SOAP header

    Hello,
    I am trying to put data into soap header using soap receiver adapter. Seems like building the complete soap message is the right way to go. Thus I wrote a java program to build the complete soap message (soap envelop, soap header and soap body which contains the message PI received from the sender). Mapping program works well. However when I ran the scenario, I got Error "SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Unsupported Media Type" when calling the receiver's web service (the SOAP receiver adapter CC have the "Do Not use SOAP Envelop" checked). Anyone knows why I got this error? From google, seems like this error is because the http's content-type is set to other type, rather than "text/xml". However in soap CC there is no option to control this.
    The message sent to the receiver is (after mapping);
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header>
    <SOAP-SEC:Signature xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" MyAttr="value">My Test Value</SOAP-SEC:Signature>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <ns1:UpdateEquipment xmlns:ns1="http://mycomp.com/mywebservice">
    <ns1:EquipmentNumber>000000012345</ns1:EquipmentNumber>
    <ns1:LicensePlate>654321</ns1:LicensePlate>
    </ns1:UpdateEquipment>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Anyone can help?
    Thanks

    When you check "Do Not use SOAP Envelop", the SOAP adapter chooses application/xml instead of text/xml.
    You can change the content type with help of the MessageTransformBean. You put the bean in the module chain of the receiver channel and add the parameter Transform.ContentType = text/xml
    See
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/57/0b2c4142aef623e10000000a155106/frameset.htm

  • Calling A Secured webservice using Username and password in the Soap header

    I want to call a secured webservice.
    The Username and password should be sent with the payload in the SOAP Header
    as
    <wsse:Security S:mustunderstand="0" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken wsu:Id="SecurityToken-XXXXXXXXXXXXXXXXXXXXXXXXX" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>uname</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">pwd</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    Can you please send me the steps?
    I tried with giving the username and password under Service Account.
    I tried to create a wspolicy under business service. But nothing works...
    Please help me at the earliest.
    Also please give me steps in sequence.

    Now i made sure that the endpoint is available!
    Now am getting this error:
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>BEA-380002: localhost1</faultstring>
    <detail>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380002</con:errorCode>
    <con:reason>localhost1</con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    Also in the invocation trace i can observe the following things:
    Under Invocation Trace:-
    ========================
         Receiving request =====> Initial Message context
         ===============================================
         under added header:-
         ==================
         <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         </soap:Header>
         under RouteNode1
    ================
         Route to "TargetMyService_BS"
    $header (request):-
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    Under Message Context changes:-
    *===============================*
    I can find this element also:-
    con:security>
    *<con:doOutboundWss>false</con:doOutboundWss>*
    *</con:security>*
    eventhough we enabled ws security, how the above tag can be false?
    I think its getting failed to populate the header with the required login credentials.
    The other doubt i have is:-
    =================
    I have chosen the service account type is static...is this right?

  • SOAP Header Security in Oracle Service Bus

    Currently we are in the process of implementing the SOAP Header Security through Oracle Service Bus. We have a requirement that BPEL need to call a external web service. That web service will be registered in OSB. While making the call, the OSB need to add the SOAP security header(user name & Pwd) in proxy service before forwarding the request to business service. Can you please help me find some information about that.

    Hi Manoj,
    The request payload which is going to the target is
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soapenv:Body>
    <man:GetDefaultRechargeValuesRequest xmlns:man="http://www.NII.com/ManagePrepaidRecharge/workflow/ManagePrepaidRecharge">string</man:GetDefaultRechargeValuesRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    whereas the target expects the soap header populated. the payload expected by the target is
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <gsa:Authentication xmlns:gsa="http://www.nextel.com.br/Wbs/Gsa">
    <gsa:Account>test</gsa:Account>
    <gsa:Password>test</gsa:Password>
    <gsa:Guid>f65748e63b01</gsa:Guid>
    </gsa:Authentication>
    </soap:Header>
    <soapenv:Body>
    <man:GetDefaultRechargeValuesRequest xmlns:man="http://www.NII.com/ManagePrepaidRecharge/workflow/ManagePrepaidRecharge">string</man:GetDefaultRechargeValuesRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    The Problem now is, when i call a business service(WSDL of the target) from a proxy service and when i set the above expression to the $header using replace action in the proxy service itself, the above expression,instead of going as a request to the business service, it is populated in the response.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <gsa:Authentication xmlns:gsa="http://www.nextel.com.br/Wbs/Gsa">
    <gsa:Account>test</gsa:Account>
    <gsa:Password>test</gsa:Password>
    <gsa:Guid>f65748e63b01</gsa:Guid>
    </gsa:Authentication>
    </soap:Header>
    <soapenv:Body>
    <ns0:GetDefaultRechargeValuesResponse xmlns:ns0="http://www.NII.com/ManagePrepaidRecharge/workflow/ManagePrepaidRecharge">
    <ns0:StandardHeaderBlock>
    <ns2:ServiceState xmlns:ns2="http://xmlns.oracle.com/apps/StandardHeaderBlock">
    <ns2:errorCode>SOA_ERR_TARGET_SYSTEM_FAILURE</ns2:errorCode>
    <ns2:errorDesc>
    OSB Service Callout action received an error response
    </ns2:errorDesc>
    </ns2:ServiceState>
    </ns0:StandardHeaderBlock>
    </ns0:GetDefaultRechargeValuesResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    Since the authentication details are not reaching the target, it is giving a target system failure. Can you suggest a remedy to this please.

  • Adding values to XI Soap Header

    Hi All,
    We have scenario, Soap to RFC. We are generating the wsdl for the ICO. We want the end system to send some values in the soap header(XI Soap header). We have used the keep header in the sender soap communication channel and added the value to the variable binding. When we generate the wsdl, there is no header in wsdl. We can only get the body.
    Kindly let us know if what we are doing is correct.
    Also please let us know how it can be  done.

    Hi,
    We want the end system to send some values in the soap header(XI Soap header). We have used the keep header in the sender soap communication channel and added the value to the variable binding. When we generate the wsdl, there is no header in wsdl. We can only get the body.
    Checking the Keep Header option will only include the XI header as part of the response message. It will not be included in the request message. The variable binding allows you to place three variable headers (HTTP Headers) that you can use in dynamic config, it will not populate the SOAP Header at all.
    If there is information in the SOAP Header that you need, you might as well run it in noSOAP mode by checking Do Not Use SOAP Envelope in your sender CC.
    Regards,
    Mark

  • Eclipse, Wsdl2Java and Soap Header

    Hi all.
    I'm developing the server side of a web service, whose wsdl was given to me by a third party.
    The wsdl defines several operations, and in each of them the input consists of a soap:header + a soap:body.
    Thus, in my implementation I have to deal with the soap:header, retrevieng the information carried inside.
    it's the first time I have to do that since I use Eclipse and its Wsdl2Java utility for skeleton code generation, and I can' t understand if this can be accomplished in this way.
    Infact, it seems to me that what eclipse generates is a skeleton by which it's not possible to "inspect-back" the soap:header, as it' already been parsed before (don't know where).
    So... the question is: can I develop my Web Service using eclipse (and probably changing something in the way I'm doing) or do I have to do it in another way?
    Any help will be very appreciated... thanks in advance!

    When invoking the wscompile tool use the option features:
    -features:wsi,explicitcontext
    for handling the soap:header.
    If you type: wscompile.sh -help you can get a listing of the options for the tool

  • How to Call HTTP Sender Adapter of Other Scenar from HTTP Receiver Adapter?

    Hi,
    I have a requirement to call HTTP Sender Adapter of Other Scenario from HTTP Receiver Adapter?
    or
    call SOAP Sender Adapter of Other Scenario from SOAP Receiver Adapter?
    i.e
    SOME SENDER - > PI - > HTTP Receiver - > calling -> HTTP Sender -> PI -> SOME RECEIVER
    SOME SENDER - > PI - > SOAP Receiver - > calling -> SOAP Sender -> PI -> SOME RECEIVER
    if any one can provide me the screen shot for those SOAP / HTTP Sender or Receiver ADAPTER.
    or Point me to Some article with Screenshots .
    That would be appreciated with Point.
    Regards
    PS.

    Solved .  .

  • In Receiver Mail Adapter ,how to ignore SOAP Header attachment

    HI Folks,
    Am using Receiver Mail Adapter and am getting 2 attachments.
    1. one is Soap header which contains Control records
    2. payload
    I want only Payload as attachment and need to ignore SOAP Header(AT00001.xml).
    The configuration is as below:-Trasport protocol : SMTP
                                                Message Protocol: XIALL
    Please provide Inputs.
    Thanks & Regards
    Ashok Reddy

    Hi Gagandeep,
    Scenario: File------>mail( Bypass scenario)
    i had posted file in FTP and am getting attachment properly but aditionally am getting ATT00001.xml as SoapHeader.this i need to ignore.
    PFB Module Parametrs i used:
    localejbs/AF_Modules/MessageTransformBean   LocalEnterpriseBean    transform
    Modulekey                      Parameterattribute                        value
    transform                      Transform.ContentDisposition            attachment;filename=”Pocr_860.txt”
    transform                     Tansform.ContentType                       text/plain
    Regards
    Ashok

  • SOAP Receiver Adapter - Read Header data on Synchronous Response

    I have a scenario - flat file to SOAP. The web service provider sends a response that contains data in the Header that I need to access. I have tried to use the "Do Not Use SOAP envelope" option on my receiver SOAP adapter, and I have configured my request message type to include the soap envelope elements. However I'm getting the following error from the web service
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Cannot process the message because the content type 'application/xml' was not the expected type 'text/xml; charset=utf-8'.
    I've read some inputs on this error that say to use the Transform bean to adjust the content to text/xml. However I'm not sure how to do that. If that is the correct resolution to my problem, can someone provide detailed steps on how to add the Transform bean to the adapter module. I have no experience with adding items to the module tab.
    If there are other ways to tackle this scenario to get access to the SOAP Header from the SOAP receiver adapter, please share those as well.
    Thanks in advance.
    Chris

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

  • Query reg adding custom tags in SOAP Header - AXIS Receiver Adapter

    Hi All,
    I need to send custom tags as mentioned below to my traget webservice application. I think I can do this with Receiver AXIS adapter but not sure how it can be done. Can any of you suggest?
                                                  <WSContext>
                   <FromAppId>ABC</FromAppId>
                   <ToAppId>XYZ</ToAppId>
              </WSContext>
    Thanks,

    If you want to add custom tags in the soap header, one possible solution is use XSLT mapping or Java mapping to create header first then do message mapping for mapping the payload structure between your source and target  as usual.
    So in operation mapping you sequence mapping like this... first XSLT mapping for custom tags for the SOAP Header followed by payload mapping.
    Hope that helps.
    Search SDN for XSLT Mapping for soap header. Already we have handled these issues.

Maybe you are looking for