Hi all, Is it possible to preserve the encoded characters like " in the message body when sending through a proxy?
On Sat, Sep 20, 2014 at 2:08 PM, Ishara Premadasa <[email protected]> wrote: > Hi Miyuru, > > Is there any configuration available for keep the encodings? > Thanks! > Ishara > > On Fri, Sep 19, 2014 at 12:16 AM, Miyuru Wanninayaka <[email protected]> > wrote: > >> This behavior comes from axiom. >> >> OMElement omElement = AXIOMUtil.stringToOM("<content>This is >> & < > ' " Test </content></x>"); >> System.out.println(omElement.toString()); >> >> generates >> >> <content>This is & < > ' " Test </content> >> >> @Do you know a way to turn this off in axiom level. >> >> >> >> On Fri, Sep 19, 2014 at 9:01 AM, Ishara Premadasa <[email protected]> >> wrote: >> >>> Hi all, >>> >>> I observed that when we send encoded special characters in msg context >>> to ESB some of these characters are decoded inside ESB. Please see the >>> example used below. >>> >>> My input message is like this, >>> >>> <body> >>> <content>This is & < > ' " Test </content> >>> </body> >>> >>> When sending this into a proxy service and logged in the ESB, result >>> looks as this. >>> >>> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope >>> "><soapenv:Body><content>*This is & < > ' " test * >>> </content></soapenv:Body></soapenv:Envelope> >>> >>> You can see that ampersand and less than encodings are preserved but >>> greater than, single and double quotes are decoded. On a side this [1] >>> explains that only the & and < characters are strictly illegal to have in >>> XML. I was wondering whether ESB also follows this reason. >>> >>> Is there any specific reason why this happens? In addition if it is >>> required to keep these characters encoded inside ESB what should be the way >>> to do that? >>> >>> Thanks! >>> Ishara >>> >>> [1] >>> http://stackoverflow.com/questions/14228463/why-is-ok-to-be-in-value-of-xml-file-but-is-not >>> >>> -- >>> Ishara Premasada >>> Software Engineer, >>> WSO2 Inc. http://wso2.com/ >>> >>> >>> *Blog : http://isharapremadasa.blogspot.com/ >>> <http://isharapremadasa.blogspot.com/>Twitter : >>> https://twitter.com/ishadil <https://twitter.com/ishadil>Mobile : +94 >>> 714445832 <%2B94%20714445832>* >>> >>> >>> >> >> >> -- >> Miyuru Wanninayaka >> Senior Technical Lead >> WSO2 Inc. : http://wso2.com >> >> Mobile : +94 77 209 9788 >> > > > > -- > Ishara Premasada > Software Engineer, > WSO2 Inc. http://wso2.com/ > > > *Blog : http://isharapremadasa.blogspot.com/ > <http://isharapremadasa.blogspot.com/>Twitter : > https://twitter.com/ishadil <https://twitter.com/ishadil>Mobile : +94 > 714445832 <%2B94%20714445832>* > > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Asanka Abeyweera Software Engineer WSO2 Inc. Phone: +94 712228648 Blog: a5anka.github.io
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
