You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nic Hobbs <ni...@subdimension.com> on 2002/04/25 16:01:27 UTC

Problems returning a string

Hi guys,

I have a problem returning a string from a service as described below and
wondered if anyone could help.

I basically have a string which is base64 encoded and when I print it out in
java it looks something like
:JQAAABgAAABjY9wni2+tRzUsUHZRrI75sF6K96D0gwjIugsuu7F1ZQ==:
(bounded by : for clarity).

Looking at the bytes that compose this I see the last two bytes are the two
'=' signs. However, when I view it in the tcpmon supplied with axis the
string shows two little boxes on the end before the last colon and I get an
error in my application:

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was
found in the element content of the document.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was
found in the element content of the document.
        at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
        at
weblogic.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLD
ocumentScanner.java:658)
        at
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
ch(XMLDocumentScanner.java:1374)
        at
weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
nner.java:381)
        at
weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
        at
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
        at
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:202)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:428)
        at org.apache.axis.client.Call.invoke(Call.java:1918)
        at org.apache.axis.client.Call.invoke(Call.java:1689)
        at org.apache.axis.client.Call.invoke(Call.java:1607)
        at org.apache.axis.client.Call.invoke(Call.java:1168)
        at TestAuthenticator.main(TestAuthenticator.java:18)


I have tried setting the retuen class and the return type to be strings but
to no avail.

Does anyone have any ideas?

Many thanks,

Nic