Re: NullPointerException when trying to generate JAX-WS client from WS-Notification WSDL

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Mon, 22 Aug 2005 11:06:09 -0700

hi James,

the NPE is result of missing required input binding for operation "Notify".

The abstract definition defines it as one way operation in

<!-- ================ NotificationConsumer::Notify ================
         (TopicExpression, ProducerReference, Message)*
     returns: n/a (one way)
   <wsdl:message name="Notify">
      <wsdl:part name="Notify" element="wsnt:Notify"/>

<!-- ========= NotificationConsumer PortType Definition =========== -->
   <wsdl:portType name="NotificationConsumer">

      <wsdl:operation name="Notify">
         <wsdl:input message="wsntw:Notify"/>


But while binding you're not providing binding for the input. Here is
your binding from wsdl/Service-Consumer.wsdl:

    <wsdl:operation name="Notify">
      <soap:operation />

if you change your wsdl:input binding to:
    <wsdl:operation name="Notify">
      <soap:operation />
        <soap:body parts="Notify" use="literal"/>

I think wsimport should work fine with this change.

Regardless of that NPE shouldnt be thrown, instead a proper exception
giving the problem with WSDL should have been trown. It will be fixed.

-vivek. wrote:

> I've a demo attempting to generate a JAX-WS client for WS-
> Notification here...
> unzip and type
> ant
> and you should see the NullPointerException. Maybe I've done
> something silly in the WSDL but it seems to validate fine in Eclipse
> WebTools. The NullPointerException gives no stack trace, if I use ant
> -v or ant -d so I cannot find any more info on the error.
> Any ideas? Has anyone ever managed to generate a JAX-WS client for WS-
> Notification WSDLs? (They seem complex enough to be a good test case
> for you to try out).
> James
> -------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.