Reposting:

Hi Dushan, 

Thanks for your response. 

However, we're seeing the correct output with the proxy you provided, but
the request times out with our synapse template + proxy combo. 

Contents of the template: 

<template xmlns="http://ws.apache.org/ns/synapse"; name="sendActivity">

   <sequence>

      <header name="x-li-format" scope="transport" value="json"></header>

      <payloadFactory media-type="json">

         <format>     {"contentType":"linkedin-html","body":"hello Test"}       
                                                                            
</format>

      </payloadFactory>

      <property name="messageType" value="application/json"
scope="axis2"></property>

     <property name="FORCE_HTTP_1.0" value="true" scope="axis2"></property>

      <call>

         <endpoint>

            <http method="post"
uri-template="http://localhost:8281/";></http>

         </endpoint>

      </call>

   </sequence>

</template>

Proxy: 


<?xml version="1.0" encoding="UTF-8"?> 
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="sendActivity" 
       transports="https,http" 
       statistics="disable" 
       trace="disable" 
       startOnLoad="true">
   <target>
      <inSequence>
         <call-template target="sendActivity">
         </call-template>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

The JSON message sent out to TCP Mon is correct now. Copy pasting the TCP
mon request headers and body to SoapUI and running as a REST project returns
the correct 201 status from the LinkedIn API, so we know this configuration
is sending out the correct message. When redirecting the synapse template to
LinkedIn by setting the correct URL in it, the request times out. Could this
be because LinkedIn is returning an HTTP 201 status? 

  

Thanks.                



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/JSON-string-in-request-being-reformatted-by-ESB-tp90183p90195.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to