Title: Generated client stubs & LocalTransport

Hi Kevin (you seem to be the expert with local transport),
hi everybody,

I would like to use generated client code together with the local transport mode.
More precisely: I am using client stubs generated by WSDL2Java. How can I set the transport with this kind of client?

My Client code looks like this:

   // Construct locator
   ImportDocumentService locator = new ImportDocumentServiceLocator();
 
   // Obtain the server reference from the locator
   ImportDocument server = locator.getImportDocument( new URL("http://blabla") );
 
   // Fill in request data
   ImportDocumentRequestObject requestObject = new ImportDocumentRequestObject();
   // requestObject.setAz("1231212312345041000001");
   // ...

   // Set local transport
   Call myCall = serviceLocator.getCall();
   AxisServer axisServer = AxisServer.getServer( someConfig );
   myCall.setTransport( new LocalTransport( axisServer ));
 
   // Invoke the service
   ImportDocumentResponseObject responseObject = server.importDocument(requestObject);


The problem with this is that the Call object obtained by 'getCall' is not initialized before the actual invocation of the service. How can I set the transport in this case?

Any help is appreciated,
Lothar,
Bonn/Germany
  

Reply via email to