Namespace prefix problem in http adapter response

Hi All;
I use http adapter to call a third party service. I  post a XML request and it responses me as XML again..
But when I call the proxy, it gives mapping error in response. because it expects namespace prefix in the first tag of the response xml.
How can I get this xml back without any namespace?
My response xml likefollowing  
<?xml version="1.0" encoding="UTF-8" ?>
    <OrderLines>
       <item>
           <DocumentNo>99000140</DocumentNoitem>
    </item> 
</OrderLines>
but the adapter expects as
<?xml version="1.0" encoding="UTF-8" ?>
    <ns0:OrderLines xmlns:ns0="http://company.com">
       <item>
           <DocumentNo>99000140</DocumentNoitem>
    </item> 
</ns0:OrderLines>

You can use the XMLAnonymizer module with your adapter (if you are using SOAP adapter for the call as HTTP adapter does not support modules) to remove the namespaces. Kindly check the following blogs for modules:
Gabriel Sagaya Selvam - Standard Adapter Framework modules in PI 7.1 u2013Part 1
/people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-1
Gabriel Sagaya Selvam - Standard Adapter Framework modules in PI 7.1 u2013Part 2
/people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-2
Regards,
Gökhan

Similar Messages

  • UTF-8 encoding problem in HTTP adapter

    Hi Guys,
    I am facing problem in the UTF-8 multi-byte character conversion.
    Problem:
    I am posting data from SAP CRM to third party system using XI as middle ware. I am using HTTP adapter to communicate XI to third party system.
    in HTTP configuration i have given XML code as UT-8 in the XI payload manipulation block.
    I am trying to post Chines characters from SAP CRM to third party system. junk characters are going to third party system. my assumption is it is double encoding.
    I have checked the Xml messages in the Message monitoring in XI, i can able to see the chines charaters in XML files. But in the third party system it is showing as junk characters.
    Can you please any one help me regarding this issue.
    Please let me know if you need more info.
    Regards,
    Srini

    Srinivas
    Can you please go through the SAP Notes 856597 Question No.3 which may resolve your issue? Also have you checked SAP Notes 761608,639882, 666574, 913116, 779981 which might help you.
    ---Satish

  • Multi-byte character encoding issue in HTTP adapter

    Hi Guys,
    I am facing problem in the multi-byte character conversion.
    Problem:
    I am posting data from SAP CRM to third party system using XI as middle ware. I am using HTTP adapter to communicate XI to third party system.
    I have given XML code as UT-8 in the XI payload manipulation block.
    I am trying to post Chines characters from SAP CRM to third party system. junk characters are going to third party system. my assumption is it is double encoding.
    Can you please guide me how to proceed further.
    Please let me know if you need more info.
    Regards,
    Srini

    Srinivas,
    Can you go through the url:
    UTF-8 encoding problem in HTTP adapter
    ---Satish

  • Remove ns1: namespace prefix in HTTP adapter

    Dear Experts,
    I'm facing the following issue, using the plain HTTP receiver adapter:
    when I'm sending out my XML message, the "usual" ns1: namespace prefixes are added to the message.
    It goes out like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:INQUIRY xmlns:ns1="urn:namespace.com:retail">
    <SESSION_ID>0000157338</SESSION_ID>
    <POSITION>
    <item>
    </ns1:INQUIRY>
    And it should be like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <INQUIRY xmlns:ns1="urn:namespace.com:retail">
    <SESSION_ID>0000157338</SESSION_ID>
    <POSITION>
    <item>
    </INQUIRY>
    In previous forum-threads, there are several proposed solutions:
    1. using the XMLAnonymizerBean
    It doesn't work here, because in plain HTTP I cannot call up any module processor (it doesn't go through the AE)
    2. using XSLT to remove the complete namespace
    It is not good, because I have to keep the namesapce, but without the ns1 prefixes
    So, the question to you is: how to delete only(!) the ns1 prefixes, keeping the original namespace in the message.
    Any comments are welcome!
    Best regards,
    Andras Kovacs

    Dear Stefan,
    thank you for the helpful response!
    Some thougths about the proposed solutions:
    - Create external wsdl/xsd without prefix: I tried thois point with Sytlus-Studio, but here I can only delete/remove the whole namespace. If I leave the namespace in the message, the prefix will be added again as well.
    - Java mapping: the general question here, how to remove something from the payload? Should we use string manipulation (like Alessandro mentions it in his blog: /people/alessandro.guarneri/blog/2006/10/13/get-rid-of-recordset-node ) or should we use here SAX ? Is there any "standard" solution for this?
    - Use SOAP adapter instead of plain HTTP: it worked quite well and I could remove the prefix with the XMLAnonymizer Bean!
    Here you mentioned that it can called up in "no SOAP mode". Do you mean here check in the "don't use SOAP envelope" checkbox or is it something more?
    Thank you in advance for the useful responses!
    Best regards,
    Andras

  • Remove Namespace Prefix from SOAP response

    Hi
    I have a File-XI-SOAP scenario. I pass data from the file to SOAP. If the data is good, I receive a Response and If the data is bad I get an fault message called AccountUtilsException. But I am not able to read this message properly.
    The message we receive from the webservice is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Request Message Mapping --> <edu.purdue.account.AccountUtils.AccountUtilsException xsi:type='ns1:AccountUtilsException' xmlns:ns1='urn://www.purdue.edu/apps/account/ns'><message xsi:type='soapenc:string' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>lastName is a required field</message><type xsi:type='xsd:int'>5</type></edu.purdue.account.AccountUtils.AccountUtilsException>
    In sxmb_moni when we try to read this message I get the error Reference to undeclared namespace prefix: 'xsi'.
    I tried removing the xsi prefix using anonymizer.acceptNamespaces = urn://www.purdue.edu/apps/account/ns ns1.
    I tried this too urn://www.purdue.edu/apps/account/ns ''.
    the AF_MODULES/AnonymizerBean is second in my processing sequence immediately following the XISOAPAdapterBean.
    The problem still persists. Any suggestions? The webservice people are not willing to remove the xsi:
    Thanks,
    Jahnavi

    The XMLAnonymizerBean does not consider namespace prefixes in attributes. So you should allow also those prefixes and namespaces which are used here.
    Without the XMLAnonymizerBean the xsi namespace declaration should be available as well, if not it is a bug. Check if you have applied the latest patch and open an OSS ticket, if this is the case.
    Regards
    Stefan

  • Namespace prefix in SOAP Elements causes problems in XI

    Hi guys,
    I'm using code generated by NW Developer Studio for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but XI doesn't like the namespace prefixes and throws back a DeliveryException.
    The SOAP message created by the generated NWDS code is:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="http://allieddomecq.com/poc" xmlns:tns="http://allieddomecq.com/poc">
         <SOAP-ENV:Body>
              <wn4:PortalSOAP_MT_Request>
                   <wn4:CustomerIdentifier>0001000064</wn4:CustomerIdentifier>
                   <wn4:SalesOrganization>ES50</wn4:SalesOrganization>
                   <wn4:SystemIdentifier>R3D</wn4:SystemIdentifier>
              </wn4:PortalSOAP_MT_Request>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The problem is the "wn4" prefixes on the CustomerIdentifier, SalesOrganization, and SystemIdentifier tags. When we send the soap request from XML Spy without the prefixes, the response comes back OK with the expected data.
    I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.
    Alternatively, is there something I could ask our XI consultant to do, to make his component accept the request with the redundant prefixes in the tags?
    Many thanks for any advice/help,
    Laura

    Hi Laura,
    you have to realize that the two documents
    <ns:CustomerRecord xmlns:ns="http://company.com">
    <ns:CustomerNumber> </ns:CustomerNumber>
    <ns:CustomerDetails> </ns:CustomerDetails>
    </ns:CustomerRecord>
    and
    <ns:CustomerRecord xmlns:ns="http://company.com">
    <CustomerNumber> </CustomerNumber>
    <CustomerDetails> </CustomerDetails>
    </ns:CustomerRecord>
    from an XMl point of view have totally fifferent structure. Thus, a mapping which is able to deal with the first structure will fail for the second and vice versa.
    Surely, both structures somehow can carry the same information, but they do this with different languages (Maybe you can compare this to the fact, that you may deliver the same information in English or in German language).
    When you model the structure in Integration Repository using datatypes and message types (what I think you did), you will always get a structure that looks like the second one. This is just a convention (like the convention that all information in this forum should be presented in English). When defining a message mapping for this structure it also relies on this fact and thus will not understand the other kind of document.
    External Definitions are more flexible. They are also able to understand structures that are modelled the other way. This greater flexibility is due to the fact that External Definitions were designed to understand structures that come from an external world where different conventionts might be used.
    To come to a conclusion: If the structure you have to deal with has been defined externally then it is not intended that you model it inside the Integration Builder using datatypes and message types. In this case the external source should provide a description of the message as XSD, WSDL, or DTD. You upload this as External Definition, and everything works fine.
    If you have designed the structure yourself, you can model it with datatypes and message types. But then you will always get a structure which looks like the second one. In this case you should make sure that all other participants in the game also stick to that structure. Then everything will be fine, too.
    Greetings Stephan

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • 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

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

  • Using HTTP adapter with no namespaces

    Hi,
    Is there anyway to use HTTP adapter when the provider does not accept the namespaces. The HTTP binding wizard requires a targetnamespace to be defined in the request and response xsds that we have to use.
    Thanks & Regards
    Siva

    Bernd we are trying to do the same thing only with the soap adapter.  I'm convinced that no one really knows how to do it.  We can't even find an SAP CONSULTANT that has done it .. at any cost!
    If you hear anything good .. please let me know - my email is [email protected]
    I think the nightmare is coming in because when SAP bought the j2ee ( application server ) they never really have integrated it so it's very confusing if the settings need to be done on the ABAP side or the J2EE side via visual administrator.  In addition most Basis guys are only experienced in the ABAP side and not the J2EE.

  • Problem with namespace prefix

    Dear all,
    I'm using code generated by NW Developer Studio  2004s for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but ECC (ERP 6.0) doesn't like the namespace prefixes (the namespace was not recognised by the ECC mapping tool.)and throws back a DeliveryException.
    The SOAP message created by the generated NWDS code is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="urn:sap-com:document:sap:rfc:functions" xmlns:tns="urn:sap-com:document:sap:rfc:functions">
    - <SOAP-ENV:Body>
    - <wn4:Z_APPOINTMENT_GET_JCO_ORG>
      <wn4:DATE_FROM>2007.01.01</wn4:DATE_FROM>
      <wn4:DATE_TO>2008-02-02</wn4:DATE_TO>
      <wn4:USERID>EGREO</wn4:USERID>
      </wn4:Z_APPOINTMENT_GET_JCO_ORG>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.
    I am using portal server 2004s
    Many thanks for any advice/help
    Reza

    I find out how should I do that.
    /Reza

  • HTTP Adapter - Problem sending message to XI.

    Hi,
      We have configured a scenario in IR and ID for the HTTP -> XI -> RFC message flow. We have created all the configuration objects (Receiver determination, receiver agreement, interface determination) in ID except the Sender Agreement (There is no Sender HTTP Adapter). So to trigger this interface we are sending the message to the following URL using a client HTML page.
    http://IPAddr:8000/sap/xi/adapter_plain?namespace=http://sap.com/xi/XI/TestPOC/r3&interface=MI_File_RFC_WeyPOC&service=SourceBS_XI&QOS=BE&sap-user=J2EE_GUEST&sap-password=JGUEST&sap-client=001&sap-language=EN
    After submitting the contents in HTML page, it is asking us SAP Web Application Server user id and password. Which user id shall we give here. We have tried giving the J2EE_ADMINISTRATOR user id and it's password but it gives "the requested resource does not exist" error messgage.
    How to resolve this problem ?
    Thanks and Regards,
    Lalit.

    Hi Lalit,
    try the xiappluser or a copy of it, like Sudhir said.
    But there is something else...
    You must code special characters such as forward slash (/), hyphen , period (.), or colon ( with escape characters (for example, %2F for /, %2D for -, %2E for .,and %3A for :).
    ( http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm )
    Yours,
    Thomas

  • Problem with plain http adapter on XI 2.0

    Hi all,
    i have a problem setting up proper communication between XI 2.0 and PI 7.0 system using plain http adapter.
    Regardless of what i pass as url argument, i always receive the following error message:
    HTTP-Server Code 500 Reason Internal Server Error Explanation URL-Parameter namespace (Sender Interface-namespace) is missing (see first link)
    SXMB_MONI Trace:
    [http://image-upload.de/image/Rv3NeE/77c11c84fc.jpeg]
    Configuration:
    [http://image-upload.de/image/5Z2Gwr/90c19f2074.jpeg]
    [http://image-upload.de/image/hGrzQL/559bf5e566.jpeg]
    [http://image-upload.de/image/2WqCqz/7513a1a366.jpeg]

    Hi,
    the namespace of the inbound interface in the interface determination was missing. So now it kind of works. But we still have the problem, that we are not able to pass parameters via URL, the XI 2.0 just ignores them.
    Is there a way to enhance the url by using the Header Fields tab. Can you give me an example for the valid params?
    Best Regards
    Sven

  • Can I get a response back when I use HTTP adapter

    Hi ,
    I am doing a integration between SAP and ThirdParty Product using PI 7.1.
    The scenario is ThirdParty -> PI -> SAP ,using HTTP adapter between ThirdParty and PI , and IDoc adapter between SAP and PI.
    So,its a HTTP sender and IDoc receiver.
    So I was just curious to know if the IDoc posting failed in SAP ,can I send a response from SAP to Thirdparty regarding the failure along with some error message.
    Thanks for your responses.
    Venu

    Hi,
         It may lead to some timeout problems if you design your scenario as synchronous i.e sending response back to HTTP..
    as SAP may take time to process idoc and need to provide response back to PI ..by that time the connection may become invalid and thirdparty may receive response as timeout error...
    As anyway PI has the option of Alert managements..you can trigger the error mail to the third party recipients for letting them the status...
    HTH
    Rajesh

  • 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

Maybe you are looking for

  • How to Prevent User for Multiple click on form Submit button ??

    Hi, Is there any easy solution rather than AJAX or any HARD Solution. to prevent user from being submit for only once... So database record remain consistent rather than redundant. if any JAVASCRIPT SOLUTION IT WOULD BE BETTER ONE. WHAT SHOULD I DO ?

  • How to filiter in abap report

    Hi Frds I have created abap report ,in selection screen Project,year,period and Company code is given.Now the end user asking me to restrict the output of the report based on company code which we giving in selection screen.. For Example: User1      

  • Error While Payment Proposal F110

    Dear All, I am facing problem while running transaction F110. Error Message is "Company codes GEIL/GEIL do not appear in proposal 10.03.2009 GEIL3; correct" where as GEIL is a paying and sending company code and GEIL3 is Identification id. Also attac

  • Socket and 0x00 byte...

    I've been working on some code to load data using the new flash.net.Socket class, but I seem to have a problem with files being sliced at '0x00' bytes... For example, should I try to send (download) AA BB CC DD EE FF 00 11 22, and then query the byte

  • How to blur out someone's face in video?

    I am new to video editing and I am using iMovie '06. I have imported a video I shot that I want to upload to my You Tube and my web site, but I need to blur out someone's face for their privacy (I don't have a signed release from them.) Is there a wa