Topic
2 replies Latest Post - ‏2013-01-25T20:10:22Z by chauhan_vin1
chauhan_vin1
chauhan_vin1
24 Posts
ACCEPTED ANSWER

Pinned topic DataPower SOA Appliances injects Content-Type as "text/xml"

‏2013-01-23T16:16:06Z |
Hi,

I think I know that DataPower SOA Appliances injects Content-Type as "text/xml" if the client or server does not set this header. I my case I am using a gateway XMLFW which gets a Content-Type from the client as "application/json". As the gateway XMLFW forwards the request to another XMLFW its converting the Content-Type to "text/xml".

Isnt there just a configuration setting which would avoid datapower tampering the header on the outbound call ?. I have to manually set the Content-Type to "application/json" in the second XMLFW to have the request accepted by the the end service.

Here are the ways to fix it - http://www-01.ibm.com/support/docview.wss?uid=swg21470992

but there should be just a simple configuration somewhere to tell the datapower not to play with the headers.( I have disabled URL and request header re-writing but it doesnt help)

Does any one know of any such configuration ?
Updated on 2013-01-25T20:10:22Z at 2013-01-25T20:10:22Z by chauhan_vin1
  • HermannSW
    HermannSW
    4155 Posts
    ACCEPTED ANSWER

    Re: DataPower SOA Appliances injects Content-Type as "text/xml"

    ‏2013-01-24T08:52:39Z  in response to chauhan_vin1
    > ... I my case I am using a gateway XMLFW which gets a Content-Type from the client as "application/json".
    > As the gateway XMLFW forwards the request to another XMLFW its converting the Content-Type to "text/xml".
    > ...
    What is the request type of your XML FW policy?
    Do you do any processing of the input JSON data?
    convert-http?
    Any Transform actions?

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    • chauhan_vin1
      chauhan_vin1
      24 Posts
      ACCEPTED ANSWER

      Re: DataPower SOA Appliances injects Content-Type as "text/xml"

      ‏2013-01-25T20:10:22Z  in response to HermannSW
      What is the request type of your XML FW policy? - Its JSON for request Type - Since the client issues a post with JSON payload. The Gateway Firewall has a rule with match action to check if its a HTTP_PUT forward the request to the second XMLFWL which handles PUT REST request.
      Do you do any processing of the input JSON data? - No processing is done. Just post it to the service which insert it into the database converting JSON to JPA object and persist.
      convert-http? NO
      Any Transform actions? Transform action in the Gateway XMLFW to set the routing URL to internal IP and port of the HTTP_POST XMLFW.