SOAP Adapter Content-Type

Hi,
we move a Interface from BC to XI and now the problem come up that the content type isn't correct anymore.
With BC we Post a request with Content Type <b>application/x-sap.idoc</b> to a specific url.
With XI i use the SOAP Adapter for sending the Idoc structure but now in the header the Content-Type is <b>application/xml</b> is there any possibility to change this in the SOAP Adapter.
Or do i have to use another adapter? Somebody has experience with that?
Regards,
Robin

I don't know a standard way to modify the Content-Type.
You can write a custom adapter module that make this:
From http://help.sap.com/saphelp_nw04/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm
<i>"In the receiver adapter, if you want to add your own modules to process the request message, you add them before the module specified below; if you want to add your own modules to process the response message, you add them after the following module:
sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean"</i>
Or you may try to use the HTTP adapter, there you have the control on content-type
Regards,
Sandro

Similar Messages

  • SOAP Adapter:  Content Type Issue in WebServices via HTTP

    Hi,
    I have configured a Receiver SOAP adapter. When i had to test the message i had an HTTP 415 error.
    i found that the sender SOAP adpater that received this message is not capable of handling Content-Type: Application/XML i.e. which is being transmitted by the Receiver SOAP Adapter.
    Please let me know how to configure in the Receiver SOAP adapter so that the HTTP Content-Type would be TEXT/XML instead of Application/XML .
    Thanks in Advance,
    Venkatesh

    Hi Michal,
    I have created a Web service for a RFC function Module. The webservice is available in SOAMANAGER.
    It got activated also .  But whenever I tried to test, I am getting the below error,
    "Message Envelope not found. Probably Empty SOAP message"
            Request:
            POST /sap/bc/srt/rfc/sap/yotci_i015_linkp8sap/100/yotci_i015_linkp8sap/yotci_i015_linkp8sap HTTP/1.1
    Host: sapkrftewd01.krft.net:8030
    Content-Type: text/xml; charset=UTF-8
    Connection: close
    Authorization: <value is hidden>
    Content-Length: 657
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Header><sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/"><enableSession>true</enableSession></sapsess:Session></SOAP-ENV:Header><SOAP-ENV:Body><ns1:YotciI015Linkp8sap xmlns:ns1='urn:sap-com:document:sap:soap:functions:mc-style'><IvParam1>POD</IvParam1><IvParam2>00006095</IvParam2><IvParam3>01/14/2009</IvParam3><IvParam4>PDF</IvParam4></ns1:YotciI015Linkp8sap></SOAP-ENV:Body></SOAP-ENV:Envelope>
             Response:
            HTTP/1.1 500 Message E 1S 406 cannot be processed in plugin mode HTTP
    content-type: text/xml; charset=utf-8
    content-length: 0
    accept: text/xml
    sap-srt_id: 20090224/141936/v1.00_final_6.40/49A4677A2D0736EDE10000000A3597E9
    server: SAP Web Application Server (1.0;700)
    Is this because of "do not use SOAP envelope" check?
    I didn't check this check box.
    If that is the error could you please tell me how to see the "do not use SOAP envelope"?
    Where can I find SOAP channel?
    I am very new to SOAP concept. 
    One JAVA application is going to invoke this Webservice from SAP.
    Please help me.
    Thanks,
    Bala.

  • Receiver AS2 Advantco Adapter Content type change

    Hi All,
    I am working on SFTP to As2(Advantco) scenario. We are sending the txt files to target.
    As of now file is sent with content type application/xml. But target system is asking to change it to "application/octet-stream"
    In the AS2 adapter guide, there is section 3.4.4.8. MIME Settings which talks about content type change.
    Unfortunately i am not seeing that in the receiver channel.
    does anyone know how to change the content type for AS2 channel?
    Will standard adapter module work on third party adapter? like messageTransformBean
    Thanks.

    This could be because of adapter metadata is not updated one?
    >>> Yes. It's very much possible.
    Will standard adapter module work on third party adapter? like messageTransformBean
    >>> AFAIK - Advantco adapters does support MTB.

  • Error in soap - Invalid content type

    Hi all
    In soap lookup, i am getting a error that the content type is invalid.
    This is the string from which i have derived the xmlPayload.
    <i><ConversionRate xmlns="http://www.webserviceX.NET/"> <FromCurrency>INR</FromCurrency><ToCurrency>USD</ToCurrency></ConversionRate></i>
    My error message is
    <i>invalid content type for SOAP: TEXT/PLAIN: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN'. Cause Exception: 'invalid content type for SOAP: TEXT/PLAIN'.</i>
    Can someone please suggest me what could have gone wrong?

    url -http://www.webservicex.net/CurrencyConvertor.asmx
    action- http://www.webservicex.net/ConversionRate
    I have enabled Keep headers, Keep attachments, Use query string.
    <b>my code:</b>
    AbstractTrace trace=null;
    try{
    trace=container.getTrace();
    Channel soapChannel=LookupService.getChannel("soaplookup_buss","soap_ib");
    trace.addDebugMessage("channel created");
    SystemAccessor accessor=LookupService.getSystemAccessor(soapChannel);
    trace.addDebugMessage("accessor created");
    String message="<ConversionRate xmlns=\"http://www.webserviceX.NET/\"><FromCurrency>TRY</FromCurrency><ToCurrency>AFA </ToCurrency></ConversionRate>";
    InputStream inputStream = new ByteArrayInputStream(message.getBytes());
    XmlPayload reqPayload = LookupService.getXmlPayload(inputStream);
    Payload resPayload=accessor.call(reqPayload);
    return "success";
    catch(Exception e){
    trace.addDebugMessage("exception occured"+e);
    return "exception occured";

  • Receiver Mail adapter Content type issue

    Hello,
    I am formatting the body of the receiver mail. The body of the email  should look like below.
    Dear PI User,
    The following Interface has been successfully processed by the middleware PI system.
    Please do not reply to this email. If you need more information please contact the Super User.
    Regards,
    SAP PI Team
    The mapping looks fine and My source MT looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Mail_Reply xmlns:ns1="http://test.com/Mail/Reply"> 
    - <Reply>  [0..unbounded] 
    - <Item> [0..unbounded] 
    <MESSAGE>Dear Business User, </MESSAGE>   [0..1] 
    /Item>
    - <Item> 
    <MESSAGE>The following Interface has been successfully processed by the middleware PI system.</MESSAGE> [0..1]
    </Item>
    - <Item> 
    <MESSAGE>Please do not reply to this email. If you need more information please contact the Super User.</MESSAGE> [0..1]
    </Item>
    - <Item>
    <MESSAGE>Regards,</MESSAGE> [0..1] 
    </Item>
    - <Item>
    <MESSAGE>SAP PI Team </MESSAGE>  [0..1]
    </Item>
    </Reply>
    </ns1:MT_Mail_Reply>
    The mapping works fine without errors and I get the target message as below after mapping-
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30"> 
    <Subject>ISAP PI Interface Status</Subject> 
    <From>[email protected]</From> 
    <To>[email protected]</To> 
    <Content>Dear Business User</Content> 
    <Content>The following Interface has been successfully processed by the middleware PI system.</Content> 
    <Content>Please do not reply to this email. If you need more information please contact the Super User</Content>
      <Content>Regards,</Content>
      <Content>SAP PI Team</Content>
    </ns1:Mail>
    t
    The context of MESSAGE has been changed to Reply.
    In the adapter I still get the following error.       
    Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: expecting end tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {}Content at state 1
    Please advise !!
    Thanks,
    Teresa
    **I changed the receiver mail adapter to not use Mail package and I receive an email without errors with the Content as mentioned above. **

    Hi Teresa,
    I think the problem is that you are using multiple "Content" tags. Have you tried to use only one?, you can concatenate all your text.
    Check the page 3 of this document to know how introduce new-line character http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5992?overridelayout=t…
    Regards.

  • Problems using access control in sender agreement for SOAP adapter 7.1

    I am trying to use Access Control Lists to restrict user access to web services/interfaces which are exposed via PI. This can be configured via the Integration Builder Directory using the u201CAssigned Usersu201D tab of both Communication Components (Business System) and Sender Agreements.
    The configuration is via the above mentioned components. However, I understand that itu2019s the adapters which at runtime are responsible for actually applying these checks.
    I have been having problems getting the access control to work using a setup involving a SOAP adapter of type SAP BASIS 7.10.
    The symptom of the problem is that although the access control works as expected at the Business System level, any settings at the Sender Agreement level appear to have absolutely no effect whatsoever.
    I have confirmed that I have no problems if I use an adapter of type SAP BASIS 7.00. However, I really need to get this working on 7.1.
    I have looked on the SAP support portal but can not find any notes that relate to this.
    Has anyone else had a similar problem? And have you found a fix for it?
    Any suggestions would be welcome.
    Edited by: Malcolm Dingle on Jun 17, 2009 1:08 PM

    Hi Shai,
    Please have a look at the following link and see if it helps you .
    It deals with SOAP adapter installation and activation 
    Re: SOAP adapter installation and activation
    Best Regards
    Edited by: Prakash Bhatia on May 8, 2009 11:51 AM

  • SOAP adapter Using XI 3.0 error: invalid content type for SOAP: TEXT/HTML

    Hi All,
      I have the scenario to send a message to proxy via SOAP adapter . My PI server is 7.3 and my BI application server also 7.3. I have created service interface in the ESR and created the ABAP proxy in the Application server. Im using the receiver SOAP adapter with message protocol as XI 3.0. Am running this scenario in the central adapter engine. (That is i didnt create integrated configuration). I am facing the issue in the receiver SOAP channel as 'invalid content type for SOAP: TEXT/HTML: 401 Unauthorized'. But i can able to login into the URL which is given in the channel using the username and password used in the channel.
    Can you please let me know if any addtional settings need to be done in PI side.
    Regards,
    Ramalakshmi.G

    Hi,
      Thanks for your reply. I have done my scenario with the integration configuration. Still i am facing the same issue " SOAP: TEXT/HTML; HTTP 401 Unauthorized". I have given the correct URL, username and password. Is this enough to connect to the receiver integration server from AE. Any settings need to be do in the receiver ABAP system and PI system. If so please share the corressponding note for the same.  What should be the role is assigned to the userid given in the channel.
    I have used sproxy to create the proxy in the receiver ABAP system. In PI i am using the SOAP adapter with XI 3.0 ,message protocol to call to this proxy. I have not done any settings in any of the servers. Do i need to do any settings.
    Regards,
    Ramalakshmi.G

  • Invalid Content Type Error in Receiver SOAP Adapter

    Hello Experts,
    Is there a solution for this problem?
    I am getting the following error in one of my receiver SOAP adapters:
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:...:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
    I have checked the message I am sending to the receiver adapter and it is XML, ok. After checking this thread: Re: Error in soap receiver adapter and SAP note 856597 I used the TCPGateway program to check what the web service is answering to the adapter request and I found the problem is due to an authentication failure. The TEXT/HTML is an error page the SAP WebAS that hosts the webservice is sending out as response saying no login method succeeded.
    However...  The webservice URL and basic authentication information, the user and password, are configured correctly. I double checked it and I can also run the webservice using that information directly with wsnavigator on that WebAS.
    Checking the request message I found out that the root problem is that the adapter is not sending out a basic authentication request as configured. It is actually sending a header with SAP SSO2 (single signon) ticket instead.
    The most strange thing is that I configured another channel exactly the same way and it sends a basic authentication header as it should and works correctly.
    So as a workaround I am using this new channel instead of the problematic one but why is the original sending SSO2 tickets? It is configured exactly the same as other channels. I think that SAP SSO authentication is not even supported by XI SOAP channels!!!???
    Thanks in advance for your kind responses.
    -Sam.

    Shabarish:
    Thanks for the link, but the real issue is not the request message (regarding your blog) but that the reply from the webservice is the standard HTML page informing no login module succeeded because the adapter is deciding completely on its own that it should use SAP single signon ticket instead of basic authentication as configured.
    Volker:
    I have performed full and delta cache refreshes to see if the channel performs as configured in the ID but it doesn't. It insists in trying to use SSO2 ticket instead of basic authentication.
    I am sure this is an ugly bug in the WEBAS Java, more so because an identically configured channel does use the basic authentication as it should. Anyone knows about a SAP note regarding this? I have performed many searches on the support service but haven't retrieved anything significant.
    Thanks for your help guys!
    -Sam.

  • How to set content type in SOAP AXIS sender adapter

    Hi All,
    I am trying to fetch the data from an URL which has special characters(like Ä, ï) using SAP PI - SOAP AXIS adapter. I am facing the below error in the channel.
    “error during receive: java.io.UnsupportedEncodingException: charset: utf-8”
    I need to set the content type as ISO-9958-1 but there is no such option present in the SOAP AXIS sender Adapter. Please let me know if there is any way to set the content type and fetch the data successfully.
    Thanks,
    Konda

    Hi Sudha,
    I have tried textcodepageconversion, Message
    Transformation and Annomizer beans but didn't help and this error is in sender SOAP AXIS adapter.
    Thanks,
    Konda

  • IOException: invalid content type for SOAP: TEXT/ using Sender SOAP adapter

    Hi all,
    When I am using Sender SOAP adapter, i am getting (MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System) exception.
    From my RWB I can see:
    2009-05-25 16:18:39 Information The message was successfully retrieved from the call queue.
    2009-05-25 16:18:39 Information The message status was set to DLNG.
    2009-05-25 16:18:39 Error Failed to parse the XI system response.
    2009-05-25 16:18:39 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML using connection SOAP_http://sap.com/xi/XI/System.
    2009-05-25 16:18:39 Error The message status was set to FAIL.
    2009-05-25 16:18:39 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIMessage creation failed (inbound). Reason: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage. Reason: java.io.IOException: invalid content type for SOAP: TEXT/HTML
    Please help if possible! Thanks!
    Mayank

    Hi,
    Check in SLD your integration engine business system have the following
    pipeline url : http://server:httpport/sap/xi/engine?type=entry
    check Http port also
    After that go to TCODE - SXMB_ADM - integrationn engine configuration and check if your server is configured as HUB with the same url or not.
    Thanks
    Kasturika Phukan

  • Soap sender adapter show invalid content type

    Hi dear mates,
    I have a SOAP-JMS scenario working succesfully on 7.3.1. But in 30 min after ICM restart (usin SMICM) something wrong happend because all Soap sender adapter fails showing that error.
    <text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not parse XMBMessage due to invalid content type for SOAP: TEXT/HTML
    If I restart manually ICM still working fine until next 30 min more or less.
    I have added MP transform bean to ensure that I am sending UTF-8 propertly. But it doens't work.
    Does anybody know a clue why occurs this strange behavior?
    Thanks in advance and regards.
    José Antonio.

    Thanks Vladimir,
    This is exactly the behavior. And yesterday we have to increase the memory because it has 32gb shared in two PI instances, 16gb(DEV) and 16gb(TEST). And the memory was always full.
    Recently I found the trouble. Doing SLDCHECK have this trouble also. SLDCHECK error-Check and maintain the SLD content for the current client
    So, I re-register once again the system in rz70 and review related Bussiness System. And BS pipeline URL was wrong :S because it hasn't be wrote with path /sap/xi/engine?type=entry.
    After restart SLD I do sldcheck and it looks perfect.
    Thanks to all.
    I hope this stupid error do not disturb any other consultants.
    Best Regards.
    Jose.

  • SOAP adapter error: invalid content type for SOAP: TEXT/HTML.

    Dear SAP experts,
    Need your help again here.
    Currently, i am getting this specific error in my RWB logs.
    The connection is from SAP XI going to Trading Partner via SOAP adapter.
    The specific error is:
    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: java.io.IOException: invalid content type for SOAP: TEXT/HTML.
    I've already searched on what is causing the issue and it seems majority of the information is that, the error might be due to incorrect/wrong URL that was set in the configurations in the SAP XI communication channel.
    Can you confirm this one?
    DO you have any thoughts on this error?
    Please help.
    Thank you very much!
    Fred

    Hi Freddiesan,
    First of all, test your URL acessing it from SAP PI server's local browser to check firewall and router settings.
    If it works, check these blogs:
    Regards,
    Rogério
    Edited by: Rogério Tambellini on Jul 3, 2009 12:52 PM

  • SOAP Rx Adapter... 401 Unauthorized.. Content Type: Text/HTML

    Hi,
    I get 401 unauthorized error while trying to invoke Webservice using Receiver SOAP Adapter..
    I know this error is b'cos Content-type = text/html instead of text/xml... So i used the MessageTransform bean with the required parameters... I even downloaded SOAP sniffer tool (suggested by Stefan grube & the log even says content type as text/html).. But still i keep getting text/html error...
    I don't have any problem invoking from my PI Server using SOAP testing tool.. I don't have a proxy between PI & Webservice as they are in the same network. I am able to reach the webservice but is failing b'cos of 'text/html'
    I am on PI7.1. Find the screenshots of the error in the below location...
    http://picasaweb.google.com/siva.maranani/SOAP_RxAdapter#5361872782883678738
    http://picasaweb.google.com/siva.maranani/SOAP_RxAdapter#5361872786622656386
    -Siva Maranani

    >
    Siva Maranani wrote:
    > I was able to use connect to Webservice using SOAP test tool ( on PI server) using the username/password. When i tested it it was sucess (I analyzed Header params- Content-type - text/xml). When i changed it to text/html, it throws an error... (not exactly 401 unauthorized.. but a different one)
    >
    > Even after i had the module, i am still not sure why it still compalins about Content-Type Text/HTML??
    >
    > -Siva Maranani
    it seems odd that you have the 401 error throwing up.
    one suggestion, if your network has a proxy, have you given the particulars in the adapter?
    ref:
    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

  • Getting invalid content type for SOAP: TEXT/HTML exception for Soap Adapter

    I am trying to invoke Webservice using SOAP Receiver Adapter
    but I am getting error
    <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
    Pls let me know
    Regards

    HI,
    see
    •     Q: What character encoding is supported by the SOAP sender adapter?
               A: The SOAP sender adapter can accept any character encoding supported by the local JDK. When you are using a particular character encoding with content type text/xml, you must make sure that the encoding name given in the content type and in the XML declaration must be consistent. What makes this more complex is that the default values. The default encoding for "text/xml" is US-ASCII, whereas the default encoding for the XML declaration is UTF-8 or UTF-16. The following examples show several valid combinations of content-type and XML declartion:
               text/xml
               <?xml version='1.0' encoding='us-ascii'?>
               text/xml; charset='utf-8'
               <?xml version='1.0' encoding='utf-8'?>
               text/xml; charset='utf-8'
               no declaration
               text/xml; charset='iso-8859-1'
               <?xml version='1.0' encoding='iso-8859-1'?>
               application/xml
               <?xml version='1.0' encoding='iso-8859-1'?>
               The response message from the SOAP sender is normally encoded in UTF-8. If you want to change this encoding, for instance to iso-8859-1, you can supply the encoding information with the xmlenc variable in the request URL as in:
               http://host:port /XISOAPAdapter/MessageServlet?channel=p:s:c&xmlenc=iso-8859-1
               Related Questions "What character encoding is supported by the SOAP receiver adapter?"
    Regards
    Chilla

  • Content type in SOAP receiver communication channel

    Hello,
    so far I thought that the SOAP receiver adapter always sets the content type to text/xml. However now I found out the following strange thing:
    If you check the option "without SOAP envelope" then the content type is application/xml. Is there any way to influence this as the receiver of the message only accepts text/xml.
    Have you had any similar experience?

    hi,
    - open SOAP receiver communication channel - module tab
    - add the module "localejbs/AF_Modules/MessageTransformBean" or AF_Modules/MessageTransformBean"  before the standard SOAP module
    - add the parameter = Transform.ContentType with value = text/xml
    I'm just not sure if you need to add value =  text/xml or "text/xml" so try the second one if the first one will not work
    does it work now?
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • I can't use my apple ID for the first time on iphone

    I am trying to download Whatsapp. When I enter my iphone apple ID, I can't tap "Next" beyond the "select your country" first step (it is the first time I use my apple ID on itune). I use a 3g IOS 4.2.1 and the software is as up to date as it can be.

  • Related to Work Structures - HRMS

    Hello, I'm working on a requirement to fetch employee details. In regard to this, there is a need to fetch 'Division' and 'Group' of the given employee's "Assignment Organization". It's my sincere request either to provide me with the snippet for thi

  • Is Photos using a lot of CPU?

    Photos is now using a lot of CPU. This is after it converted my iPhoto library. Is this normal? Is anyone else seeing this on their machine? Here's a screen shot with Photos hidden (not actively being used).

  • Discoverer 11g - How to get Sales Data in different periods?

    Good afternoon, I am currently using Discoverer 4.1 and I can run reports that display all of these different types of sales. I have a Cross tab and I want 5 columns showing the Sales below. 2013 Month Sales, 2013 YTD Sales, 2012 Month Sales, 2012 YT

  • ALV TREE - Double click on an item

    Hi all, I need to handle the double click action on an Item of ad ALV_TREE defined cl_gui_alv_tree_simple What I did at now is: u2026 DATA tree1  TYPE REF TO cl_gui_alv_tree_simple. u2026        CREATE OBJECT event_receiver.   SET HANDLER event_recei