Chris Tinning wrote:
> 
> This is my code - 
> Setup -
> 
> ConfigurationContext config
> =ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
>                       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-tp20721127p20746959.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]

Reply via email to