users@jax-ws.java.net

Re: NullPointerException: charsetName

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Fri, 18 Nov 2005 10:37:01 -0800

the stack trace shows your using old or atleast EA2 bits. this portion
of the code was re-written. Can you try the latest bits[1]?

-vivek.
[1]https://jax-ws.dev.java.net/servlets/ProjectDocumentList?folderID=4318&expandFolder=4318&folderID=0

Mike Feldmeier wrote:

> I have been unable to tell if this is a JAX-WS problem or a Stax
> problem (or maybe both). I have generated a doc/lit web service and
> have in JBoss. When I try to access it with the following code:
>
>
>
> ServiceFactory serviceFactory = ServiceFactory.newInstance();
>
> OutputService service =
> (OutputService)serviceFactory.createService((URL)null,
> OutputService.class);
>
> port = service.getOutputServicePort();
>
>
>
> I get the following exception:
>
>
>
> _java.lang.NullPointerException_: charsetName
>
> at java.io.InputStreamReader.<init>(Unknown Source)
>
> at
> com.bea.xml.stream.MXParserFactory.createXMLStreamReader(_MXParserFactory.java:49_)
>
> at com.sun.xml.ws.streaming.StAXReader.<init>(_StAXReader.java:78_)
>
> at
> com.sun.xml.ws.streaming.XMLReaderFactoryImpl.createXMLReader(_XMLReaderFactoryImpl.java:41_)
>
> at
> com.sun.xml.ws.streaming.XMLReaderFactoryImpl.createXMLReader(_XMLReaderFactoryImpl.java:37_)
>
> at
> com.sun.xml.ws.streaming.XMLReaderFactoryImpl.createXMLReader(_XMLReaderFactoryImpl.java:29_)
>
> at
> com.sun.xml.ws.wsdl.parser.WSDLParser.parse(_WSDLParser.java:106_)
>
> at com.sun.xml.ws.client.WebService.parseWSDL(_WebService.java:104_)
>
> at
> com.sun.xml.ws.client.WebService.preProcess(_WebService.java:120_)
>
> at
> com.sun.xml.ws.client.WebService.createEndpointIFBaseProxy(_WebService.java:192_)
>
> at com.sun.xml.ws.client.WebService.getPort(_WebService.java:186_)
>
> at
> com.sun.xml.ws.client.ServiceInvocationHandler.getPort(_ServiceInvocationHandler.java:68_)
>
> at
> com.sun.xml.ws.client.ServiceInvocationHandler.getXXXPort(_ServiceInvocationHandler.java:48_)
>
> at
> com.sun.xml.ws.client.ServiceInvocationHandler.invokeSIMethod(_ServiceInvocationHandler.java:37_)
>
> at
> com.sun.xml.ws.client.ServiceInvocationHandler.invoke(_ServiceInvocationHandler.java:29_)
>
> at $Proxy0.getOutputServicePort(Unknown Source)
>
> at
> com.metadata.output.client.impl.WSOutputClient.<init>(_WSOutputClient.java:29_)
>
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(_Native Method_)
>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
>
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
>
> at
> com.metadata.output.client.OutputClientFactory.getClient(_OutputClientFactory.java:40_)
>
> at
> com.metadata.output.client.OutputClientFactory.main(_OutputClientFactory.java:81_)
>
>
>
> It is occurring after I get the service, when I am retrieving the
> port. Apparently the InputStreamReader is being passed a null
> charsetName, and its explicit response is a NPE. I don’t see anything
> on the service where I can configure a character set. I’ve tried
> playing with the encoding in the XML header with no avail.
>
>
>
> Could anyone point me in the right direction?
>
>
>
> Thanks,
>
> Mike
>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.3/174 - Release Date: 11/17/2005
>

-- 
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.