[prev in list] [next in list] [prev in thread] [next in thread]
List: esb-java-dev
Subject: Re: [Dev] [ESB]Setting messageType=application/xml removes SOAP envelop of the response sent to clie
From: Prabath Ariyarathna <prabathar () wso2 ! com>
Date: 2014-12-30 4:57:11
Message-ID: CAC8=Zum0XPm6QCVqsLgQyN5mB0To+syr6HS+jxWD6awzW+FWfg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Sajith.
when you set *messageType = application/xml ,*
org.apache.axis2.builder.ApplicationXMLBuilder
is executing and for the *text/xml *it is
org.apache.axis2.builder.SOAPBuilder.
Please see the this [1] link to more information.
[1] =
https://docs.wso2.com/display/ESB481/Working+with+Message+Builders+and+Formatters
On Tue, Dec 30, 2014 at 7:20 AM, Bhathiya Jayasekara <bhathiya@wso2.com>
wrote:
> Hi Sajith,
>
> When you set *messageType=application/xml* in out sequence, you mean that
> client is expecting xml but not soap. So *application/xml* formatter is
> called to format the message to be sent to the client. Hence the above
> behavior.
>
> Thanks,
> Bhathiya
>
> On Mon, Dec 29, 2014 at 7:33 PM, Sajith Ravindra <sajithr@wso2.com> wrote:
>
> > Hi all,
> >
> > In sample 150 of ESB 4.8.1 , when messageType property is set to
> > application/xml in the outSequence, in the response sent back to the client
> > SOAP envelop is removed even the backend sends it's response wrapped in a
> > SOAP envelop, response sent to the client is as follows,
> >
> > [2014-12-29 19:12:18,730] DEBUG - wire << "<ns:getQuoteResponse xmlns:ns="
> > http://services.samples"><ns:return xmlns:ax21="
> > http://services.samples/xsd" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> > xsi:type="ax21:GetQuoteResponse"><ax21:change>4.267710946853411</ax21:change><ax21 \
> > :earnings>-8.384515151253616</ax21:earnings><ax21:high>-171.72720083893228</ax21:high><ax21:last>173.9292795443228</ax21:last><ax21:lastTradeTimestamp>Mon
> > Dec 29 19:12:18 EST
> > 2014</ax21:lastTradeTimestamp><ax21:low>178.9102275697461</ax21:low><ax21:marketCap>3.506851342216575E7</ax21:marketCap><ax21:name>IBM
> > Company</ax21:name><ax21:open>-171.9757890677209</ax21:open><ax21:peRatio>-18.479 \
> > 801226546627</ax21:peRatio><ax21:percentageChange>-2.5732205967038047</ax21:percen \
> > tageChange><ax21:prevClose>-165.85095550378315</ax21:prevClose><ax21:symbol>IBM</a \
> > x21:symbol><ax21:volume>8921</ax21:volume></ns:return></ns:getQuoteResponse>[\r][\n]"
> >
> > And when messageType=text/xml it does not remove the SOAP envelop and
> > response sent to client as follows,
> >
> > <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="
> > http://www.w3.org/2005/08/addressing"></soapenv:Header><soapenv:Body><ns:getQuoteResponse
> > xmlns:ns="http://services.samples"><ns:return xmlns:ax21="
> > http://services.samples/xsd" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> > xsi:type="ax21:GetQuoteResponse"><ax21:change>4.2152298724679635</ax21:change><ax2 \
> > 1:earnings>12.957138141193525</ax21:earnings><ax21:high>-55.425955098582605</ax21:high><ax21:last>56.15851948458244</ax21:last><ax21:lastTradeTimestamp>Mon
> > Dec 29 19:26:29 EST
> > 2014</ax21:lastTradeTimestamp><ax21:low>-55.058862275912574</ax21:low><ax21:marketCap>4.900324614841035E7</ax21:marketCap><ax21:name>IBM
> > Company</ax21:name><ax21:open>57.942574162486736</ax21:open><ax21:peRatio>-17.846 \
> > 611716547397</ax21:peRatio><ax21:percentageChange>-7.898663362474534</ax21:percent \
> > ageChange><ax21:prevClose>-53.36636946060953</ax21:prevClose><ax21:symbol>IBM</ax2 \
> > 1:symbol><ax21:volume>9422</ax21:volume></ns:return></ns:getQuoteResponse></soapenv:Body></soapenv:Envelope>
> >
> > Can someone please describe this behavior? why setting
> > messageType=application/xml removes the SOAP envelop from the response sent
> > to client?
> >
> > Thanks in advance
> >
> > Thanks
> > *,Sajith Ravindra*
> > Senior Software Engineer
> > WSO2 Inc.; http://wso2.com
> > lean.enterprise.middleware
> >
> > mobile: +94 77 2273550
> > blog: http://sajithr.blogspot.com/
> > <http://lk.linkedin.com/pub/shani-ranasinghe/34/111/ab>
> >
> > _______________________________________________
> > Dev mailing list
> > Dev@wso2.org
> > http://wso2.org/cgi-bin/mailman/listinfo/dev
> >
> >
>
>
> --
> *Bhathiya Jayasekara*
> *Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
*Prabath Ariyarathna*
*Associate Technical Lead*
*WSO2, Inc. *
*lean . enterprise . middleware *
*Email: prabathar@wso2.com <prabathar@wso2.com>*
*Blog: http://prabu-lk.blogspot.com <http://prabu-lk.blogspot.com>*
*Flicker : https://www.flickr.com/photos/47759189@N08
<https://www.flickr.com/photos/47759189@N08>*
*Mobile: +94 77 699 4730 *
[Attachment #5 (text/html)]
<div dir="ltr"><div>Hi Sajith.</div><div><br></div>when you set <b>messageType = \
application/xml ,</b> <span \
style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">org.apache.axis2.builder.ApplicationXMLBuilder \
is executing and for the <b>text/xml </b>it is </span><span \
style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">org.apache.axis2.builder.SOAPBuilder. \
</span><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">Please \
see the this [1] link to more information.</span></div><div><font color="#333333" \
face="Arial, sans-serif"><span \
style="font-size:14px;line-height:20px"><br></span></font></div><div><font \
color="#333333" face="Arial, sans-serif"><span \
style="font-size:14px;line-height:20px">[1] = <a \
href="https://docs.wso2.com/display/ESB481/Working+with+Message+Builders+and+Formatter \
s">https://docs.wso2.com/display/ESB481/Working+with+Message+Builders+and+Formatters</a></span></font><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 7:20 AM, \
Bhathiya Jayasekara <span dir="ltr"><<a href="mailto:bhathiya@wso2.com" \
target="_blank">bhathiya@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi Sajith,<div><br></div><div>When you set \
<span style="font-size:13px"><b>messageType=application/xml</b> in out sequence, you \
mean that client is expecting xml but not soap. So </span><span \
style="font-size:13px"><b>application/xml</b> formatter is called to format the \
message to be sent to the client. Hence the above behavior.</span></div><div><span \
style="font-size:13px"><br></span></div><div><span \
style="font-size:13px">Thanks,</span></div><div><span style="font-size:13px">Bhathiya \
</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div \
class="h5">On Mon, Dec 29, 2014 at 7:33 PM, Sajith Ravindra <span dir="ltr"><<a \
href="mailto:sajithr@wso2.com" target="_blank">sajithr@wso2.com</a>></span> \
wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div \
dir="ltr"><div><div><div><div>Hi all,<br><br></div>In sample 150 of ESB 4.8.1 , when \
messageType property is set to application/xml in the outSequence, in the response \
sent back to the client SOAP envelop is removed even the backend sends it's \
response wrapped in a SOAP envelop, response sent to the client is as \
follows,<br><br>[2014-12-29 19:12:18,730] DEBUG - wire << \
"<ns:getQuoteResponse xmlns:ns="<a href="http://services.samples" \
target="_blank">http://services.samples</a>"><ns:return \
xmlns:ax21="<a href="http://services.samples/xsd" \
target="_blank">http://services.samples/xsd</a>" xmlns:xsi="<a \
href="http://www.w3.org/2001/XMLSchema-instance" \
target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" \
xsi:type="ax21:GetQuoteResponse"><ax21:change>4.267710946853411< \
/ax21:change><ax21:earnings>-8.384515151253616</ax21:earnings><ax21: \
high>-171.72720083893228</ax21:high><ax21:last>173.9292795443228</ax21:last><ax21:lastTradeTimestamp>Mon \
Dec 29 19:12:18 EST 2014</ax21:lastTradeTimestamp><ax21:low>178.9102275697 \
461</ax21:low><ax21:marketCap>3.506851342216575E7</ax21:marketCap><ax21:name>IBM \
Company</ax21:name><ax21:open>-171.9757890677209</ax21:open><ax21 \
:peRatio>-18.479801226546627</ax21:peRatio><ax21:percentageChange>-2.57 \
32205967038047</ax21:percentageChange><ax21:prevClose>-165.85095550378315& \
lt;/ax21:prevClose><ax21:symbol>IBM</ax21:symbol><ax21:volume>892 \
1</ax21:volume></ns:return></ns:getQuoteResponse>[\r][\n]"<br><br></div>And \
when messageType=text/xml it does not remove the SOAP envelop and response sent to \
client as follows,<br><br><?xml version="1.0" \
encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="<a \
href="http://schemas.xmlsoap.org/soap/envelope/" \
target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>"><soapenv:Header \
xmlns:wsa="<a href="http://www.w3.org/2005/08/addressing" \
target="_blank">http://www.w3.org/2005/08/addressing</a>"></soapenv:Header><soapenv:Body><ns:getQuoteResponse \
xmlns:ns="<a href="http://services.samples" \
target="_blank">http://services.samples</a>"><ns:return \
xmlns:ax21="<a href="http://services.samples/xsd" \
target="_blank">http://services.samples/xsd</a>" xmlns:xsi="<a \
href="http://www.w3.org/2001/XMLSchema-instance" \
target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" \
xsi:type="ax21:GetQuoteResponse"><ax21:change>4.2152298724679635< \
;/ax21:change><ax21:earnings>12.957138141193525</ax21:earnings><ax21 \
:high>-55.425955098582605</ax21:high><ax21:last>56.15851948458244</ax21:last><ax21:lastTradeTimestamp>Mon \
Dec 29 19:26:29 EST 2014</ax21:lastTradeTimestamp><ax21:low>-55.0588622759 \
12574</ax21:low><ax21:marketCap>4.900324614841035E7</ax21:marketCap><ax21:name>IBM \
Company</ax21:name><ax21:open>57.942574162486736</ax21:open><ax21 \
:peRatio>-17.846611716547397</ax21:peRatio><ax21:percentageChange>-7.89 \
8663362474534</ax21:percentageChange><ax21:prevClose>-53.36636946060953< \
;/ax21:prevClose><ax21:symbol>IBM</ax21:symbol><ax21:volume>9422& \
lt;/ax21:volume></ns:return></ns:getQuoteResponse></soapenv:Body></soapenv:Envelope><br><br></div>Can \
someone please describe this behavior? why setting messageType=application/xml \
removes the SOAP envelop from the response sent to client?<br><br></div>Thanks in \
advance<br><div><div><div><div><br clear="all"><div><div><div><div><div \
dir="ltr"><span><font color="#888888"><div dir="ltr"><div><font size="1"><span><font \
color="#888888"><span \
style="color:rgb(136,136,136);font-family:arial,sans-serif">Thanks<b>,<br>Sajith \
Ravindra</b></span><br style="color:rgb(136,136,136);font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif">Senior Software \
Engineer</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif">WSO2 Inc.; \
</span><a href="http://wso2.com/" \
style="color:rgb(17,85,204);font-family:arial,sans-serif" \
target="_blank">http://wso2.com</a><br \
style="color:rgb(136,136,136);font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif">lean.enterprise.middleware</span><br \
style="color:rgb(136,136,136);font-family:arial,sans-serif">
<br style="color:rgb(136,136,136);font-family:arial,sans-serif"><font \
color="#999999"><span style="font-family:arial,sans-serif">mobile: </span><a \
value="+94772273555">+94 77 \
2273550</a><br></font></font></span></font></div><div><font size="1"><span><font \
color="#888888"><font color="#999999">blog: <a href="http://sajithr.blogspot.com/" \
target="_blank">http://sajithr.blogspot.com/</a><br></font></font></span></font></div><font \
size="1"><span><font color="#888888"><font color="#999999"><a \
href="http://lk.linkedin.com/pub/shani-ranasinghe/34/111/ab" title="View public \
profile" name="14a98e3bf5995686_14a989d02a2a5ea4_14a9892ac34de8c7_SafeHtmlFilter_142a403bdfc64853_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" \
target="_blank"></a> \
</font></font></span></font></div></font></span></div></div></div> \
</div></div></div></div></div></div></div> \
<br></div></div>_______________________________________________<br> Dev mailing \
list<br> <a href="mailto:Dev@wso2.org" target="_blank">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> \
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="courier new, \
monospace"><b><i>Bhathiya Jayasekara</i></b></font><div><font face="courier new, \
monospace"><i>Software Engineer,</i></font></div><div><font face="courier new, \
monospace"><i>WSO2 inc., <a href="http://wso2.com" \
target="_blank">http://wso2.com</a></i></font></div><div><font face="courier new, \
monospace"><i><br></i></font></div><div><font face="courier new, monospace"><i>Phone: \
<a href="tel:%2B94715478185" value="+94715478185" \
target="_blank">+94715478185</a></i></font></div><div><font face="courier new, \
monospace"><i>LinkedIn: <a href="http://www.linkedin.com/in/bhathiyaj" \
target="_blank">http://www.linkedin.com/in/bhathiyaj</a></i></font></div><div><font \
face="courier new, monospace"><i>Twitter: <a href="https://twitter.com/bhathiyax" \
target="_blank">https://twitter.com/bhathiyax</a></i></font></div><div><font \
face="courier new, monospace"><i>Blog: <a \
href="http://movingaheadblog.blogspot.com/" \
target="_blank">http://movingaheadblog.blogspot.com</a></i></font></div></div></div> \
</font></span></div> <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> \
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div \
dir="ltr"><div><i>Prabath Ariyarathna<br></i></div><div><div><p \
style="margin:0px"><i><span \
style="font-size:10pt;font-family:Arial,sans-serif">Associate Technical \
Lead</span></i></p><p style="margin:0px"><b \
style="font-family:Arial,sans-serif;font-size:10pt"><i>WSO2, Inc. </i></b></p><p \
style="margin:0px"><i><span style="font-size:10pt;font-family:Arial,sans-serif">lean \
. enterprise . middleware </span></i><b \
style="font-family:Arial,sans-serif;font-size:10pt"><i><br></i></b></p><p \
style="margin:0px"><i><span \
style="font-size:10pt;font-family:Arial,sans-serif"><br></span></i></p><p \
style="margin:0px"><i>Email: <a href="mailto:prabathar@wso2.com" \
target="_blank">prabathar@wso2.com</a></i></p><p style="margin:0px"><i>Blog: <a \
href="http://prabu-lk.blogspot.com" \
target="_blank">http://prabu-lk.blogspot.com</a></i></p><p \
style="margin:0px"><i>Flicker : <a href="https://www.flickr.com/photos/47759189@N08" \
target="_blank">https://www.flickr.com/photos/47759189@N08</a></i></p><p \
style="margin:0px"><i>Mobile: <a value="+94774587844" \
style="color:rgb(17,85,204)">+94 77 699 4730 </a></i><b \
style="font-family:Arial,sans-serif;font-size:10pt"><i><br></i></b></p><p \
style="margin:0px"><br></p></div><div><p style="margin:0px"><br></p></div><div><p \
style="margin:0px"><span \
style="font-size:10pt;font-family:Arial,sans-serif"><i><br></i></span></p><p \
style="margin:0px"><br></p></div></div></div></div></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