Perhaps my client example may help you:
http://www.jroller.com/gmazza/date/20070929

Glen

Am Freitag, den 11.04.2008, 18:21 +0100 schrieb Tim Perrett:
> This interested me, as Im trying to get to grips with CXF.
> 
> I just tried to put together a basic client (and even tried the WSDL  
> below) but im getting odd problems when trying to run it. Even in its  
> most simple form (very similar to the hello world on the wiki - 
> http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html 
>   ) I get this error:
> 
> timperrett$ java com.timperrett.soap.temperature.App
> Starting...
> Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ 
> ws/Service
>          at java.lang.ClassLoader.defineClass1(Native Method)
>          at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>          at  
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>          at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>          at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>          at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>          at java.security.AccessController.doPrivileged(Native Method)
>          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 
> 280)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 
> 374)
>          at com.timperrett.soap.temperature.App.main(App.java:31)
> 
> Line 31 in my (extremely basic) application reads:
> 
> 31: GlobalWeather weather = new GlobalWeather();
> 
> I have all the relevant imports etc but still no joy - any ideas?
> 
> Cheers
> 
> Tim
> 
> 
> 
> 
> On 11 Apr 2008, at 16:37, Daniel Kulp wrote:
> >
> > For the most part, you can just do:
> >
> > wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL
> >
> > Then in your code, just do:
> >
> > GlobalWeather weather = new GlobalWeather();
> > GlobalWeatherSoap port = weather.getGlobalWeatherSoap();
> > String result = port.getWeather(city, country);
> 

Reply via email to