hi James,
the NPE is result of missing required input binding for operation "Notify".
The abstract definition defines it as one way operation in
wsdl\WS-BaseNotification-1_2-Draft_01.wsdl:
<!-- ================ NotificationConsumer::Notify ================
Notify(
NotificationMessage
(TopicExpression, ProducerReference, Message)*
returns: n/a (one way)
-->
<wsdl:message name="Notify">
<wsdl:part name="Notify" element="wsnt:Notify"/>
</wsdl:message>
<!-- ========= NotificationConsumer PortType Definition =========== -->
<wsdl:portType name="NotificationConsumer">
<wsdl:operation name="Notify">
<wsdl:input message="wsntw:Notify"/>
</wsdl:operation>
</wsdl:portType>
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 />
<wsdl:input></wsdl:input>
</wsdl:operation>
if you change your wsdl:input binding to:
<wsdl:operation name="Notify">
<soap:operation />
<wsdl:input>
<soap:body parts="Notify" use="literal"/>
</wsdl:input>
</wsdl:operation>
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.
jastrachan_at_mac.com wrote:
> I've a demo attempting to generate a JAX-WS client for WS-
> Notification here...
>
> http://codehaus.org/~jstrachan/wsn.zip
>
> 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
> -------
> http://radio.weblogs.com/0112098/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
--
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.