File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to suppress Axis body content encoding

 
Eric Ma
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stateless session bean method that returns well-formed XML. This method is then turned into a Web Services method using Axis. Using an Java Axis client, there is no problem processing the XML returned. However, with a VB6 client which uses MSXML DOM parser, it complains the XML is not well-formed. The reason is that Axis encoded the < and > characters in XML into < and >, and MS XML parser does not automatically decode these. I would like to know whether it is possible to turn off such encoding in Axis so that I don't incur overhead with conversion?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you're "returning" the XML as a String, right? If that's the case, Axis will always encode your XML as text instead of XML. If you want to create a document-style web service which returns a custom XML structure, you need to use org.w3c.dom.Element as the method argument and return type in your web service class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic