HTTP Receiver - Response message

Hi,
I have a HTTP Receiver scenario. I get the data from a Webservice and sent the data with a HTTP Request to our customer. So far we have no problem. Our customer is returning a payload structure like the one below.
Now the problem here is, there is a <start>, <end> tag and "0" and "OK" before and after the XML structure as you can see below. How can I parse these type of messages?
<start>
0
OK
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE AMS_XML_DATA SYSTEM "Group1.dtd"><AMS_XML_DATA><Header><ErrorCode>0</ErrorCode><ErrorMessage>OK</ErrorMessage><Version>1.0</Version><SourceId>XXX</SourceId><MessageId>XXX99998888777766665555</MessageId></Header><Segment><IgnoreFg></IgnoreFg><ErrorCode>555</ErrorCode><ErrorMessage>PR DA FO</ErrorMessage><TransactionType>N</TransactionType><TransactionId>XXX99998888777766665555</TransactionId></Segment></AMS_XML_DATA>
<end>
Thank you in advance.
Best Regards,
Arman

I think to parse this message is impossible, because it's not well formed.
<start>
0
OK
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE AMS_XML_DATA SYSTEM "Group1.dtd"><AMS_XML_DATA><Header><ErrorCode>0</ErrorCode><ErrorMessage>OK</ErrorMessage><Version>1.0</Version><SourceId>XXX</SourceId><MessageId>XXX99998888777766665555</MessageId></Header><Segment><IgnoreFg></IgnoreFg><ErrorCode>555</ErrorCode><ErrorMessage>PR DA FO</ErrorMessage><TransactionType>N</TransactionType><TransactionId>XXX99998888777766665555</TransactionId></Segment></AMS_XML_DATA>
<end>
A declaration of DOCTYPE outside the header / prolog is not allowed.
Aditionally the start and end tags are not closed. So the basic question is, why does the sender transfers a not well formed XML?

