Thanks Marc,

I should have been clearer. Yes I've used the Ant task which basically
doe the same work as the command line and the code shows how I use the
classes in my client.

The serviceStub class in my example is equivalent to the
"com.my.package.MyServicesStub" class you talk about.

-----Original Message-----
From: Marc F. [mailto:[EMAIL PROTECTED] 
Sent: 29 November 2008 13:20
To: [email protected]
Subject: RE: Client stubs NullPointer Exception



Chris Tinning wrote:
> 
> This is my code - 
> Setup -
> 
> ConfigurationContext config
>
=ConfigurationContextFactory.createConfigurationContextFromFileSystem(nu
ll,
>                       AXIS2_CONFIG_FILE_LOCATION);
> // serviceUrl of the form http://host:8080/app/services/session

> serviceStub = new SessionServiceStub( config, serviceUrl);
> 
> 
> And later calling the service - 
> 
> GetAvailableConnectionsDocument request =
> GetAvailableConnectionsDocument.Factory.newInstance();
> GetAvailableConnectionsResponse response =
> serviceStub.getAvailableConnections( request );
> 
> The call to getAvailableConnections results in the NullPointer. As far
as
> I can see this is the same as in the documentation. It is loading the
> axis2.config file as I've had to comment out the addressing module
from
> that - could this be the problem? I am using the supplied axis2.xml
with
> only that change, I've also tried without supplying the config (ie.
new
> SessionServiceStub(serviceUrl) ) and got the same error.
> 

Well, I am not sure if your code is valid or not (is your code from
Axis2 or
Axis1?), but I am sure that what you do is completely different from
what I
do. I access and use a wsdl webservice. To do such a thing, I have to
develop a XML Beans client. Then, first run the following command, from
the
Axis2 command line tools:

<AXIS2_HOME>/bin/wsdl2java.{bat,sh} -o output -p com.my.package -d
xmlbeans
-t -ss -sd -g -uri http://www.com.site/webservices/MyServices?wsdl

Where "http://www.com.site/webservices/MyServices?wsdl"; is the location
of a
wsdl.

Finally, I just have to use the auto-generated client stub class, that,
running the command above, is "com.my.package.MyServicesStub" class (of
course, you can refactor the code, renaming the class name, for
example).
-- 
View this message in context:
http://www.nabble.com/Client-stubs-NullPointer-Exception-tp20721127p2074
6959.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


________________________________________________________________________
This e-mail has been scanned for viruses, however, No liability is accepted for 
any viruses contained in this message or any of its attachments and it is the 
recipient?s liability to scan this message and its attachment for the same.
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to