开发者

Apache Axis 1.x xml payload

I'm using apache axis to consume a few SOAP operations. The web service I'm talking to takes XML as one of the payload in开发者_JAVA技巧puts. I noticed that Axis is encoding the non xml friendly characters. IE < > to &alt; etc.. etc..

How can I tell apache Axis to allow my payload to go over un-encoded?


I had exactly this problem and the only way that I was able to solve it was by overriding the XMLEncoder which ships with Apache Axis 1.4.

I used Jad to decompile the com.org.apache.axis.components.encoding.UTF8Encoder, copied the code into my own class and commented out the &, ", < and > case statements.

To configure Axis to use this new Encoder you also have to create a

META-INF/services/org.apache.axis.components.encoding.XMLEncoder

file containing just the FQDN of your new class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