[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-javascript-dev
Subject:    Re: [Dev] JSON string in request being reformatted by ESB
From:       Dushan Abeyruwan <dushan () wso2 ! com>
Date:       2013-12-26 13:49:43
Message-ID: CACyyj6cy1kOdpN6w-dOLTCL2wUaZ-qeDXFniu+48Cj30cF=YNg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


HI
 Enable wire logs and post the logs


On Thu, Dec 26, 2013 at 4:32 PM, indika prasad <indika.pra@gmail.com> wrote:

> 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
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
> 



-- 
Dushan Abeyruwan | Associate Tech Lead
Integration Technologies Team
PMC Member Apache Synpase
WSO2 Inc. http://wso2.com/
Blog:http://dushansview.blogspot.com/
Mobile:(0094)713942042


[Attachment #5 (text/html)]

<div dir="ltr">HI<div> Enable wire logs and post the logs</div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 4:32 PM, \
indika prasad <span dir="ltr">&lt;<a href="mailto:indika.pra@gmail.com" \
target="_blank">indika.pra@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Reposting:<br> <br>
Hi Dushan,<br>
<br>
Thanks for your response.<br>
<br>
However, we&#39;re seeing the correct output with the proxy you provided, but<br>
the request times out with our synapse template + proxy combo.<br>
<br>
Contents of the template:<br>
<br>
&lt;template xmlns=&quot;<a href="http://ws.apache.org/ns/synapse" \
target="_blank">http://ws.apache.org/ns/synapse</a>&quot; \
name=&quot;sendActivity&quot;&gt;<br> <br>
   &lt;sequence&gt;<br>
<br>
      &lt;header name=&quot;x-li-format&quot; scope=&quot;transport&quot; \
value=&quot;json&quot;&gt;&lt;/header&gt;<br> <br>
      &lt;payloadFactory media-type=&quot;json&quot;&gt;<br>
<br>
         &lt;format&gt;     \
{&quot;contentType&quot;:&quot;linkedin-html&quot;,&quot;body&quot;:&quot;hello \
Test&quot;}<br> &lt;/format&gt;<br>
<div class="im"><br>
      &lt;/payloadFactory&gt;<br>
<br>
      &lt;property name=&quot;messageType&quot; \
value=&quot;application/json&quot;<br> \
</div>scope=&quot;axis2&quot;&gt;&lt;/property&gt;<br> <br>
     &lt;property name=&quot;FORCE_HTTP_1.0&quot; value=&quot;true&quot; \
scope=&quot;axis2&quot;&gt;&lt;/property&gt;<br> <br>
      &lt;call&gt;<br>
<br>
         &lt;endpoint&gt;<br>
<br>
            &lt;http method=&quot;post&quot;<br>
uri-template=&quot;<a href="http://localhost:8281/" \
target="_blank">http://localhost:8281/</a>&quot;&gt;&lt;/http&gt;<br> <br>
         &lt;/endpoint&gt;<br>
<br>
      &lt;/call&gt;<br>
<br>
   &lt;/sequence&gt;<br>
<br>
&lt;/template&gt;<br>
<br>
Proxy:<br>
<br>
<br>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&lt;proxy xmlns=&quot;<a href="http://ws.apache.org/ns/synapse" \
target="_blank">http://ws.apache.org/ns/synapse</a>&quot;<br>  \
name=&quot;sendActivity&quot;<br>  transports=&quot;https,http&quot;<br>
       statistics=&quot;disable&quot;<br>
       trace=&quot;disable&quot;<br>
       startOnLoad=&quot;true&quot;&gt;<br>
   &lt;target&gt;<br>
      &lt;inSequence&gt;<br>
         &lt;call-template target=&quot;sendActivity&quot;&gt;<br>
         &lt;/call-template&gt;<br>
         &lt;respond/&gt;<br>
      &lt;/inSequence&gt;<br>
      &lt;outSequence&gt;<br>
         &lt;send/&gt;<br>
      &lt;/outSequence&gt;<br>
   &lt;/target&gt;<br>
   &lt;description/&gt;<br>
&lt;/proxy&gt;<br>
<br>
The JSON message sent out to TCP Mon is correct now. Copy pasting the TCP<br>
mon request headers and body to SoapUI and running as a REST project returns<br>
the correct 201 status from the LinkedIn API, so we know this configuration<br>
is sending out the correct message. When redirecting the synapse template to<br>
LinkedIn by setting the correct URL in it, the request times out. Could this<br>
be because LinkedIn is returning an HTTP 201 status?<br>
<br>
<br>
<br>
Thanks.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://wso2-oxygen-tank.10903.n7.nabble.com/JSON-string-in-request-being-reformatted-by-ESB-tp90183p90195.html" \
target="_blank">http://wso2-oxygen-tank.10903.n7.nabble.com/JSON-string-in-request-being-reformatted-by-ESB-tp90183p90195.html</a><br>



<div class="HOEnZb"><div class="h5">Sent from the WSO2 Development mailing list \
archive at Nabble.com.<br> _______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@wso2.org">Dev@wso2.org</a><br>
<a href="http://wso2.org/cgi-bin/mailman/listinfo/dev" \
target="_blank">http://wso2.org/cgi-bin/mailman/listinfo/dev</a><br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
dir="ltr"><div><font face="courier new, monospace">Dushan Abeyruwan | <span \
style="color:rgb(153,153,153)">Associate Tech Lead</span></font></div>

<div><div><div><font color="#999999" face="courier new, monospace">Integration \
Technologies Team</font></div></div><div><font color="#999999" face="courier new, \
monospace">PMC Member Apache Synpase</font></div><div><font face="courier new, \
monospace"><font color="#999999">WSO2 Inc. <a href="http://wso2.com/" \
target="_blank">http://wso2.com/</a></font><br>

</font></div><div><font face="courier new, monospace">Blog:<a \
href="http://dushansview.blogspot.com/">http://dushansview.blogspot.com/</a></font></div><div><span \
style="background-color:transparent"><font color="#999999" face="courier new, \
monospace">Mobile:(0094)713942042</font></span></div>

</div></div>
</div>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic