Clemens,

I'm doing this very thing with a Java first approach. My Java class is called Simple. I copied the generated code into an Eclipse Java project. Then created a class called SimpleClient with a main method. The code needed to use the Simple web service from
this client is listed below.

public class SimpleClient
{
 public static void main(String[] args)
 {
   SimpleService simpleService = new SimpleService( );
   Simple simple = simpleService.getSimplePort( );
   System.out.println( simple.getText( ) );
 }
}

That's it! You can find load of examples in the samples folder under your CXF install home directory (that's where I found how to do this).

Mike

----- Original Message ----- From: "Clemens Eisserer" <[email protected]>
To: <[email protected]>
Sent: Thursday, November 11, 2010 5:48 AM
Subject: Howto write wsdl-based client?


Hi,

Thanks to CXF's tutorial "a-simple-jax-ws-service" I was able to write
a simple webservice that has access to the server-side classes.

However I would like to create a client which is completly independent
of server-side code/interfaces by using wsdl2java.
I am quite confused, the Service-Interface doesn't contain my method,
instead it in the endpoint definition and-so-on.
Does somebody know a good tutorial howto write a ws-client using CXF
using the stubs generated by wsdl2java?

Thank you in advance, Clemens

Reply via email to