XML and HTTP adapter

I am having the following Scenario  File1(Request) to HTTP (Synchronous) and send the response from HTTP to File2.
The response what I am going to receive is below. But I am getting an error message "Invalid at the top level of the document". Thats True because the first 5 lines of the response are not an XML format? How to take care of the situation. Should I need use anything special in my Receiver HTTP adapter?
Content-Type: multipart/mixed; boundary="----=_Part_0_10550230.1105574425445"
=_Part_0_10550230.1105574425445
Content-Type: text/xml; charset=UTF-8
Content-ID: <[email protected]>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML timestamp="2005-01-12T16:00:25-08:00"
      payloadID="[email protected]">
   <Response>
      <Status code="200" text="OK"/>
      <DataResponse>
         <Attachment>             <URL>cid:[email protected]</URL>
         </Attachment>
      </DataResponse>
   </Response>
</cXML>

Hi Mohini,
I don't think this can be achieved using XSLT mapping. As Bhavesh said XSLT dose'nt check for the structure but it does checks if it is a well formed XML in first place. The one which you posted is not at all a XML document, I would say its a text document or a string.
So it would be possible either by ABAP mapping or Java mapping. But while doing it in ABAP or Java you should not directly take the input stream and parse it coz this is not a XML strucutre. The parser will obviously throw an error saying not a well formed XML. So first you need to take this as a string and remove those first 5 line using string manipulation/string functions. Then return the rest of the string is a XML, which you can parse it and map to its target message type.
In general any mapping that is using XPATH/path for mapping will fail, only mapping that uses streams can be used. So you can use either ABAP or Java.
Thanks,
Prakash

