Topic
1 reply Latest Post - ‏2013-05-03T05:04:28Z by dpdeveloper
dpdeveloper
dpdeveloper
111 Posts
ACCEPTED ANSWER

Pinned topic Issue with content type header for MTOM request

‏2013-05-03T04:51:38Z |

 

HI everyone,
 
We have scenario where clients send MTOM attachements through datapower. During processing, datapower converts MTOM attachments to inline messages and sends 
it to providers. I have configured sample mpgw which accepts MToM, converts to inline and sends to provider and this is working fine.
 
When a client send a request, the request will go through series of MPGWS (MPGW A to MPGW B to MPGW C to Provider) before converting from attachement to inline message.
 
MPGW A gets request with http header 
 
content-Type application/xop+xml; charset=UTF-8; type="text/xml"
MPGW A forward requests to MPGW B. MPGW B is getting http header as 
 
Content-Type text/xml; charset=UTF-8
MPGW B sends requests to MPGW C. Here at MPGW C, the request is failing due to xml parsing error 
 
Error occured while parsing the XML[illegal character '-' at offset 4 of http://......... and the http header in this MPGW C is 
 
Content-Type text/xml;
which different from the previous one's. If I send request to this MPGW C directly, it works because the header is 
 
 
 
content-Type application/xop+xml; charset=UTF-8; type="text/xml"
 
Now, if I enable Include charset in response-type in mpgw c, the http header is coming as 
 
Content-Type text/xml; charset="utf-8" which is different.
 
Any ideas or suggestions on how to preserve request headers? as in the same content type header should come to MPGW B and MPGW C.
 
Hope this is not confusing...