users@jax-rpc.java.net

Re: Strange com.sun.xml.messaging.saaj.SOAPExceptionImpl

From: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Tue, 16 Oct 2007 11:29:03 +0530

Łabno, Bernard wrote:

>My SAAJ seems to be a part of /opt/glassfish-v2-b53/lib/webservices-rt.jar.
>Do you want me to use newer version of SAAJ ? If yes than how can I make
>Glassfish use that newer verions ?
>
>
Actually what you have seems to be very recent , but then i don't
understand the stack trace :

Caused by: java.io.IOException: Unexpected characters before XML
declaration
       at
com.sun.xml.messaging.saaj.util.XMLDeclarationParser.parse(XMLDeclarationParser.java:121)


here is what i see in line 121 of XMLDeclarationParser.java


 120 }
 121 int len = index;

 123 String decl = xmlDeclStr.toString();

So i need to understand what is your exact setup (classpaths etc.) is
some old SAAJ Impl jar sneaking in from somewhere.

Also note that this error that you are seeing will occur if the parser
detects that there is an XML Declaration <?xml...../> but there are some
extra characters before the <?xml....> decalaration. So what is your
client side setup, are you using Sun's runtime or is the client side
runtime from a different vendor. Can you caputre the SOAPMessage being
recieved by the Service and send it across. Is the message being sent
using a Charset Encoding other than UTF8 or UTF16 ?.

Thanks,
kumar

>>Hi,
>>
>> The stack trace indicates you are using an older version of SAAJ.
>>Will it be possible for you to use a later version of SAAJ and see if
>>the problem persists.
>>
>>https://saaj.dev.java.net/servlets/ProjectDocumentList?folderID=5118&expand
>>
>>
>
>
>