users@jax-ws.java.net

RE: Re: NullPointerException: charsetName

From: Mike Feldmeier <mfeldmeier_at_metadata.com>
Date: Fri, 18 Nov 2005 11:47:54 -0800

Hi Vivek, thanks for your response!

I have updated from EA2 to the nightly build. It now will not compile due to following error:

Non unique body parts! In a port, operations must have unique operation signaure on the wire for successful dispatch. In port OutputServicePort, Operations "GetResults" and "RefreshStatus" have the same request body block {http://output.metadata.com/types}OutputJobIdElement

The OutputJobIdElement is a structure I am using to uniquely identify information regarding a running job. It is the sole parameter to the GetResults and RefreshStatus operations. Granted I can create an extra element from the underlying complex type to resolve this, but is there another way? Another one of my ports will have approximately 30 operations, most with a single element type. I didn't run across this problem with previous versions.

Thanks,
Mike

-----Original Message-----
From: Vivek.Pandey_at_Sun.COM [mailto:Vivek.Pandey_at_Sun.COM]
Sent: Friday, November 18, 2005 10:37 AM
To: users_at_jax-ws.dev.java.net
Subject: Re: NullPointerException: charsetName

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. 
-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.3/174 - Release Date: 11/17/2005
 
-- 
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