Invalid Content-Type with SAAJ

I get the following exception when trying to send a SOAPMessage with an attachment. Sorry for the length of this post. Lots of info.
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:application/x-www-form-urlencoded. Is this an error m
essage instead of a SOAP response?
The HTTP request looks like the following, I abbreviated the attachment content.
POST /edlf/design/service/ManagerServices/import HTTP/1.1
Accept: text/xml
User-Agent: Java/1.5.0_10
Host: localhost:9080
Connection: keep-alive
Content-type: application/x-www-form-urlencoded
Content-Length: 17537
------=_Part_0_24087760.1169577467505
Content-Type: text/xml; charset=utf-8
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ImportFileRequest>
<File name="test.dlf"/>
</ImportFileRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------=_Part_0_24087760.1169577467505
Content-Type: application/octet-stream
lMqAAMxQMQBQSwMEFAAAAAgAPFtWNrcaY4xxAQAANwYAADMAAABMaXZlRG9jcy9Db250ZW50L0N1
c3RvbWVyLzEvRG9jdW1lbnQvMS9QYWdlLzEvMS5iaW6VVL1OAzEMdig/LbQsLEggcV1ZbmGv1Lkj
ooIJJKoCC0J06MDAyIxY4QGYeYATj8LEgtQBCTawcUIck8sdn2QlduwvsePEAMAZyjrKPYoBxhrK
awOgBR47XYDPba/LuRHjO8at4niXsy0THPuLAAcr8AdfFjG71K9Qd7yEl3nmpANL3jp2uU5273fd
YwmBaf3UxEP6aH+qxEjow6VZn2fOSql5awRG6VRwF1wURToYwsI3d0fTSdY/n6YC/ochSsceU95/
WX66GgbC+3UcVGOSQ5x3sZHMQvVZtF9rM+zPeNqznr6lMnzU8JHQecW6IdbvdXgJrn6as+OUwenl
hBzI0LYbPeN4Ija9QHkETo7Wxig5BhU4zlmfp1/6N5Tc3hGVO2zPduBXDeIfCF0nciz0LOl3BBtg
------=_Part_0_24087760.1169577467505--
My code snippet for producing the above is:
BASE64Encoder encoder = new BASE64Encoder();
String encString = "";
encString = encoder.encode(content);
ByteArrayDataSource bds = new ByteArrayDataSource(encString, "application/octet-stream", fileName);
DataHandler dh = new DataHandler(bds);
URL url = new URL(serviceEndPt + "ManagerServices/import");
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestMethod("POST");
connection.setRequestProperty("Accept", "text/xml");
OutputStream out = connection.getOutputStream();
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage msg = mf.createMessage();
SOAPPart sp = msg.getSOAPPart();
SOAPEnvelope envelope = sp.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPBodyElement root = body.addBodyElement(envelope.createName("ImportFileRequest"));
SOAPElement fileEl = root.addChildElement(envelope.createName("File"));
Name attName = envelope.createName("name");
fileEl.addAttribute(attName, fileName);
root.addChildElement(fileEl);
AttachmentPart ap = msg.createAttachmentPart();
ap.setDataHandler(dh);
msg.addAttachmentPart(ap);
msg.writeTo(out);

The error does not seem to appears in WLS stack. Place a sniffer tool between your client and service to capture more info.
Jong

