You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Pantvaidya, Vishwajit" <vp...@selectica.com> on 2008/09/11 03:16:51 UTC

[Axis2] After changes to WSDL to make it WS-I compliant, Stub throws Nullpointer

My Axis2 1.3 based webservice has been working well so far, but it was not totally WS-I compliant - the Eclipse based WS-I compliance validation check failed with the message "WS-I: (BP2120) A binding has operations that are not unique." There were 2 operations with no input parameters which caused this failure. I rectified that by adding an empty request element and the WS-I validation check passed. But thereafter, when I regenerated the stubs and tested a client call to the stub (that used to worked earlier), now it failed with the following exception:

Exception in thread "main" java.lang.NullPointerException
            at com.selectica.ws.ecm.wsdlgen.ECMServiceSoapStub.IsPDFWordConversionEnabled(ECMServiceSoapStub.java:549)
            at CallSCMWebServiceStub.main(CallSCMWebServiceStub.java:23)

The nullpointer is in the Stub line#468 (the toEnvelope call) because the dummyWrappedType passed to it is null.
Is this a bug in the Axis2 Stub generation?
Another way of calling the webservice without using the Axis2 generated stub works fine even after the WS-I compliance changes.

I am attaching
- the wsdl (trimmed for simplicity) and the stub class before and after the WS-I compliance changes
- my client code (CallSCMWebServiceStub.java) that calls the service using the stub (this gives the above exception after the service was made WS-I compliant)
- my client code (CallSCMWebServiceSvcUrl.java) that calls the service without using the stub (this works even after the WS-I compliance changes)


RE: [Axis2] After changes to WSDL to make it WS-I compliant, Stub throws Nullpointer

Posted by "Pantvaidya, Vishwajit" <vp...@selectica.com>.
Thanks Amila. I verified and found that this problem is nonexistent in Axis2 1.4.1.

________________________________
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Wednesday, September 10, 2008 11:32 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] After changes to WSDL to make it WS-I compliant, Stub throws Nullpointer

Can you please try with Axis2 1.4.1?

if still fails please log a jira.

thanks,
Amila.
On Thu, Sep 11, 2008 at 6:46 AM, Pantvaidya, Vishwajit <vp...@selectica.com>> wrote:

My Axis2 1.3 based webservice has been working well so far, but it was not totally WS-I compliant - the Eclipse based WS-I compliance validation check failed with the message "WS-I: (BP2120) A binding has operations that are not unique." There were 2 operations with no input parameters which caused this failure. I rectified that by adding an empty request element and the WS-I validation check passed. But thereafter, when I regenerated the stubs and tested a client call to the stub (that used to worked earlier), now it failed with the following exception:



Exception in thread "main" java.lang.NullPointerException

            at com.selectica.ws.ecm.wsdlgen.ECMServiceSoapStub.IsPDFWordConversionEnabled(ECMServiceSoapStub.java:549)

            at CallSCMWebServiceStub.main(CallSCMWebServiceStub.java:23)



The nullpointer is in the Stub line#468 (the toEnvelope call) because the dummyWrappedType passed to it is null.

Is this a bug in the Axis2 Stub generation?

Another way of calling the webservice without using the Axis2 generated stub works fine even after the WS-I compliance changes.



I am attaching

- the wsdl (trimmed for simplicity) and the stub class before and after the WS-I compliance changes

- my client code (CallSCMWebServiceStub.java) that calls the service using the stub (this gives the above exception after the service was made WS-I compliant)

- my client code (CallSCMWebServiceSvcUrl.java) that calls the service without using the stub (this works even after the WS-I compliance changes)



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org<ma...@ws.apache.org>
For additional commands, e-mail: axis-user-help@ws.apache.org<ma...@ws.apache.org>



--
Amila Suriarachchi,
WSO2 Inc.

Re: [Axis2] After changes to WSDL to make it WS-I compliant, Stub throws Nullpointer

Posted by Amila Suriarachchi <am...@gmail.com>.
Can you please try with Axis2 1.4.1?

if still fails please log a jira.

thanks,
Amila.

On Thu, Sep 11, 2008 at 6:46 AM, Pantvaidya, Vishwajit <
vpantvai@selectica.com> wrote:

>  My Axis2 1.3 based webservice has been working well so far, but it was
> not totally WS-I compliant - the Eclipse based WS-I compliance validation
> check failed with the message "WS-I: (BP2120) A binding has operations that
> are not unique." There were 2 operations with no input parameters which
> caused this failure. I rectified that by adding an empty request element and
> the WS-I validation check passed. But thereafter, when I regenerated the
> stubs and tested a client call to the stub (that used to worked earlier),
> now it failed with the following exception:
>
>
>
> Exception in thread "main" *java.lang.NullPointerException*
>
>             at
> com.selectica.ws.ecm.wsdlgen.ECMServiceSoapStub.IsPDFWordConversionEnabled(
> *ECMServiceSoapStub.java:549*)
>
>             at CallSCMWebServiceStub.main(*CallSCMWebServiceStub.java:23*)
>
>
>
> The nullpointer is in the Stub line#468 (the toEnvelope call) because the
> dummyWrappedType passed to it is null.
>
> Is this a bug in the Axis2 Stub generation?
>
> Another way of calling the webservice without using the Axis2 generated
> stub works fine even after the WS-I compliance changes.
>
>
>
> I am attaching
>
> - the wsdl (trimmed for simplicity) and the stub class before and after the
> WS-I compliance changes
>
> - my client code (CallSCMWebServiceStub.java) that calls the service using
> the stub (this gives the above exception after the service was made WS-I
> compliant)
>
> - my client code (CallSCMWebServiceSvcUrl.java) that calls the service
> without using the stub (this works even after the WS-I compliance changes)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>



-- 
Amila Suriarachchi,
WSO2 Inc.