cancel
Showing results for 
Search instead for 
Did you mean: 

Soap-proxy :soap content error from NET client

Former Member
0 Kudos
81

Hi Expert,

We created an SOAP-Proxy scenario and everything is tested in SOAPUI tool

successfully. But when .NET client try to send SOAP message with

PDF attachment, it has error said:java.io.IOException: invalid content

type for SOAP: APPLICATION/DIME . I am not sure if there is something we need to change on our PI side to allow contect type "application/dime" or this is truly on client side problem. Please help us! Thanks in advance!

The error is:

java.io.IOException: invalid content type for SOAP: APPLICATION/DIME

<?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>ADAPTER.JAVA_EXCEPTION</code>
          <text><![CDATA[
java.io.IOException: invalid content type for SOAP: APPLICATION/DIME
       at com.sap.aii.af.sdk.xi.net.MIMEInputSource.readBody(MIMEInputSource.java:414)
       at com.sap.aii.af.sdk.xi.net.MIMEServletInputSource.parse(MIMEServletInputSource.java:58)
       at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:415)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
       at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:162)
       at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:81)
       at com.sap.engine.services.servlets_jsp.server.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:124)
       at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
       at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:468)
       at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
       at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:399)
       at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:388)
       at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
       at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
       at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:84)
       at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
       at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:244)
       at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
       at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
       at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
       at com.sap.engine.services.httpserver.chain.AbstractChain.process

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Hailan,

Did you compare the HTTP Header sent by SOAP UI against the one sent by the .NET application? The content-type should be application/pdf for PDF files.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Mark. We did compare HTTP header and SOAP UI and content type is application/pdf. Our .NET developer mentioned that soap attachment is very old way and NET is not support it anymore.

I just want to know how is other people doing this? We currentlt have to change our design to include the image into field instead of using attachment? Is this a common way to pass image?

Thank you all for your response. I really apprecite.

Hailan

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Hailan,

There are only two ways of dealing with images (or other binaries) in xml.

1. Encoding the image as base64 and then embedding it into an xml, here you can extend it to use mtom but it requires Axis adapter or WS Adapter SOAP Message Transmission Optimization Mechanism (MTOM) - Enterprise Services Repository - SAP Libra...

2. Using attachments

Hope this helps,

Mark

Former Member
0 Kudos

Thanks, Mark. That is very helpful!

Former Member
0 Kudos

Hi

You can try message transformation bean in the module to change the content type

Module name : AF_Modules/MessageTransformBean

Parameter name : Transform.ContentType     

Parameter value : text/xml or text/plain

Former Member
0 Kudos


Thanks Indrajit,

I am pretty new to PI and that is really a good thing to know. I will do more research.

Thank you!

Hailan

Harish
Active Contributor
0 Kudos

Hi,

Are you using SOAP with Axis protocol? are you tested with attachement from soap ui?

You can use the soap adapter with axis protocol to handel the attachment.

please check the below blog

sap help

SAP Library - SAP NetWeaver Exchange Infrastructure

regards,

Harish

Former Member
0 Kudos

Thanks Harish for your reply.

Our PI is 7.1 and we are not using SOAP with AXIS protocol. We are using SOAP 1.1. We tested it through SOAPui with attachment and everything went through. The error only happen when NET client send SOAP with attachment. Thanks for your help!