Similar Messages

  • SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP

    Hi,
    At present i am using JCAPS version 5.1.1
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-
    Type:text/html. Is this an error message instead of a SOAP response?
    I got above error message while invoking the webservice.
    My intention is to get HttpRequest from user and based on the input from user, a web service should be invoked. For this i am using BusinessProcess[einsight]
    In my BusinessProcess, i have HttpServer processRequest service,
    to receive HTTP requests and then i am passing the value of parameter received from http[As String] to next partner which is responsible for invoking a webservice.[Used a wsdl in client mode]
    I am able to get http request successfully , but i got error while invoking web service.
    Please let me know, what to do for rectifying error.

    Although this is an aged topic, this is plaguing our development efforts currently. I have successfully created a webservice that can be executed externally using the generated wsdl but I am unable to get a JCD to execute the WS without getting the following error:
    [#|2007-10-09T19:51:02.700-0700|SEVERE|IS5.1.2|javax.xml.messaging.saaj.soap|_ThreadID=32606; ThreadName=Worker: 34758;|SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:296)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:146)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:32)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.rpc.client.http.HttpClientTransport.readResponse(HttpClientTransport.java:169)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:83)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:69)|#]
    [#|2007-10-09T19:51:02.701-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at tp6.ExecutePortType_Stub.opGetControl(ExecutePortType_Stub.java:66)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at tp6.ExecutePortType_opGetControl.invoke(ExecutePortType_opGetControl.java:188)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.stc.wsclient.runtime.impl.WSDLOtdDelegateImpl.invoke(WSDLOtdDelegateImpl.java:78)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at urn_stc_egate_jce_AI_WebServices_GetControl_jcdGetControl.OpGetControl.invoke(urn_stc_egate_jce_AI_WebServices_GetControl_jcdGetControl.OpGetControl:113)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at AIWebServicesTEST_GetControl_WS.jcdTEST_GetControl_WS.start(jcdTEST_GetControl_WS.java:21)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at TEST_GetControl_WS.cmTEST_GetControl_WS_jcdTEST_GetControl_WS1.jcdTEST_GetControl_WS_Runtime_Handler.handleRequest(jcdTEST_GetControl_WS_Runtime_Handler.java:369)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at sun.reflect.GeneratedMethodAccessor4463.invoke(Unknown Source)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at java.lang.reflect.Method.invoke(Method.java:615)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:140)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:135)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at $Proxy108.handleRequest(Unknown Source)|#]
    [#|2007-10-09T19:51:02.702-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at STC_MDB__eaJCAP_Scheduler_cmTEST_GetControl_WS_jc1527518542.sendMessage(STC_MDB__eaJCAP_Scheduler_cmTEST_GetControl_WS_jc1527518542.java:213)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at STC_MDB__eaJCAP_Scheduler_cmTEST_GetControl_WS_jc1527518542.onContents(STC_MDB__eaJCAP_Scheduler_cmTEST_GetControl_WS_jc1527518542.java:100)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at sun.reflect.GeneratedMethodAccessor4462.invoke(Unknown Source)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at java.lang.reflect.Method.invoke(Method.java:615)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at java.security.AccessController.doPrivileged(AccessController.java:275)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:940)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:948)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:42)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:136)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at $Proxy111.onContents(Unknown Source)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.stc.schedulerotd.scheduleradapter.FileReaderWork.run(FileReaderWork.java:77)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:54)|#]
    [#|2007-10-09T19:51:02.703-0700|WARNING|IS5.1.2|javax.enterprise.system.stream.err|_ThreadID=32606; ThreadName=Worker: 34758;|
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)|#]
    [#|2007-10-09T19:51:02.704-0700|SEVERE|IS5.1.2|javax.xml.messaging.saaj.soap|_ThreadID=32606; ThreadName=Worker: 34758;|SAAJ0535: Unable to internalize message|#]
    [#|2007-10-09T19:51:02.704-0700|INFO|IS5.1.2|STC.eGate.CMap.Collabs.TEST_GetControl_WS.cmTEST_GetControl_WS_jcdTEST_GetControl_WS1.AIWebServicesTEST_GetControl_WS.jcdTEST_GetControl_WS|_ThreadID=32606; ThreadName=Worker: 34758;|+++EXCEPTION = HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
         HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message|#]
    [#|2007-10-09T19:51:02.704-0700|INFO|IS5.1.2|STC.eGate.CMap.Collabs.TEST_GetControl_WS.cmTEST_GetControl_WS_jcdTEST_GetControl_WS1.AIWebServicesTEST_GetControl_WS.jcdTEST_GetControl_WS|_ThreadID=32606; ThreadName=Worker: 34758;|+++STACK     = [Ljava.lang.StackTraceElement;@31de31de|#]
    [#|2007-10-09T19:51:02.705-0700|INFO|IS5.1.2|com.stc.codegen.OTDImpl.runtime.ejb.OTDService|_ThreadID=32606; ThreadName=Worker: 34758;|terminate each service|#]
    Is anybody else having this same error and how was it resolved? Both my client and server settings seems to be in sync. My only iffy piece is the servlet context. For both client and server external components, host, port, servlet context match. What am I missing??

  • ** SOAP to SOAP call - HTTP 404 not found - invalid content type

    Hi friends,
    We have one scenario SOAP to SOAP call. It is synchronous interface. We are calling the WSDL.
    For some of the messages (not all), we are getting the error in SXMB_MONI
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found
    In the sender & receiver SOAP communication channel also, same error : SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found
    Friends, this error is not coming for all messages. For some of the messages it is coming. For example,
    10:50 - Message Processed Successfully
    10:54 - Message Processed Successfully
    10:59 - Error
    11:05 - Message Processed Successfully
    By looking threads and blogs, I implemented MessagesTransformBean in the receiver CC and added the  parameter Transform.ContentType as 'text/xml;charset=utf-8'.
    After implementing this also, error is coming for some of the messages.
    Can you kindly clarify friends, what could be the problem?
    Kind regards,
    Jegathees P.

    I'm in agreement with Stefan...
    If the problem is intermittent then the system is overloaded at certain times. You would probably need to do some JVM analysis to see the resource usage & look at increasing the memory.
    Regards, Trevor

  • Invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error

    Hi,
    I have this error on a SOAP Receiver Channel: invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
    I've found several threads on SDN Forums about similar errors, but I did not find a solution for my problem yet.
    I checked this blog: /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009  Pt.6 applies to my situation, but the proposed solution doesn't solve the problem.
    TRACE Messaging System
    u2026
    2011-06-06 10:59:41.822 Success Delivering to channel: CC_SOAP_RCV_XXX
    2011-06-06 10:59:41.823 Success MP: entering1
    2011-06-06 10:59:41.825 Success MP: processing local module localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
    2011-06-06 10:59:41.828 Success SOAP: request message entering the adapter with user J2EE_GUEST
    2011-06-06 10:59:42.012 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
    2011-06-06 10:59:42.014 Success SOAP: sending a delivery error ack ...
    2011-06-06 10:59:42.014 Success SOAP: sent a delivery error ack
    u2026
    Message Details
    Address   http://aaa.bbb.be:54000/MessagingSystem/receive/AFW/XI 
    Credential   PasswordCredential(PIISUSER):password=******** 
    Transport Headers   accept-encoding=gzip sap-xi-messageid=4DEA11FE90003094E10000000AE908B4 content-length=7520 http=POST host= aaa.bbb.be:54000 user-agent=SAP NetWeaver Application Server (1.0;711) content-type=multipart/related;boundary=SAP_4DEA47CEAD3A5138E10000000AE908B4_END;type="text/xml";start="" soapaction="http://sap.com/xi/XI/Message/30" 
    Configuration Details SOAP Communication Channel
    SOAP Receiver Channel
    No modules configured
    Do not use SOAP Envelope  -> NOT checked
    If I type the target URL in browser it opens (no login required) and I see the available web services.
    Anyone any idea what's the reason for this error?
    Thanks in advance
    Kind Regards
    Edmond Paulussen

    Hi Edmond,
    We faced similar problem & found alternative.
    Try out, if it works for u as well.
    1) Use HTTP Adapter instead of SOAP.
    Transport Protocol : HTTP 1.0
    Message Protocol : XI Payload in HTTP Body
    Adapter Engine : Integration Server
    Addressing type : URL Address.
    Target Host:
    Service Number :
    Path Prefix:
    Authentication type : we hv used Ananymus login, as our login details in payload header.
    Content Type : application/soap+xml;charset=UTF-8( this is IMP).
    Header Fields.
    Name         value
    Host           target host
    XI Payload Manipulation
    XML Code : UTF-8
    Hope, this helps...
    -santosh.

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

  • Invalid content type for SOAP: TEXT/HTML

    Hi guys,
    I’m trying to sending a message via sender soap adapter and I’m receiving this error:
    Exception caught by adapter framework: invalid content type for SOAP: TEXT/HTML
    I already have read most off all posts about this error in this forum. So, if I understand, this error means that my receiver soap adapter can’t reach the web service provider and an HTTP error notification is sent to calling application. Although, the SOAP adapter doesn’t understand this kind of errors (ex. 404 not found -> SOAP call has no error codes and use the HTTP codes for effect) and this happening because the error is in text/html format and SOAP adapter is waiting a response in text/xml.
    This is a simple calculator web service that receives two arguments and returns the sum as a result. (Like Siva Maranani weblog /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi )
    The web service is published on SAP Enterprise Portal and it works fine.
    - The login works fine
        User: ex30268
        Pwd: 12345678
    - We don’t have certificates and proxy server.
    This is the address in my receiver soap adapter: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
    I already checked the settings of my receiver soap adapter and did a little test, enabling the parameter Do Not Use SOAP Envelop only in receiver adapter. And the result is an exception during mapping!!! What is means this error?
    Does anybody know how to solve this issue?
    Thanks in advance.
    Cheers,
    Ricardo.

    Hi all,
    Please forgive me for boring you again with this subject, but I haven’t yet solved this issue, I still receive the following message and I’m getting quite worried…
    >>> Invalid content type for SOAP: TEXT/HTML
    I’m following Siva Maranani web log (Invoke Webservices using SAPXI) and I will describe the steps that I did:
    <b>Integration Repository:</b>
    •     An Inbound synchronous Message Interface (CalculatorWS_IN_MI) using the message types in external definition (WSDL from web service hat I want to invoke).
    •     The other necessary data types (Calc_input_DT has 2 parameters>arg1 and arg2. and Calc_out_DT has 1 param> result) and corresponding Message types.
    •     An Outbound synchronous Message Interface (Calc_OUT_MI) using the message types defined in Integration Directory.
    •     2 Message mappings (request and response) and 1 Interface mapping.
    <b>Integration Directory:</b>
    •     A scenario calls WebServices.
    •     2 business services (webservice and webservice_calc).
    •     A Receiver determination with webservice as a sender service (note: this sender is simulated from the WSNavigator from an Enterprise Portal that I have installed locally in my laptop) the interface is (Calc_OUT_MI).
    •     An Interface determination with webservice_calc as a receiver service and the corresponding mapping interface and SOAP receiver channel.
    Configurations of SOAP receiver channel:
    Target URL: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
    User: ex30268
    Pwd: 12345678
    I have picked only the parameters “Use Encoded Headers” and “Use Query String” activated. I’m not using any kind of certificates or proxy servers.
    A call tentative:
    Request
    POST /XISOAPAdapter/MessageServlet?channel=:WebService:SOAPSenderChannel&version=3.0&Sender.Service=WebService&Interface=http%3A%2F%2Fswitching%2Fxi%5ECalc_OUT_MI HTTP/1.1
    Host: ed19dci1f.appl.edinfor.pt:54900
    Content-Type: text/xml; charset="UTF-8"
    Connection: close
    Cookie: <value is hidden>
    Cookie: <value is hidden>
    Authorization: <value is hidden>
    SOAPAction: "http://sap.com/xi/WebService/soap1.1"
    Content-Length: 407
    Response
    HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/6.40
    Content-Type: text/xml; charset=utf-8
    Date: Fri, 12 May 2006 08:24:18 GMT
    <?xml version='1.0'?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
      <SOAP:Body>
        <SOAP:Fault>
          <faultcode>SOAP:Server</faultcode>
          <faultstring>Server Error</faultstring>
          <detail>
            <s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
              <context>XIAdapter</context>
              <code>DeliveryException</code>
              <text><![CDATA[
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:125)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
         at com.sap.engine.frame.core.thread.Task.run(Task.java(Compiled Code))
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java(Compiled Code))
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java(Compiled Code))
              ]]></text>
            </s:SystemError>
          </detail>
        </SOAP:Fault>
      </SOAP:Body>
    </SOAP:Envelope>
    I think that I have tried everything and read almost of posts, web logs, SDN community contribution and the info in help.sap.com, but I’m feeling unable to solve this kind of issue. I’m afraid that I was missed something. So that’s the reason to describe here all the steps that I have done.
    I hope somebody knows how to solve this issue or give me something that can help me find the end of this road…
    Thanks for all.
    Cheers,
    Ricardo.

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

  • PO 7.4: NW BPM: HTTP Error response for SOAP request or invalid content-type.HTTP 200 OK

    Hi Experts
    I am trying to call NW BPM scenario(File to BPM) from PI, and using below adapter config.
    I am getting below error.
    Failed to call the endpoint: Error in call over HTTP: HTTP 200 OK
    SOAP: Call failed: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Any idea how to fix this issue?
    Thanks,
    Sandeep Maurya.

    Hi Sandeep,
    Test the URL from your browser and check the proxy settings as well.
    Refer the below links
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT
    SOAP: Call failed: java.io.IOException: Failed to get the input stream from socket: java.net.SocketException: Connection…
    Regards
    Bhargava Krishna

  • DeliveryException: invalid content type for SOAP: TEXT/HTML

    My scenario is RFC -> XI -> SOAP (synchronous), but when I test this scenario, I got the error message "DeliveryException: invalid content type for SOAP: TEXT/HTML", I search the document and change it following this blog: /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi
    1. I add a MessageTransformBean module before the original one
    2. I add a transform key, the value is text/html;charset=utf-8
    But when I active this channel and test again, I got another message:
    XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION-HTTP 400 Bad Request.
    I only find one discussion about it but I still have no idea how to solve the problem. Do I need to change my mapping ? And when field should I generated in the mapping?
    Problem with SOAP receiver adapter

    And of course you have also applied the correct SOAPAction.
    Sorry for bothering you, but is difficult to guess the error, but in my experience, must issues are due to wrong configuration.
    Could you check with TCPGateway, what error is sent back?
    /people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
    Regards
    Stefan

  • Error: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request

    Hi Gurus,
    i am hardly fighting with this error in Communication Channel Monitoring:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    This is my scenario.
    I do a File to SOAP Scenario. in SXI_MONITOR everything is fine.
    My CommChan is a SOAP Receiver
    HTTP
    SOAP 1.1
    Central Adapter Engine
    Target URL is https --> i check url for correctness
    Configure User Authentication is checked and username and pw are given and are correct.
    Configure Certificate Authentication is checked are working
    Configure Proxy is checked and Host and port are povided.
    SOAP Action is provided
    In Tab Module
    if have this Processing Sequence
    1     localejbs/AF_Modules/MessageTransformBean     Local Enterprise Bean     transform
    2     sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean     Local Enterprise Bean     1
    and this Module configuration (and only this)
    transform     Transform.ContentType     text/xml;charset=utf-8
    (according to /people/sobhithalaxmi.kata/blog/2009/07/21/cost-free-edi-integration-using-message-transformation-bean)
    As far as i understand that my http header should have Content-Type: text/xml;charset=utf-8 now. I don't understand why Communication Channel Monitoring shows an error according to content TEXT/HTML.
    Can anyone help me with that?
    Is it possible that Transform.ContentType does not work for SOAP Receiver Adapter?
    is there any chance to view the HTTP-Header of the outgoing SOAP Request (with PI Transaction / Java Enironment) to convince myself that the HTTP Header is text/xml?
    Thank you in advance and Best Regards
    Udo

    Hi Thanks for your fast replies.
    The Provider of the Endpoint tells me that he needs text/xml as content-type. When I sent a message to the given Endpoint via SOAP UI I can see in the HTTP LOG of SOAP UI that the Endpoint is also sending text/xml back.
    Below you find the Details log out of the CommChan Monitoring.
    2011-04-29 11:37:45 Information The message status was set to TBDL.
    2011-04-29 11:37:45 Information Retrying to deliver message to the application. Retry: 3
    2011-04-29 11:37:45 Information The message was successfully retrieved from the receive queue.
    2011-04-29 11:37:45 Information The message status was set to DLNG.
    2011-04-29 11:37:45 Information Delivering to channel: getxxxxx_In  <---- name of my SOAP Receiver CommChan
    2011-04-29 11:37:45 Information Transform: using Transform.Class:  $identity
    2011-04-29 11:37:45 Information Transform: transforming the payload ...
    2011-04-29 11:37:45 Information Transform: successfully transformed
    2011-04-29 11:37:45 Information SOAP: request message entering the adapter with user J2EE_GUEST
    2011-04-29 11:37:46 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Information SOAP: sending a delivery error ack ...
    2011-04-29 11:37:46 Information SOAP: sent a delivery error ack
    2011-04-29 11:37:46 Error SOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Error Adapter Framework caught exception: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
    2011-04-29 11:37:46 Error 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.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request.
    2011-04-29 11:37:46 Error The message status was set to NDLV.
    What i am missing is a hint on the Message Transform Bean and a on a successfull sending process.
    What i also tried already:
    i also activated the checkbox "Do not use SOAP Envelop" in CommChan Configuration. The Result you see below (the last log entry is on first line - so read from bottom to top)
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request
    error in response
    call completed
    request entering
    Message processing started
    As you can see there is a "call completed" and "error in response" log entry. This is missing in in the first Log. So i guess the error is still in the sending process.
    Installing additional Software on the PI and use them to find out what the HTTP Request is is not possible as system access is very strict and limited :/

  • : invalid content type for SOAP: TEXT/HTML; HTTP 302 Redirect

    Hi Experts,
    I am facing with the flowing error when we are receiving for the soap receiver chanel.
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 302 Redirect
    is their any content type to give in soap receiver channel.
    please let me know.
    Regards
    Raju

    I think the message is misleading. HTTP 302 meaning is that the url specified in not found or invalid for that service. You might want to check with external system that the specified URL in the SOAP receiver communication channel is right? Also you can find the URL from the WSDL itself. Similar test do it outside PI using the SOAPUI or XMLSPY and see the response error.

  • Invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found

    Hi,
    I have mentioned some issues that I am facing in SOAP receiver adapter:
    [XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 404 Not Found;
    Apart from that I am trying with unchecking 'Do Not Use SOAP envelope' and by using MessageTransformBean, for which I am getting the following error:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 404 Not Found
    Need your help in resolving  this.
    Regards,
    Vishal

    I have some ideas which will help you out. Check the below option one by one:
    1. Check receiver server is accessable from XI/PI system through IP address in command prompt.
    2. Check whether any PORT is enabled for this server. ex: http://ipaddress:portno/XXX/XXX.asmx
    3. You can download webservice tool(SOAP UI and etc..)to check your webservice(WSDL) file able to connect the server by importing webservice file in this tool.
    4. Sometime customer may updated in their application(coding and etc) and not given the updated webservice file to us. so make sure you got updated one.
    Regards,
    Senthil

  • "Invalid content type" error in SOAP receiver

    Hi ,
    I have ABAP Proxy->XI->Webservice scenario.
    I have configured the SOAP receiver with all neccessary information (Target URL pointing to WSDL , proxy details)
    However i get the following error when i try sending data to the webservice. "Invalid Content type for SOAP: text/html"
    I have seen some forums and blogs on this site on this but still not able to solve the error.
    Please advice...

    Hi Anand,
    Have a look into this thread- similar discussion
    DeliveryException:: invalid content type for SOAP: TEXT/HTML
    Also check this- in the Reciever SOAP Adapter configuration i.e Target URL must be url of the WSDL.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789
    Hope this helps.......
    Regards,
    Abhy

Maybe you are looking for

  • Never had such bad support - Think(g)s have changed since IBM

    I just wanted to point out that lenovo has one of the worst support i ever had with businnes products. I was always a thinkpad buyer and spend a lot of money to ibm. OS updates went well and the hardware compatibility was good. I always used the supp

  • Large files created in TEMP folder

    Hello, one of our servers reported low disk space and we discovered, that its caused by huge files created in temp folder. These file names are like C:\Windows\Temp\TMP00000A78405B314E573DA1A0 Process monitor reported, that theyre created by FEP (msm

  • New community

    Hi Friends there is one community called SAP EP& Web Dynpro in orkut ....add that community..it will be helpfull to all of us bye friends

  • Convert list of files in a folder to text?

    Is there an easy way to convert the list of files in a folder into a text document? In other words I would like to create a text list of the names of all the files in a given folder - just the individual file names, not the entire path of each file.

  • Nikon photo transfer

    I had iPhoto set so that when I connected and turned on my Nikon digital camera iPhoto (2.0.1) opened automatically. Now I have installed Nikon Transfer and said I don't want it to open auto. when I connect/turn on the Nikon, neither iPhoto or Nikon