SOAP Envelope

Hi, Is there a way to get the content of a SOAP message printed on screen
before sending it?
Thanks.
Ivan
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
     SOAPConnection connection = scf.createConnection();
     MessageFactory factory = MessageFactory.newInstance();
     SOAPMessage message = factory.createMessage();     
     SOAPPart soapPart = message.getSOAPPart();
     SOAPEnvelope envelope = soapPart.getEnvelope();
     SOAPHeader header = envelope.getHeader();
     SOAPBody body = envelope.getBody();
     Name bodyname = envelope.createName("Email", "m", "http://ivan2/Webapplication1");
     SOAPElement email = body.addBodyElement(bodyname);
     Name name1 = envelope.createName("test");
     SOAPElement cognome = body.addChildElement(name1);
     cognome.addTextNode("xxxx");
     URLEndpoint endpoint = new URLEndpoint("http://ivan2/webapplication1/ciao.asmx");

Yes, use message.writeTo(FileOutputStream out);

Similar Messages

  • Problem in mapping while using Do not Use SOAP Envelope

    Hi All,
    This is wrt my thread 'Removing and adding SOAP Envelope'
    I am currently working on SOAP-XI-Proxy Scenario.
    For some un avoiadable reason, I had to use the option 'DO not use SOAP Envelope' .So the SOAP Envelope came withen the payload and in the pipeline, I can see the payload prefixed by '<?xml version="1.0" ?>' .
    Now my payload looks like
    <?xml version="1.0" ?> ( no more the encoding="utf-8" notation is there)
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <Complaint_Request xmlns="urn:******createserviceticket">
      <CaseNo>12345</CaseNo>
      <CustomerNo>12345</CustomerNo>
      </Complaint_Request>
      </soapenv:Body>
      </soapenv:Envelope>
    To accomodate the change, I also changed my request structure as
      <Complaint_Request> (My new message Type)
        <Envelope>
         <Body>
           <Complaint_Request> (My previous message Type)
            <caseNo>
            <CustomerNo>
    But I am facing problem in mapping the values to the target structure (which is a flat structure),
    as the payload doesnot start with ' ns1: ' notation any more . Even XSLT mapping is not working.
    When I am pasting the payload in the Testing Mapping Editor, the Source Node are correctly
    formed, but all come in RED . But as the root node , ie 'ns0' is not there, the value
    from child nodes are not getting mapped to the target fields.
    Regards,
    Subhendu

    Hi Joel,
    SAP says, when we use the option 'DO Not Use SOAP Envelope', the payload also contains the SOAP
    Envelope. So it is obvious that the payload wont start with 'ns0' notation.
    So I am searching for a solution, when we use that option.
    Regards,
    Subhendu

  • XSLT mapping with SOAP Envelope

    Hi
    I'm trying map SOAP response (with Envelope) to pick two values into the target. Here's the data:
    Source (with data):
    <?xml version="1.0"?>
    <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:Body>
              <EnumerateResponse xmlns="http://www.approva.net/BizRights/Services">
                   <EnumerateResult>
                        <TaskID>-1</TaskID>
                        <Result>FinishedSuccessfully</Result>
                        <StatusInfo/>
                   </EnumerateResult>
                   <pageObject>
                        <startIndex>0</startIndex>
                        <pageSize>10</pageSize>
                        <totalRows>1</totalRows>
                        <moreRecords>false</moreRecords>
                        <rowsReturned>1</rowsReturned>
                   </pageObject>
                   <xmlObjects>(large string of valid data in here)</xmlObjects>
              </EnumerateResponse>
         </soap:Body>
    </soap:Envelope>
    Target:
    Only need Result and xmlObjects into target.
    Mapping:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <poll_status_resp_r3>
                   <Result>
                        <xsl:value-of select="EnumerateResponse/Result"/>
                   </Result>
                   <xmlObjects>
                        <xsl:value-of select="EnumerateResponse/xmlObjects"/>
                   </xmlObjects>
              </poll_status_resp_r3>
         </xsl:template>
    </xsl:stylesheet>
    The values are not getting picked-up into the target.
    What am I missing here?
    Any help is appreciated.

    Hi,
    Save the following XSL file as RSpace.xsl
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" indent="no"/>
      <xsl:template match="/|comment()|processing-instruction()">
        <xsl:copy>
          <xsl:apply-templates/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="*">
        <xsl:element name="{local-name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:template>
      <xsl:template match="@*">
        <xsl:attribute name="{local-name()}">
          <xsl:value-of select="."/>
        </xsl:attribute>
      </xsl:template>
    </xsl:stylesheet>
    Zip it and import it under Imported Archive.
    In the interface mapping click "+" to add one more mapping.
    Use this XSL as first mapping and your XSL mapping as the second mapping.
    In your XSLT mapping you can use the XPath as
    "Envelope/Body/EnumerateResponse/Result".
    I mean remove the namespace and use the XPATH.
    Thanks,
    Prakash

  • JAVA/ XSLT Mapping to Create a SOAP Envelope

    Hello,
    I have a File to SOAP scenario and it requires the SOAP message with a custom SOAP envelope. I have searched SDN and could only find that SOAP envelope can be created using a JAVA or XSLT mapping. However, I could not find any blog/ article which will help me understand, with an example, how this is actually coded (creating of a custom SOAP envelope).
    Can anyone please point me to a valid blog/ article/ wiki which describes the procedure?
    Thanks,
    Pankaj.
    P.S. Please no spamming of post with links on SOAP Envelope; I have already searched on SDN

    Hello,
    Here is a wiki using PI 7.1
    https://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
    If you want to create a SOAP Envelope, comment out the codes
      private static final DynamicConfigurationKey KEY_FILENAME =
             DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String inParam = arg0.getInputParameters().getString("PARAM_IN1");
         getTrace().addInfo("Input Parameter: " +inParam);
         int offset = inData.indexOf(inParam);
         //7. Reader Message ID from Message Header
         InputHeader messageHeader = arg0.getInputHeader();
         String messageId = messageHeader.getMessageId();
         //8. A DynamicConfiguration is a map containing adapter specific message attributes.
         // It associates DynamicConfigurationKeys with string values. The DynamicConfiguration object is obtained using
         // method getDynamicConfiguration()of class com.sap.aii.mapping.api.TransformationInput;
         DynamicConfiguration conf = arg0.getDynamicConfiguration();
         conf.put(KEY_FILENAME, "This Test file is set by JAVA Mapping");
         String outData = "";if(offset > 0){
         int offset1 = inData.indexOf(">", offset);
         String StartString =inData.substring(0,offset1);
         String DocumentNameSpace = " xmlns=\"urn:iso:std:iso:20022:tech:xsd:pain.002.001.02\"";
         String RemainingString = inData.substring(offset1);
    lastly, instead of using
    outData = StartString + DocumentNameSpace + RemainingString;
    replace it with something like this
    String outData = "";
    outData = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:tem=\"http://yournamespace/\"><soap:Header/><soap:Body>"+inData.substring(inData.indexOf("?>")+2)+"</soap:Body></soap:Envelope>";
    Hope this helps,
    Mark

  • SOAP receiver adapter - payload inside the soap envelop

    Hi,
    We have to send a SOAP message to 3rd party from PI 7.1. Using SOAP receiver adapter - we are trying to achieve this. 3rd party software is unable to accept payload as an attachment of the main envelop - they want it enside the main envelop.
    I tried with "Keep attachment" option - but PI still keping the payload as an attachment. I think this option is for handling "extra" attachment.
    Is there any way we can keep the payload inside the envelop?
    In run-time WB, at the moment envelop looks like
    <SOAP:Envelope xmlns:SOAP="http://schemas....
    <SOAP:Body>
    <sap:Payload xlink:type="simple" xlink:href="cid:payload-d6518670ca1311debbd9ca347000800b...">
    </SOAP:Body>
    </SOAP:Envelope>
    And the payload d6518670ca1311debbd9ca347000800b... ( again viewed from RWB) - contains the data.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns2:Order> ....
    </ns2:Order>
    Can we insert this payload directly inside the SOAP:Envelope body instead of a link there?
    Regards,
    Sudhin

    Hi!
    It seems to me that this 3rd party is expecting only XML not SOAP.
    If this is the case, you should use the HTTP Receiver adapter instead of SOAP.
    Some systems 'say' they can speak SOAP but they can only speak XML. Not to blame, it's a mistake many make these days.
    The only way you use SOAP Receiver adapter with this 3rd party, is that if someone from the 3rd party hands you a WSDL file.
    Ricardo Sancio Lóra
    Brazil

  • No SOAP Envelope error in SOAP Receiver Adapter

    Hello Friends,
    Informaiton:-
    I have configured one Synchronous scenarion for SAP R/3 to PI 7.1 to Java based web applicaiton.
    On the Receiver/Outbound side, i have configured the SOAP Receiver Adapter with the Target URL and SOAP Action.
    Outbound and Inbound service interfaces have Request/Response and Fault messages.
    Issue:-
    While sending the Message, Below error is noticed in ABAP stack SXMB_MONI during the Call Adapter Stage and also in RWB (Channel Monitoring) .
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: No SOAP  Envelope but 1 {}RESPONSES; HTTP 200 OK
    I also found that Request message is not reaching to the Java Web server.
    I am taking the Same message Payload (found at Call Adapter Stage) and ussing it in XML Altova SPY Web client tool. There it is running scuccessfully and getting the Response message.
    please suggest.
    Thanks & Regards
    Jagesh

    Hi,
    Yesterday i consumed the same WSDL file in Altova XML SPY and there it is working, getting the Response.
    Now comparing the SOAP Request message reaching to the Third party Web server (which fall within the same Lane network)
    from SAP PI and Altova XML SPY tool. I used TCP Gateway for the below scenarios.
    (1)First i sent the SOAP message from PI and observed the RESPONSE message without the SOAP Envelope in TCP Gatway Trace and hence i am getting the No SOAP Envelope Error in PI.
    (2)I consumed the same WSDLfile in Altova XML SPY and sent the SOAP message, here i got the Proper SOAP Response message and hence success in this case. (Used the same Data Payload as used in point 1)
    (3)Now to identify the issue in the SOAP Request message being sent from PI, i used the same SOAP message sent in step 1 here, that means copy the entire SOAP ENvelope from the TCP gateway Trace and pasted it in Alota Spy and sent, there it is found running (got the response message from Third Party server).
    One difference i found in HTTP Protocol statements in SOAP Request message in Point no 1 and Point no 2 above.
    HTTP Protocols in Point 1 (Through PI).
    POST  HTTP/1.0
    Accept: /
    Host: 172.24.138.142:4544
    User-Agent: SAP-Messaging-com.sap.aii.af.sdk.xi/1.0505
    CallingType: SA
    content-id: <soap-00306EEAC2051ED1839136CEE8564900 sap.com>
    Content-Type: text/xml; charset=utf-8
    Content-Length: 1195
    SOAPACTION: "Action1"
    HTTP Protocols in Point 2 (Through Altova).
    POST / HTTP/1.1
    Content-Type: text/xml
    User-Agent: XML Spy
    SOAPAction: "Action1"
    Host: 172.24.138.142:4544
    Content-Length: 1195
    Connection: Keep-Alive
    Cache-Control: no-cache
    Thanks to Mr. Stefan Grube for writting such a nice blog.
    Troubleshooting SOAP, HTTP and Mail Adapter Scenarios with TCPGateway
    Experts, please suggest me further.
    Thansk & Regards
    Jagesh

  • SOAP Envelope - HTTP_EXCEPTION - HTTP 500 Internal Server Error

    Pessoal, o cliente em que estou utiliza uma solução para NFe que não é o GRC.
    Para tentar solucionar o problema do SOAP 1.2 e do message header, estou tentando criar o SOAP Envelope utilizando um XSLT, e no Communication Channel eu estou flegando Do not use soap envelope e colocando os modules para os charset, assim como na nota da SAP.
    O que está ocorrendo é que estou tendo o seguinte erro:
    com.sap.aii.af.ra.ms.api.DeliveryException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    Conversei com um rapaz na SEFAZ e ele diz que não está chegando nada pra ele.
    O SOAP Envelope que estou mandando é:
       está dentro de tags CDATA.
    Alguém saberia o que está ocorrendo?
    Muito obrigao,
    Leandro Rocha

    Olá Henrique, muito obrigado pela rápida resposta.
    O erro que dá no audit log é:
    SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    MP: Exception caught with 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
    Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error. Setting message to status failed.
    A mensagem que aparece no adapter é a padrão do SOAP Document:
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Header xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:wsse="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    - <SAP:Main versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
      <SAP:MessageClass>ApplicationMessage</SAP:MessageClass>
      <SAP:ProcessingMode>synchronous</SAP:ProcessingMode>
      <SAP:MessageId>dfe81887-3f6a-55f1-b933-0050568169b4</SAP:MessageId>
      <SAP:TimeSent>2010-11-04T13:36:35Z</SAP:TimeSent>
    - <SAP:Sender>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>NFe_recepcao</SAP:Service>
      </SAP:Sender>
    - <SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>SEFAZ_RS</SAP:Service>
      </SAP:Receiver>
      <SAP:Interface namespace="http://www.gerdau.com.br/nfe">NFe_recepcao_inbound_sync</SAP:Interface>
      </SAP:Main>
    - <SAP:ReliableMessaging SOAP:mustUnderstand="1">
      <SAP:QualityOfService>BestEffort</SAP:QualityOfService>
      </SAP:ReliableMessaging>
    - <SAP:Diagnostic SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information</SAP:TraceLevel>
      <SAP:Logging>Off</SAP:Logging>
      </SAP:Diagnostic>
    - <SAP:HopList SOAP:mustUnderstand="1">
    - <SAP:Hop timeStamp="2010-11-04T13:36:39Z" wasRead="false">
      <SAP:Engine type="PE" />
      <SAP:Adapter namespace="http://sap.com/xi/XI/System">PE</SAP:Adapter>
      <SAP:MessageId>dfe81887-3f6a-55f1-b933-0050568169b4</SAP:MessageId>
      <SAP:Info />
      </SAP:Hop>
    - <SAP:Hop timeStamp="2010-11-04T13:36:39Z" wasRead="false">
      <SAP:Engine type="IS">is.00.ebsgerd26</SAP:Engine>
      <SAP:Adapter namespace="http://sap.com/xi/XI/System">XI</SAP:Adapter>
      <SAP:MessageId>dfe81887-3f6a-55f1-b933-0050568169b4</SAP:MessageId>
      <SAP:Info>3.0</SAP:Info>
      </SAP:Hop>
    - <SAP:Hop timeStamp="2010-11-04T13:36:41Z" wasRead="false">
      <SAP:Engine type="AE">af.p7d.ebsgerd26</SAP:Engine>
      <SAP:Adapter namespace="http://sap.com/xi/XI/System">XIRA</SAP:Adapter>
      <SAP:MessageId>dfe81887-3f6a-55f1-b933-0050568169b4</SAP:MessageId>
      </SAP:Hop>
      </SAP:HopList>
      </SOAP:Header>
    - <SOAP:Body>
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <sap:Payload xlink:type="simple" xlink:href="cid:payload-DFE818873F6A21F1B9330050568169B4">
      <sap:Name>MainDocument</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>
    Mais uma vez, muito obrigado,
    Leandro

  • Generating SOAP Envelope when DO NOT USE ENVELOPE option is marked

    My scenario: SPROXY => XI => 3rdParty WebService. Communication is synchronous. I've a problem with soap envelope. It is required by webservice, but when I use standard soap envelope generated by SAP I've a problem with receiving response from webservice.
    So I want to create my own envelope. For this reason I've used DO NOT USE SOAP ENVELOPE option. Now the challenge comes. How can I create my own soap envelope?
    Do you have any working example? Soap envelope should be added to message send from XI to 3rdParty WebService.
    Helping answers => a lot of points

    I'm talking about HTTP header.
    When I'm sending SOAP request from SAP my whole message looks like when I use soap envelope
    POST / HTTP/1.0
    Accept: */*
    Host: 192.168.132.179:54000
    User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
    Content-ID: <soap-02cce7702b1a11dd9902000c29ee261e[at]sap.com>
    Content-Type: text/xml; charset=utf-8
    Content-Disposition: attachment;filename="soap-02cce7702b1a11dd9902000c29ee261e[at]sap.com.xml"
    Content-Description: SOAP
    Content-Length: 259
    SOAPACTION:
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body><ns0:Sd2Ids_SzfExport xmlns:ns0='http://www.dat.de/sdii/ids/Sd2SOAP.wsdl'><arg1>1234567899-0</arg1><arg2>1</arg2></ns0:Sd2Ids_SzfExport></SOAP:Body></SOAP:Envelope>
    Always after such request I got and HTTP 411 error.
    In opposite, when I'm sending request from e.g. Altova or SoapUI, my message looks:
    POST / HTTP/1.1
    Content-Type: text/xml; Charset=UTF-8
    User-Agent: XML Spy
    Host: 192.168.132.179:54000
    Content-Length: 489
    Connection: Keep-Alive
    Cache-Control: no-cache
    <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:Body>
              <m:Sd2Ids_SzfExport xmlns:m="http://www.dat.de/sdii/ids/Sd2SOAP.wsdl">
                   <arg1 xsi:type="xsd:string">1234567899-0</arg1>
                   <arg2 xsi:type="xsd:string">1</arg2>
              </m:Sd2Ids_SzfExport>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    After that request WebService response is correct.
    You can find such differences (except Content-length which is a result of XML message formatting) in those two headers:
    - for first is used HTTP 1.0 protocol for later 1.1
    - in SAP header an info about attachment is added
    After a lot of test I thing that those attachment info in header of HTTP is causing a problem. So I want to use DO NOT USE SOAP ENVELOPE option to generate HTTP header without Content-Disposition and generate SOAP Envelope manually.

  • Unsing RequestOneWayBean with Do Not Use SOAP Envelope

    HI All ,
    I have a requriement where Ecc is calling PI with an Asyn Proxy and PI calls a Sync Webservice and gets the Response back and sends the response back to ECC in Async manner . (Async - Sync Bridge).
    I need to call aWeb Service which required specifc SOAP  Headers . SO I have  created a Custom Structure via XSLT mapping and calling the Web Service with the Option  Do Not Use SOAP Envelope as checked . I have also used the RequestResponse Bean & ResponseOneWay Bean in the SOAP Receiver adapter to make the call from Sync to Asyn.  When I execute the Interface the response from the Web Service is  not flowing into PI .
    I am getting the error "Exception caught by adapter framework: InterfaceDetermination did not yield any actual interface" .
    Has anyone worked on the ResponseOneway Bean with parameter "Do Not Use SOAP Envelope as checked" . Can some one please help me out with this issue..
    Thanks
    Regards
    NIlesh Taunk.

    HI Eng ,
    I have not been able to accept the SOAP Fault Response. The link that you have provided above works for accepting the SOAP Fault . But in my case the SOAP Receiver Adapter has the Option "DO NOT Use SOAP Envelope " checked . So it is still not working in my case .
    I have made all the Configurations in the Receiver SOAP adapter but am unable to get the fault response back .
    Please find below the Screenshot of the Receiver SOAP Adapter.
    Im my case I am able to receive the successfull response in my Response Mappping (I have created a diff ICO for Response Message and a diff ICO for Fault Message). When a fault is received even the Fault message goes to the response mapping and it fails in the response mapping as the fault structure & the response structure do not match .
    Do we need to make some additional configuration  for the handing  faults, whn the option "DO NOT use SOAP envlope is checked" as it removed the Env from the messgaes.
    Am I missing something, would you be able to have a look.
    Thanks
    Regards
    Nilesh Taunk.

  • Error with Do Not use SOAP envelope

    All,
    I used the do not send SOAP envelope option in the SOAP receiver adapter.
    Instead of XSLT, I used JAVA mapping to create the entire SOAP message ( Am more comfortable with Java and this is just a trial) , and this is the output of my java mapping with the SOAP envelope created,
    <i><?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Header></soap:Header><soap:Body><ns1:GetQuote xmlns:ns1="http://www.webserviceX.NET/"><ns1:symbol>SAP</ns1:symbol></ns1:GetQuote></soap:Body></soap:Envelope></i>
    Am using the STOCK Quote for testing purposes and this is the error I am getting when testing my interface,
    <i><faultstring>System.Web.Services.Protocols.SoapException: Server found request content type to be '', but expected 'text/xml'. at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faultstring></i>
    Any directions  / inputs on how to resolve this issue?
    Regards,
    Bhavesh

    Henrique,
    Tried various permutations~~ The only new error / progress seems to be for this,
    SOAPAction    "http://www.webserviceX.NET/GetQuote" 
    This is giving me an error ,
    <i>HTTP server code 400 reason Bad Request explanation <h1>Bad Request (Invalid Header Name)</h1></i>
    Also, tried by adding the Colon after SOAPAction,
    SOAPAction: "http://www.webserviceX.NET/GetQuote"
    Same error
    Final thing i guess is to make SOAPAction all small as soapaction and check if it works. Will let you know.
    Regards,
    Bhavesh

  • SOAP Adapter: DO not use soap envelope

    Hi Guys
    I have a scenario, which calls a webservice from my ABAP Proxies, the twist in this is that SOAP request expects license info into the header of SOAP envelope, I could achive this by XSLT mapping in the receiver SOAP adapter I selected the option "Do not use SOAP envelope" and could do the call.
    Due to this the response received from the webservice is treated as payload, as shown below...
    response message payload:
    <?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">
      <Header xmlns="http://schemas.xmlsoap.org/soap/envelope/">
        <SubscriptionInfo xmlns="http://ws.strikeiron.com">
          <LicenseStatusCode>0</LicenseStatusCode>
          <LicenseStatus>Valid license key</LicenseStatus>
          <LicenseActionCode>0</LicenseActionCode>
          <LicenseAction>Decremented hit count</LicenseAction>
          <RemainingHits>18</RemainingHits>
          <Amount>0</Amount>
        </SubscriptionInfo>
      </Header>
      <soap:Body>
        <getRateResponse xmlns="CurrencyRates">
          <getRateResult>44.945</getRateResult>
        </getRateResponse>
      </soap:Body>
    </soap:Envelope>
    and when i am trying to do the response mapping, it is not able to read the value.
    Anyone having any idea, on how we could do this.
    Thanks
    Dheeraj

    Hi
    I am sorry for replying in so late, was busy with some projects.
    I got few mails and this post is cathing up again, so thought of giving the solution I followed without any adapter module or anything, simple plain XSLT mapping.
    <u><b>Integration Repository</b></u>
    1. Created data type and message type for Outbound Interface
    2. Imported the WSDL
    3. Created an XSD out of the sample response I got by calling the WSDL (this you can do from any tool available, i used the strikeiron website), pls refer below to see the XSD below, and you will have to use the message type envelope from it.
    4. Most Important step, created 2 XSLT mappings, one for request and the other for response., Pls refer below for both these mappings.
    5. did the interface mapping
    <u><b>Integration Directory</b></u>
    1. pls configure your scenario as normaly you do, and while you configure the communication channel for your soap receiver, make sure you click on the do not use soap envelop option.
    thats it done.
    <u><b>XSLT Request Mapping</b></u>
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
                   <SOAP-ENV:Header>
                        <LicenseInfo xmlns="http://ws.strikeiron.com">
                             <RegisteredUser>
                                  <UserID>xyz</UserID>
                                  <Password>xyz</Password>
                             </RegisteredUser>
                        </LicenseInfo>
                   </SOAP-ENV:Header>
                   <SOAP-ENV:Body>
                        <getConversion xmlns="CurrencyRates">
                             <FromCurrencyCode>
                                  <xsl:value-of select="//fromCurrency"/>
                             </FromCurrencyCode>
                             <ToCurrencyCode>
                                  <xsl:value-of select="//ToCurrency"/>
                             </ToCurrencyCode>
                             <Amount>1</Amount>
                        </getConversion>
                   </SOAP-ENV:Body>
              </SOAP-ENV:Envelope>
         </xsl:template>
    </xsl:stylesheet>
    <u><b>XSLT Response Mapping</b></u>
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="CurrencyRates" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <xsl:template match="/">
              <ns0:MT_Cur_res xmlns:ns0="http://www.april.in/WebService/SOAPHeader">
                   <Rate>
                        <xsl:value-of select="soap:Envelope/soap:Body/a:getConversionResponse/a:getConversionResult"/>
                   </Rate>
              </ns0:MT_Cur_res>
         </xsl:template>
    </xsl:stylesheet>
    <u><b>Webservice Response XSD</b></u>
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.strikeiron.com" xmlns:ns2="CurrencyRates">
      <xs:import namespace="CurrencyRates" schemaLocation="ns2.xsd"/>
      <xs:import namespace="http://ws.strikeiron.com" schemaLocation="ns1.xsd"/>
      <xs:element name="Envelope">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="soap:Header"/>
            <xs:element ref="soap:Body"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Header">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="ns1:SubscriptionInfo"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Body">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="ns2:getConversionResponse"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    let me know in case somebody gets stuck somewhere for this scenario.
    Take Care
    Dheeraj

  • SOAP scenario "Do not use SOAP Envelope" check problems

    Hi Gurus!
    I'm again here.
    I've an scenario with SOAP Receiver, the WS do I need consume, looks like:
    POST /SumTotalws1/services/Authentication.asmx HTTP/1.1
    Host: xxx.xxx.xxx.xxx
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://www.sumtotalsystems.com/sumtotal7/sumtotalws/Authentication/Login"
    <?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:Body>
        <Login xmlns="http://www.sumtotalsystems.com/sumtotal7/sumtotalws/Authentication/">
          <credentials>
            <Username>string</Username>
            <Passcode>string</Passcode>
            <AuthenticationType>NotSpecified or Anonymous or NTAuthentication or Passport or LDAP</AuthenticationType>
            <AccountType>NotSpecified or WebService or WebUI</AccountType>
          </credentials>
        </Login>
      </soap:Body>
    </soap:Envelope>
    but the response looks like:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?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>
        <UserToken xmlns="http://www.sumtotalsystems.com/sumtotal7/sumtotalws/">
          <Value>string</Value>
        </UserToken>
      </soap:Header>
      <soap:Body>
        <LoginResponse xmlns="http://www.sumtotalsystems.com/sumtotal7/sumtotalws/Authentication/" />
      </soap:Body>
    </soap:Envelope>
    when I create my communication channel with "Do not Use SOAP Envelope" uncheck it, all run ok, but I only get in response message "<LoginResponse>" and I need <UserToken>
    When I check it "Do not use SOAP Envelope" and I use XSLT mapping to add SOAP Env to request message,  I get response message empty.
    I tried the web Service with the message that I obtained from de XSLT mapping in the program SOAPUI. I get ok response with the <UserToken> value.
    some idea to solve this problem??
    Thanks in advance.
    Edited by: KrlosRios on Sep 30, 2011 8:07 PM

    Hi, thanks for your answer.
    Can I use AXIS to execute any WS?
    The WS that I tried execute looks like this:
    POST /xxxx/services/Authentication.asmx HTTP/1.1
    Host: xxx.240.106.39
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://xxx/Authentication/Login"
    <?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:Body>
        <Login xmlns="http://xxxxAuthentication/">
          <credentials>
            <Username>string</Username>
            <Passcode>string</Passcode>
            <AuthenticationType>NotSpecified or Anonymous or NTAuthentication or Passport or LDAP</AuthenticationType>
            <AccountType>NotSpecified or WebService or WebUI</AccountType>
          </credentials>
        </Login>
      </soap:Body>
    </soap:Envelope>
    and for the response:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?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>
        <UserToken xmlns="http://www.sumtotalsystems.com/sumtotal7/sumtotalws/">
          <Value>string</Value>
        </UserToken>
      </soap:Header>
      <soap:Body>
        <LoginResponse xmlns="http://www.sumtotalsystems.com/sumtotal7/sumtotalws/Authentication/"></LoginResponse>
      </soap:Body>
    </soap:Envelope>
    also I found in Trace node in SXI_MONITOR, jus before execute response mapping :
    <Trace level="1" type="B" name="PLSRV_MAPPING_RESPONSE"></Trace><!-- ************************************ -->
    <Trace level="1" type="Timestamp">2011-11-01T19:33:34Z UTC-6 Start of pipeline service processing PLSRVID= PLSRV_MAPPING_RESPONSE</Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    <Trace level="3" type="T">Calling pipeline service: PLSRV_MAPPING_RESPONSE</Trace>
    <Trace level="3" type="T">Reading Pipeline-Service specification... </Trace>
    <Trace level="3" type="T">PLSRVTYPE  = </Trace>
    <Trace level="3" type="T">ADRESSMOD  = LOCAL</Trace>
    <Trace level="3" type="T">P_CLASS    = CL_MAPPING_XMS_PLSRV3</Trace>
    <Trace level="3" type="T">P_IFNAME   = IF_XMS_PLSRV</Trace>
    <Trace level="3" type="T">P_METHOD   = ENTER_PLSRV</Trace>
    <Trace level="3" type="T"> </Trace>
    <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL"></Trace><!-- ************************************ -->
    <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV"></Trace><!-- ************************************ -->
    <Trace level="2" type="T">......attachment XI_Context not found </Trace>
    <Trace level="3" type="T">Das Mapping wurde bereits in der Interface-Ermittlung bestimmt. </Trace>
    <Trace level="3" type="T">Objekt-Id des Interface-Mappings 8594D8C2E6DA3C008F45B112FFCC86B8 </Trace>
    <Trace level="3" type="T">Versions-Id des Interface-Mappings C3BB8FB0A1D511E0A688E9FCB9F06E16 </Trace>
    <Trace level="1" type="T">Interface-Mapping http://xxxxx.net/pi/lms/Authentication OM_LMS_Authentication </Trace>
    <Trace level="3" type="T">Mapping-Schritte 1  XSLT Response_LMS_Auth5 </Trace>
    <Trace level="3" type="T">MTOM-Attachments werden nicht in die Payload überführt. </Trace>
    <Trace level="1" type="T">Payload is empty. </Trace>
    <Trace level="3" type="T">Dynamische Konfiguration ist leer. </Trace>
    <Trace level="2" type="T">Modus 0  </Trace>
    <Trace level="2" type="T">Call XSLT processor with stylsheet Response_LMS_Auth5.xsl. </Trace>
    <Trace level="3" type="T">Method fatalError called, terminate transformation, because of
    Thrown:
    javax.xml.transform.TransformerException: java.io.IOException: Parsing an empty source. Root element expected!
         at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:250)
    Say Payload is empty.
    and in left directory tree, not exist "payload" node, only existe SOAP Body and in "Manifest" node looks like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!-- XML Validation Outbound Channel Response -->
    <SAP:Manifest wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <SAP:Payload xlink:href="cid:att-60c3078b066911e1bc1500000093b25a @sap.com">
    <SAP:Name>MainAttachment</SAP:Name><
    SAP:Description>Main document</SAP:Description>
    <SAP:Type>Application</SAP:Type></SAP:Payload>
    </SAP:Manifest>
    Thanks for your help.

  • Do Not Use SOAP Envelope doesn't show on SOAP Parameters

    Hi!..
    Somebody knows why the Do Not Use SOAP Envelope option on conversion Parameters for SOAP Adapter isn't there?...I have XI 3.0 SP19 and I'd seen on a lot of notes and how's to that there is a kind of option. I need the functionality that that check does but I can't find it.
    I Only have Keep headers, Keep Attachments, Use Encoded headers and Use query string.
    Thanks in advance..
    Carlos.

    HI Carlos,
    I've got same problem, which metadata should I reimport?
    cheers,
    Edu

  • Do not use SOAP envelope

    I have a scenario in which a Webservice is called from PI; as the webservice request some specific fields in the SOAP-header I have found that I should check the "Do not use SOAP envelope" option in the SOAP-receiver channel.
    I have searched the forum/SDN for examples of how to create the SOAP envelope including the required header fields. I have found some posts refering to XSLT-mapping; however I'm not famliar with XSLT so I'm looking for an example or guide how to create the SOAP envelope for this scenario.
    Can anybody be of assistance?
    Kind regards,
    John.

    Here is a sample of an xlst I used for this purpose.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header/>
      <soapenv:Body>
          <p262:operationName xmlns:p262="http://othersite.com">
          <xsl:apply-templates/>
        </p262:operationName>
      </soapenv:Body>
    </soapenv:Envelope>
    </xsl:template>
    <xsl:template match="shippingOptions">
          <shippingOptions>
              <xsl:apply-templates select="destination" />
              <equipmentId><xsl:value-of select="equipmentId"/></equipmentId>
              <xsl:apply-templates select="origin" />
          </shippingOptions>     
    </xsl:template>
    <xsl:template match="destination">
            <destination>
              <countryCode><xsl:value-of select="countryCode"/></countryCode>
              <postalCode><xsl:value-of select="postalCode"/></postalCode>
            </destination>
    </xsl:template>
    <xsl:template match="origin">
            <origin>
              <countryCode><xsl:value-of select="countryCode"/></countryCode>
              <postalCode><xsl:value-of select="postalCode"/></postalCode>
            </origin>
    </xsl:template>
    </xsl:stylesheet>

  • How to capture SOAP fault when using "Do not use SOAP envelope" parameter

    Hi,
    we have a synchronous  RFC -> XI -> Web Service scenario. The Web Service requires some custom SOAP header elements for user authorization which forced us create the entire SOAP message in a message mapping and to set the "Do not use SOAP envelope" parameter in the receiving SOAP adapter.
    In order to capture the SOAP fault message from the Web Service we have created a message interface with a fault message and also created an interface mapping with a fault message mapping.
    Our problem is that the fault message is not populated when we get a SOAP fault message back from the Web Service. Is this due to the fact that we have set the  "Do not use SOAP envelope" parameter?
    Thanks in advance!
    Stefan
    Message was edited by:
            Stefan Nilsson

    Hi Bhavesh,
    I have exaactly same scenario. But the only difference is that the Successful payload is also not coming into PI.
    The request is successfully hittng the webservice.
    Please guide me on how to capture the paylod.
    I am using the WSDL provided by the thirdparty but sill the message is not coming into PI.

  • Remove SOAP Envelop using XSLT  mapping.

    Hi,
    I need a code to remove SOAP Envelop using XSLT mapping.
    Source:
    <?xml version="1.0" encoding="UTF-8" ?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
    <soapenv:Body>
    <getServerTimestampResponse>
    <result>
      <timestamp>2008-06-19T14:22:25.004Z</timestamp>
      </result>
      </getServerTimestampResponse>
      </soapenv:Body>
      </soapenv:Envelope>
    target:
    <?xml version="1.0" encoding="UTF-8" ?>
    <a>
          <b>
             <c>2008-06-19T14:22:25.004Z<c>
           </b>
    </a>
    Please help me in this
    Thanks&Regards,
    Yuga

    hi,
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
                                  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
       <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
       <xsl:template match="/">
          <ns0:c>       
                   <xsl:copy-of select="SOAP-ENV:Envelope/SOAP-ENV:Body"/ />
          </ns0:c>
       </xsl:template>
    </xsl:stylesheet>
    This will get your whole body...
    Your root node should belong to some namesapce...i.e. getServerTimestampResponse .
    Thanks,
    Vijaya.

Maybe you are looking for