on 01-31-2014 8:50 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.