Similar Messages

  • Could someone help me to clearly distinguish between SOAP and HTTP adapter?

    In which scenarios we can go for HTTP adapter and when to go for SOAP adapter?

    Hi Lekshmi !!
    A SOAP message will be bundled inside the soap envelope.HTTP is not an adapter in adapter engine whereas soap is an adapter i.e, HTTP doesn't require a communication channel where as SOAP requires.You can send soap messages using some SOAP client.
    SOAP Adapter is used to xchange SOAP messages bw remote clients and webservices....
    check this link for more differences..
    SOAP and HTTP adapter
    When you need to Send Data to XI from a Webservice , your SOAP adapter is used.
    HTTP adapter is used when you want to post a HTTP request message from a web application to XI.
    How can i make use of SOAP Sender Adapter without using any tools like XML Spy etc....
    XML SPy is used as a TEST tool when you are sending SOAP information to XI. TO actually send data , you need to configure a webservice and construct a SOAP request message and post the data .
    we use SOAP adapter when we need to connect to remote system or use Webservices in these cases we use SOAP adapter.
    HTTP Adapter is used by extenal systems to connect to Intergartin server using native HTTP Interface.
    the http adapter is a service which is directly connected to integration engine. Adapter Framework (Java) isnt involved. It is much more performant than SOAP adapter.
    The SOAP adapter is written in Java and is responsible for the SOAP envelope around the real XML message. You can build/remove that envelope as well in the mapping and use instead http adapter. But standard for webservices is using SOAP adapter.
    Check this thread....
    Difference between SOAP and Http Sender
    HTTP Adatpter Vs Soap Adapter
    HTPP Adatpter Vs Soap Adapter ????
    Difference between SOAP and Http Sender
    Difference between SOAP and Http Sender
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Hope it clears your doubt !!!!
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>
    Thanks,
    Abhishek Agrahari

  • Difference between XI adapter and HTTP adapter

    Hi,
    I am not very clear on the exact difference between XI adapter and HTTP adapter.
    I want to know, when should we use XI adapter and when to use HTTP adapter.
    Regards,
    Santosh

    Hi,
    We use HTTP Adapter in case of the Application is trying to post the HTTP Request message to XI and able to receive the HTTP Message from XI also.
    While using the HTTP as Sender , HTTP Sits on ABAP Stack and can able to communicate with the Integration Server Directly, No need of any Adapter here, it is adapterless communication
    In Case of Client Proxies
    Source application can directly interact with the XI by executing the report in SAP R/3 & will be able to send the XML data to IS,
    So no need of the XI Adapter in this case to post xml to XI.
    In Case of Server Proxies
    Now XI has to post the xml data to the Target Application, here some thing shld be there to establish the medium with the Target System. So we use XI adapter here.
    In the receiver case, we need XI Adaper to communicate XI integration Server with the Local Integration Engine( Which we made in SAP R/3's Business system as local IE) to post the data
    Basically XI adapter will be used in normal scenarios also to communicate Adapter Engine with Integration Server internally while delivering the msg.
    Check this Msg Flow how the XI Adapter is used in Normal Scenarios
    Understanding message flow in XI
    REgards
    Seshagiri

  • Idoc and http adapter

    Idoc and http adapter resides in ABAP stack. So how do we monitor these two adapters ? It wont be visible in RWB ?

    Hi,
    To know the difference i suggest u try to do it by ur self only.
    Login in to Runtime Work bench- component monitoring-Adapter engine-communication channel monitoring- Filter the communication channel with name.
    and click on message id of that channel, it will show u the steps by step log for that channel.
    MONI is used for message monitoring.
    chirag

  • Can i use combination peoplesoft system  and http adapter on sender side

    hai
    can i use combination peoplesoft system  and http adapter on sender side
    is their any modifications i have to do on module tab
    can any body tell me how to post data to http adapter
    is there any application gui is there to post data

    Hi
    can i use combination peoplesoft system and http adapter on sender side
    >>>Can you explain further what this means.. You can use HTTP adapter on the sender side.
    is their any modifications i have to do on module tab
    >>> No module processor allowed for HTTP adapter.
    can any body tell me how to post data to http adapter
    is there any application gui is there to post data
    >>> Check this document. It gives you information on how to build HTTP based web GUI.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    Thanks
    Satish

  • RFC and HTTP adapter

    Hello Expert,
    Can anyone tell me, how to check RFC and HTTP adapter setting in XI?
    regards
    Ramesh

    HI,
    Based on channel configuration (Sender / Receiver) parameters need to be configure, if source mean some inputs need to be give meanwhile target.
    RFC:
    Source: No need to give any value
    Target: give host, rfc destination (target sytem logical system name) name and user id & pasword
    HTTP:
    Source: No need to give any value
    Target: Need to give hotid (receiver system name); port(receiver system port) etc parameters need to set in adapter
    I hope now you clear

  • SOAP and HTTP adapter

    Dear All
    When we need to use HTTP adapter and SOAP adapter.when integrating with a website which adapter to use?
    thanks and regards
    satish

    Michal Thanks for your quick reply
    My requirement is to upload the sales information from sap to the companys official website
    In this case what points do i need to consider, before selecting whether http or soap adapter
    do i need to make any special configuration for using these adapter in SAP PI system
    thanks and regards
    satish

  • Xml and Http

    Hello:
    recent project needs to send and receive Xml as transmitting format by http or https , How do I accomplish this by java?Does it means web service is the choice? or other solutions. Thanks in advance!!!

    If all you want to do is deliver the XML docs by HTTP, you don't need java at all. Just set up a web server.
    If you want to receive XML on a web server, you'll need something to do that; you could do it purely with a web server but more typically you'll set up a servlet or some other kind of server-side code to deal with it.
    When you send/receive the XML, are you going to interpret the XML in any way? Or is this just a file management problem?

  • Comapre HTTP adapter and SOAP adapter.

    What is the advantage of SOAP adapter over HTTP adapter in IDOC_To_webservice Scenario? Also give some comparison between them.

    Hi
    Ref this
    /people/padmankumar.sahoo/blog/2005/02/15/an-overview-of-soap --> Overview of SOAP
    this link for more differences..
    SOAP and HTTP adapter
    Check this thread....
    Difference between SOAP and Http Sender
    HTTP Adatpter Vs Soap Adapter
    HTPP Adatpter Vs Soap Adapter ????
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL

  • Messaging system and XI Adapter

    Hi Experts,
    I've came across a scenario /people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi which explains "message flow in XI".
    Q1. my question is under "RETURN JOURNEY" section in Point 1. the author is saying "So the XI Integration server will send the message to the messaging system of the Adapter Engine (AE)" i want to know what is message system and its purpose? will it store converted messages.
    Q2. wht does an XI Adapter do and wht is the purpose of using it?
    thanks
    Faisal
    points will b rewarded for useful answers.....

    Hi Abdul,
    Q1. my question is under "RETURN JOURNEY" section in Point 1. the author is saying "So the XI Integration server will send the message to the messaging system of the Adapter Engine (AE)" i want to know what is message system and its purpose? will it store converted messages.
    http://help.sap.com/saphelp_nw04s/helpdata/en/8f/d906d01f77fa40a4c84683c3f8326f/frameset.htm
    Purpose
    You use the Adapter Engine to connect the Integration Engine to SAP systems (RFC adapter) and external systems. You use the various adapters in the Adapter Engine to convert XML- and HTTP-based messages to the specific protocol and format required by these systems, and the other way around. 
    Q2. wht does an XI Adapter do and wht is the purpose of using it?
    Purpose
    You configure the XI adapter to exchange messages with an Integration Engine. Both XI 3.0 and XI 2.0 message protocols are supported. You also use the XI adapter to exchange messages between SAP Exchange Infrastructure and the Partner Connectivity Kit (PCK).
    You can use security settings to sign messages and check the signature. You can encrypt and decrypt message payloads.
    Features
    ·        To receive XML messages from a sender system, configure the sender XI adapter.
    If messages are sent from the Integration Server to the PCK, you must create a sender XI adapter in the PCK.
    ·        To send XML messages to a receiver system, configure the receiver XI adapter.
    If messages are sent from the PCK to the Integration Server, you must create a receiver XI adapter in the PCK.
    XI Adapter in the Integration Server
    A communication channel with a receiver XI adapter can be created automatically for business systems that are defined in the System Landscape Directory. See also: Creating Communication Channels Automatically
    regarding security setting,, check below
    http://help.sap.com/saphelp_nw04/helpdata/en/86/0222417c22f323e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/06/e92041c877f623e10000000a155106/frameset.htm
       XI adapter sends the data through XI protocol which works on HTTP and XML.
    So, security for XI adapter means
    1) HTTPS(Communication channel security)
    2) Message Level Security( You can send messages further in encrypted form)
    The communication via web service may have advantages, if you want communicate with non XI systems.
    In your scenario, there is direct communication between XI engines, so you can go for XI adapter. The XI adapter which is normally used to configure the exchange of messages with in an Integration Server, canbe extended to exchange messages between the two Integration Servers in the scenario.
    Please verify if if you have the common SLD for both XI systems. its preferable to go for seperate SLDs
    Check out the similar threads, XI to XI scenarios:
    XI adapter there is one option "Security Settings"..
    You can do client authentication, 128-bit encryption etc
    btw,we can do kind of data encryption in the mapping with java classes and you can pass the value.. but it is just a data level or message level
    But generally use cerfticates in the adapters for the secuity purpose. these will help you to give more inputs
    /people/rahul.nawale2/blog/2006/05/31/how-to-use-client-authentication-with-soap-adapter
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0650f56-7587-2910-7c99-e1b6ffbe4d50
    Thanks,
    Satya Kumar

  • IDOC to XML using HTTP

    Hi Friends,
    Is there any possibilities to Convert IDOCs as XML using HTTP Adapter in SAP PI?
    Because in my Scenario i need to send Idocs from ECC to Red Prariie using SAP PI.
    Also is it there any possibilities using FTPS?
    Please help me.
    Thanks.

    Hi PIstarter,
    Sure this is possible. Just treat the IDoc like any other Service Interface that you use in the HTTP Receiver Adapter. You can even use the no-mapping approach if no additional processing is required by PI.
    Hope this helps,
    Greg

  • HTTP Adapter VS XI Adapter

    Hi,
    XI and HTTP adapter almost have the same parameters. In which circumstance we will use XI adapter instead of HTTP adapter and what is the advantage of using XI adapter over HTTP adapter?
    regards
    chaks

    For proxy we will use Xi adapter.  This uses SAP's native XI protocol for communication.
    For HTTP communication such as posting a request to a web application we will use HTTP adapter. Also we can use HTTP adapter for Webservices.
    Both XI and HTTP adapter in all versions except 7.3, available in Integration Engine. In SAP 7.1 EHP and latest versions, even SOAP adapter can use XI as message protocol for Proxy communications.
    Edited by: Baskar Gopal on Jun 20, 2011 11:49 AM

  • How to use a HTTP adapter

    Hi experts,
    We have the following scenario: ABAP PROXY -> XI -> HTTP
    We must send several parameters, in XML format, to the HTTP destination (something like http://abc.com.br/xy/ml). The expected parameter in the HTTP server is names ParXML. Anyone got an example of that.
    Thanks,
    Haroldo

    Please Refer following links...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
    /people/siva.maranani/blog/2005/09/15/push-data-to-mvc-architectured-application-using-xi
    Http response in XML format
    HTTP Adapter - xml format ?
    Venkat.

  • Accessing Java webservice (XML over http) via WCF or HTTP adapter with content-type and authorization HTTP headers with POST method

    Hi Team,
    I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
    <GetStatus> message is being constructed in the orchestration and URI is constant to access.
    Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
    System.Net.WebException:
    The HTTP request is unauthorized with client authentication scheme 'Basic'. The
    authentication header received from the server was 'Basic realm='.
    Authentication failed for principal Basic. Message payload is of type:
    String 
    In Fiddler, request looks line following
    POST <https://URL/GetServiceReopnse HTTP/1.1
    Content-Type: application/xml
    Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
    Host: <Server name>
    <GetStatus XMLNS="http://server.com/.....">
    <OrgId>232323</OrgId>
    <HubId>3232342323</HubId>
    </GetStatus>
    MMK-007

    First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
    Start with the WCF-Custom Adapter and select the customBinding.
    You should start with the textMessageEncoder and httpTransport and go from there.

  • How to send XML file into XI using sender HTTP adapter

    I am using HTTP sender adapter to post the XML file into XI. I tried to form the URL by using the following String query , but I am unable to execute file.
    String urlString = "http://<servername:portno>/sap/xi/adapter_plain?namespace=<namespace>&interface=<interface name>&service=<service name>&party=&agency=&scheme=&QOS=BE&sap-user=xiappluser&sap-password=satyam&sap-client=100&sap-language=EN";
    How can I execute xml file by using HTTP sender adapter.
    Any one with better suggestions, about this idea?
    Thanks in advance for all.
    Ram Raj

    Hi
    Just use the following parameter to send xml file using HTTP adapter.
    "http://xiserver:8000/sap/xi/adapter_plain?namespace="senderNamespace"&interface=senderinterface&service=sender service";
    "&party=sender party"&agency=&scheme=&QOS=BE&sap-user=userid &sap-password=password&sap-client=100&sap-language=D";
    with the help of this you are able to point out which interface you would like to use.
    And in payload pass the xml.
    and thats it
    carry on
    Cheers
    Regards
    Piyush

Maybe you are looking for

  • How to write to mounted disc image

    I need to add a file to a disc image I created, but it always comes up no write no matter what I do. Anyone know a good tip to do this? Thanks.

  • Long Text at Activity Level in CJ20N

    Hi all, So, I have a typical newbie question. But somehow Im unable to find an answer to this query even by searching. I need to print the Long Text Tab at the Activity Level (not at Project/WBS/Network level)  in CJ20N using the Read_Text Function M

  • Can't get ipad to turn on

    Can't get my ipad to turn on

  • Sale Based Rent- You are not allowed to change sales-based rents

    Hi everybody, While processing a sale based rent using T-code : RESRSE, I got the problem as below: At the Log Display Screen: Step Processing of Sales-Based Rents performed on 19.12.2011 at 17:00:02 Status of step: You are not allowed to change sale

  • Can we skip Camera Raw Updates?

    Every time CC announces an Update, We are somewhat excited. But most of the times the excitement is tempered, because it's just a Camera Raw Update. I would like to skip these notifications, and only be notified when there's a significant update. I d