Similar Messages

  • Receiver HTTP Adaper Response Message problem

    We are using HTTP adapter as the receiver for one of our vendor to post XML PO's to vendor's URL.
    We are using Transport Protocol-HTTP 1.0
    Message Protocol-XI Payload in HTTP Body
    Adapter Engine-Integration Engine.
    When PO is posted good on vendor's site we get "200" as the reponse message and when PO is failed in the vendor system due to mapping problems still we get "200" response message, Vendor's are sending "400" message for the failure to update their system but our server is not waiting to get "400" response messages. It picks the message of "200" when PO is posted on vendor's URL it is not waiting to get the next message.
    Does anyone can help me to resolve this problem.
    Thanks in advance!
    Mrudula Patel

    Hi Mrudula,
      Can you eloborate bit more on this scenario,
    1) 200 - for posting successfully in Vendor's site
    2) 400 - if Business logic fails at Vendor's site
    3)  ?? - Sucessful transaction (Biz Logic).
    If there is only one response, which gives either 2 or 3, then you can pick up the appropriate one & post the sender with the results. The HTTP adapter's call closes once it recieves ANY reponse from recieving site (Vendor).
    hope this helps.
    Regards
    Vishnu

  • Configure HTTP Status Response Messages

    Dear Portal Experts,
    we have an issue with the the way portal response codes are put into response messages. The portal sits in an infrastructure which includes multiple security measures, including a reverse proxy. This reverse proxy does not accept certain HTTP responses, which strictly speaking are not standard compliant.
    The HTTP response status of interest is HTTP status 304 which means that a requested resource has not been changed since the last request and therefore can be taken from the cache.
    The status is returned boldfrom the portal with a bodybold, which is not accepted by the reverse proxy.
    Now, what we would like to do is configure the portal to return HTTP status 304 with a header only. Is that possible? We looked into web.xml and web-j2ee-engine.xml but could not find any hint for this. Might easily be, we looked at the wrong places (they were multiple ones...).
    Thank you very much,
    Michael

    According to RFC 2616 the implementation of HTTP code 304 is:
    If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server SHOULD respond with this status code. The 304 response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields.
    The response MUST include the following header fields:
          - Date, unless its omission is required by section 14.18.1
    If a clockless origin server obeys these rules, and proxies and clients add their own Date to any response received without one (as already specified by [RFC 2068], section 14.19), caches will operate correctly.
          - ETag and/or Content-Location, if the header would have been sent
            in a 200 response to the same request
          - Expires, Cache-Control, and/or Vary, if the field-value might
            differ from that sent in any previous response for the same
            variant
    If the conditional GET used a strong cache validator (see section 13.3.3), the response SHOULD NOT include other entity-headers. Otherwise (i.e., the conditional GET used a weak validator), the response MUST NOT include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers. If a 304 response indicates an entity not currently cached, then the cache MUST disregard the response and repeat the request without the conditional.
    If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to reflect any new field values given in the response.
    Source: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    @Michael --> I honestly can't imagne that SAP wouldn't confirm to such an RFC (but I cannot guarantee), could it be that another component is adding the body to the 304 code or malforming this reply?
    @ SAP employees --> can you confirm if SAP has complied with RFC2616 or not???
    Cheers,
    Benjamin

  • SOAP Receiver Response Message

    I have setup the following scenario:
    Create PO in EBP --> XI --> Webservice
    In the Repository I have set up both the outbound and inbound message interfaces as Synchronous. The interface mapping has been setup to map both the request and response messages.
    In the Directory I have set up the SOAP receiver adapter and the receiver/interface determination and receiver agreement for EBP as the sender system and the external webservice as the receiver party/service.
    When I create a purchase order in EBP the webservice is called successfully and the PO gets created on the target system. The webservice returns a response message which I am expecting to see via SXMB_MONI but is not currently showing!! Is there some Directory configuration that I am missing?
    Any pointers would be appreciated.
    Regards
    Mark Briggs

    Hi Mark,
    >>>>n the Repository I have set up both the outbound and inbound message interfaces as Synchronous
    is your scenario sync or async?
    do the ID config with ID wizzard if you're not sure
    if will guide you
    if you have a sync scenario you shoudl see and error
    if you have no response withint the timeout
    do you see that in the calling application or in the XI ?
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • HTTP receiver adapter : message not reaching partner

    Hi,
    Scenario: IDOC -> PI7.0 -> HTTP
    Idoc has to be routed after mapping to XML message to partner via HTTP post.
    Partner says, he has not received any message from PI.I can see successful status in SXMB_MONI. As HTTP adapter is not part of adapter framework, so I can not see message under Adapter engine in RWB, Right?
    Outbound message has DTD reference, is this should cause any problems?
    One more thing, under sxmb_moni, under trace I can see message
    "HTTP code:200, Ok".
    How can I ensure that PI has sent successfully message to partner.
    Please note that for HTTP adapter configuration: I have created HTTP destination on XI system with URL, service number and path prefix. It is successful.
    Best Regards,
    Divyesh

    For the already executed scenario, there is nothing much you can do now. sxmb_moni is the last point for monitoring the http related call. For the traces you may check transaction sicf
    http://help.sap.com/saphelp_nw04/Helpdata/EN/80/b2dd3a6dac703be10000000a11405a/content.htm
    You may use TCPGateway to trace further calls.
    /people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
    Regards,
    Prateek

  • HTTP Synchronous Response Message

    hi,
    I am getting the following response message in the SXMB_MONI.
    <?xml version="1.0" ?>
      <!DOCTYPE cXML (View Source for full doctype...)>
    - <cXML version="1.1.009" payloadID="20060517092932992.5555CCLyVQDdasNetXE0B+Yy5OeXUHc=443-71.c0a81cb9f70d2c060000180f@wmqa3" timestamp="2006-05-17T09:29:32-CDT">
    - <Response>
      <Status code="500" text="Error">The document received is not a cXML request or is unknown by the AribaSupplier OnRamp package.</Status>
      </Response>
      </cXML>
    To capture this error message as Response message what message types need to be defined/configured?
    Thanks,
    Kumar

    Dirk -
    I am currently using Integration Process.
    I am capturing system messages through an Exception error handler in the block step of Integration Processes.
    When i execute the scenario, i see an error in the workflow in the Block Step. It shows an Error which says "No Exception Defined for System Errors", though i have a Exception Branch in the Block step.
    Any clues why i am not able to capture the Exception errors and send it through email.
    Its failing at the Block step.
    More details on the scenario:
    1. Start
    2. Receive Step - Asynch - IDOC
    3. Block Step - with Exception name as "TimeOut"
    3.1 Exception Branch with exception handler as "Timeout"
    3.1.1 - Transform Step - to transform a Exception message(with just one field) to "Error" message (with 5 fields)
    3.1.2 - Send Step - send the "Error" message through email
    3.2 Deadline branch set to 1 minute
    3.3 Switch step
    3.3.1 Transformation step - to transform the IDOC to XML
    3.3.2 Send step - Synch - request xml and response xml defined in this step
    4. Switch Step
    4.1 - Transform step - transforms the idoc and xml response to the actual error
    4.2 - Send Step - sends the actual error to the email message using MAIL adapter.
    Any tips would be grateful.
    Thanks,
    Tirumal

  • "Wrong" content in response message from Sync HTTP receiver connection

    Hello,
    We're trying to set up a synchronous HTTP receiver connection in a BPM to send a PO to a business partner. This partner will then respond with a response message or an error message.
    Request : messagetype_request
    Response : messagetype_response
    Fault message: messagetype_fault
    Our problem is that a sync HTTP connection apparently does not support the fault messages and therefore the errormessage, based on the messagetype "messagetype_fault" is returned into the responsemessage with messagetype "messagetype_response". This means that we can not perform any manipulation on this message due to the wrong messagetype compared to the content.
    Using a switch in the BPM that checks on the existence of an X-path expression we have already splitted branches for the errorhandling and succesfull response handling.
    Does anyone have an idea how to change the errormessage that is stuck in the messagetype_repsonse  format ?
    Thanks in advance !

    Hi Stefan,
    Thanks for the answer, but this leaves me with the main question how I can change a certain message within a BPM from one messagetype to another. Normally a simple message mapping would do the job but the problem in this case is that the source message does not have the message structure that would be expected by the BPM due to the error message being received in the message that was reserved for the correct response.

  • Receive HTTP Response Message

    I set up a HTTP Receiver Adapter and successfully sent a message to a http destination. The problem is, I can't find the Response Message from the HTTP destination. Where can I find it, and how can i handle it?
    Thanks!

    Hi,
    HTTP Receiver channel will send always send you (XI) a response code back. 200 in case of success. Based on the response from Http you can send your response back to your Source System.
    Btw I'll suggest you to go for SOAP Receiver Adpater instead of htp receiver, as http receiver adapter doesn't support Network Proxy in channel configuration.
    Let me know if you need any more inputs on this.
    Reward points if answer is useful 
    Thanks
    Amit

  • PI 7.11 - Sync HTTP receiver adapter with response XML file

    Hi
    We have a File to HTTP scenario in which we need a sync HTTP interface. We send a file to the HTTP address and receive a XML acknowledge. As I read in this forum: sync HTTP interfaces are not possible with the "standard" HTTP adapter. So I found an entry which recommended to use the SOAP adapter instead.
    I configured it:
    - Do Not Use SOAP envelope
    - modules: RequestResponseBeans, CallSapAdapter, ResponseOneWayBean
    If i use this scenario, i get following error in the RWB - Message Display Tool:
    Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageId() of an object loaded from local variable 'message1'.
    I testet this scenario using CURL and it worked properly. Should this kind of scenario work with the SOAP adapter or do I need to buy/develop an own adapter? Is in NW7.3 possible to configure sync HTTP scenarios?
    Thanks in advance
    Michael

    Hi
    actually i use a simple HTTP receiver CC with the setting "XI Payload in HTTP Body" to send a XML datafile to a webpage (java servlet). This part works fine by now. But, this servlet would also send back a status information to the state of the received datafile, which I like to catch.
    e.g. HTTP response from the servlet (catched using CURL):
    HTTP/1.0 403 Forbidden
    Server: Apache-Coyote/1.1
    X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA (build: SVNTag=JBPAPP_4_3_0_GA date=200801031548)/Tomcat-5.5
    Set-Cookie: JSESSIONID=OALHMomjR9TVgIATi8SrPQ**.ajp13_ls_1; Path=/ls
    Content-Type: text/xml
    Date: Tue, 06 Mar 2012 16:19:56 GMT
    X-Cache: MISS from proxy.xxxx.com
    Via: 1.0 proxy.xxxx.com:xxxx (http_scan/4.0.2.6.19)
    Proxy-Connection: close
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE transportordersfromls [ <!ELEMENT transportordersfromls (userid, clntid, msgid, (transportorderfromls+ | error))> <!ATTLIST transportordersfromls vers CDATA #REQUIRED> <!ELEMENT userid (#PCDATA)> <!ELEMENT clntid (#PCDATA)> <!ELEMENT msgid (#PCDATA)> <!ELEMENT transportorderfromls (refid, status)> <!ELEMENT refid (#PCDATA)> <!ELEMENT status (ok | error+)> <!ELEMENT ok EMPTY> <!ELEMENT error EMPTY> <!ATTLIST error reason (XMLError | SystemNotAvailable | ApplicationError | OTHER) #REQUIRED message CDATA #REQUIRED> ]>
    <transportordersfromls vers="1.0">
        <userid/>
        <clntid>XXXXX</clntid>
        <msgid>0</msgid>
        <error reason="OTHER" message="Access denied"/>
    </transportordersfromls>
    Michael

  • SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPT

    Hi there,
    I am trying to publish a file from SAP as web service using XI and SOAP Adapter.
    I am using ABAP proxy to get the data into XI.
    Designing and Configuration in XI has no problems because when i use File adapter the data is trasmitted to FTP server.
    But when I used SOAP Reciever adapter I am getting following error in RWB
    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 Error during parsing of SOAP header.
    <b>Scenario</b>: SAP ABAP Proxy -> XI -> WebService. Asynchronous.
    <b>SOAP</b> Receiver adaptor.
    <b>Target URL</b> http://<host>:<port number >/sap/xi/engine?type=entry&version=3.0&Sender.Service=SAPDC2653&Interface=urn:bzttest:00:hsa:test%5EOB_MI_BZT_TEST&QualityOfService=ExactlyOnce
    Do not use SOAP Envelop is checked.
    <b>SOAP Action</b> http://sap.com/xi/WebService/soap1.1
    What i am missing here? How should I solve this problem?
    Any help is appreciated,
    Thx,
    Yogi

    Say there's a bapi/rfc that you want to call on an R/3 backend (e.g. 4.6c).  On it's own, the R/3 system cannot expose the rfc/bapi as a web service, but XI can.  So in this case, the scenario would be:
    WS client -> XI -> R/3
    When XI "exposes" a web service, it is exposing a service for a receiving system (in the above example, the R/3 system).  XI itself does not provide or contain the service implementation.  When XI exposes a web service, it is always done via the <b>sender</b> soap adapter (i.e. if soap adapter is used).   Receiver soap adapter is used to call or consume an actual web service from an external application.
    Regards,
    Jin

  • Soap Receiver Adapter - No Response Message

    Hi, I've got the following scenario: Idoc - XI - Webservice. I've imported the WSDL from the .NET webservice and used the input and output messages in a syncronous interface.  I've setup a SOAP Receiver adapter with the Webservice details.  Everything is working fine when I call the webservice and the data is received 100% at the target system, but I am not getting ANY response back on XI.
    RECEIVER SOAP ADAPTER Audit LOG:
    2008-01-24 16:41:57 Success SOAP: request message entering the adapter with user J2EE_GUEST
    2008-01-24 16:41:57 Success MP_LEAVE1
    2008-01-24 16:41:57 Success The message was successfully delivered to the application using connection SOAP_http://sap.com/xi/XI/System.
    2008-01-24 16:41:57 Success Acknowledgement creation triggered for type: AckNotSupported
    2008-01-24 16:41:57 Success SOAP: completed the processing
    2008-01-24 16:41:57 Success SOAP: continuing to response message 83638fb0-ca8a-11dc-b36c-00145eed9500
    2008-01-24 16:41:57 Success SOAP: sending a delivery ack ...
    2008-01-24 16:41:57 Success SOAP: sent a delivery ack
    2008-01-24 16:41:57 Success The message status set to DLVD.
    2008-01-24 16:41:57 Success Acknowledgement sent successfully for type: AckNotSupported
    Has it got anything to do with the "AckNotSupported" type?  Is "AckNotSupported" the default setting for the receiver SOAP adapter?  If so, where do I change this setting?
    When I call the webservice with the exact same input using a standalone tool, I get the response message back 100%.  Any help will be appreciated.
    Thanks
    Rudi

    Hey
    you are confusing between a response and an acknowledgement.
    response and acknowledgement and not one and the same thing.
    response is basically used when you send some query to the receiver system and expect a set of value(s) for your query.for e.g sending a query to a Database(JDBC) or SAP system(RFC)
    and acknowledgement is just a notification that the message was receiver by the receiver correctly,it does not returns you a set of value(s).
    now coming to your question,ALEAUDIT IDOC is generated when an IDOC is posted,since in your case you are not posting and IDOC,instead your are sending it ,i m not sure if ALEAUDIT will be generated or not,one thing that will come to your rescue is that every receiver SOAP adapter expects a HTTP response(irrespective of you explicitly asking it or not).
    a HTTP 200 means that messages were posted successfully,and HTTP 500 means application error,get this HTTP response and send it back to the SAP system,most probably you would need to use BPM for this.
    Thanx
    Aamir
    Edited by: Aamir Suhail on Jan 24, 2008 11:26 AM

  • WSRM Adapter replaced with soap in PO7.4. Getting error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error"

    Hello All,
    We have scenario proxy->pi->webservice. In older versions of PI system they used wsrm adapter at receiver side and it's working fine.
    Receiver interface is asynchronous. So no response structute is present and receiver service is business component(since receiver is a third party).
    During migration, we have replaced the receiver adapter with SOAP adapter and used message protocol as SOAP 1.1 but the message is failing and in communication channel it is showing error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error". In this case the receiver interface is stateless xi 3.0 compatible(re using the old), after changing it to just stateless also issue persists.
    In target url field if i prefix the url with "http" then above mentioned error is occurring otherwise if i use the hostname:port/path.. then it is giving error
    "soap: Call failed: com.sap.aii.af.sdk.xi.srt.BubbleException: Unsupported protocol". So maintaing the url as http://hostname:port/pat.....
    As in old channel wsrm channel there is no userid and password, i haven't given any userid/pwd in receiver channel.
    used the bean sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean with  parameters
    Module Key  =  soap
      Parameter Name  =  noSOAPMakeSysErrFromResponseFault
    Parameter Value  =  false
    and
    xmbws.No SOAPIgnoreStatus = true
    but not successful.
    Please help me. I got stcuk here.

    Hello Jannus,
    The connectivity is working fine. Network team has confirmed it. I doubt that any strucutre(header) difference might be present in message when sending with wsrm adapter compared to sending with soap adapter.
    Please let me know the exact difference between soap and wsrm functionality in receiving end.
    By considering the structure issue, i have checked the "do not use soap envelope" check box, then i got error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Unsupported Media Type"
    Then i used message transform bean, but not successful.
    Regards,
    Ch.Venkat.

  • How to send te XML data using HTTPS post call & receiving response in ML

    ur present design does the HTTP post for XML data using PL/SQL stored procedure call to a Java program embedded in Oracle database as Oracle Java Stored procedure. The limitation with this is that we are able to do HTTP post; but with HTTPS post; we are not able to achieve because of certificates are not installed on Oracle database.
    we fiond that the certificates need to be installed on Oracle apps server; not on database server. As we have to go ultimately with HTTPS post in Production environment; we are planning to shift this part of program(sending XML through HTTPS post call & receiving response in middle layer-Apps server in this case).
    how i can do this plz give some solution

    If you can make the source app to an HTTP Post to the Oracle XML DB repository, and POST contains a schema based XML document you can use a trigger on the default table to validate the XML that is posted. The return message would need to be managed using a database trigger. You could raise an HTTP error which the source App would trap....

  • Issue when receiving SOAP message with HTTPS on non-central adapter engine

    Hi,
    we have a central XI system (PI 7.1 EHP1 SP03) and a non-central adapter engine (XI 3.0) in the DMZ, both systems on HP-UX.
    In the affected configuration scenario, a business partner is sending us IDocs (INVOIC.INVOIC01) over HTTPS with Certificate Authentication and without SOAP Envelope.
    The configuration and security settings seem to be correct, because we've already received several messages successfully over this connection. Now, since several weeks no message arrives anymore in our system, while the business partner always gets a HTTP_OK_200 response. So the messages seem to be accepted by our system, but nothing is shown, neither in the MessageMonitoring or CommunicationChannelMonitoring of the Runtime Workbench, nor in the in the traces/logs of the NetweaverAdministrator (trace level = DEBUG for "com.sap.aii.adapter.soap").
    I also removed the assigned user in the sender agreement which should cause a HTTP_500_error on sender side, but our business partner still got a "OK_200" notification and we didn't find any information in the trace of our system.
    When using TCPGateway to trace the communication, I can see an arriving message and the response, but it's encrypted because of HTTPS.
    1) Did anyone have similiar issues yet?
    2) Are there any further possibilities to check if an incoming message at the SOAP adapter fails?
    3) Which further trace settings can be done, to get most detailed informations about the soap traffic?
    4) Is there a way to decrypt the message of the TCPGateway (e.g. with private key of server)?
    I'm looking forward for any helpful hints or information!
    Regards,
    Juergen

    Issue solved by SAP note 1115650 "J2EE Engine kernel.sda SP20 cumulative patch"

  • SOAP Receiver Error: HTTP Error response for SOAP Request

    Hi gurus,
    I'm facing a weird error in File --> PI 7.31 java only --> soap receiver proxy.
    The other interfaces runs well. just one get the the following error:
    Exception caught by adapter framework: java.io.IOException: Error receiving or parsing request message: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.
    I check the payload and test in the inbound proxy. on error.
    Any hints?
    Thanks a lot!
    regards
    Christine

    Hello Christine,
    I faced the same issue,
    You can use the beans below to overcome the error.
    And charset should be utf-8

Maybe you are looking for