Thanks a lot, i guess the problem is done. probably i think Windows' CLASSPATH has some problem with AXIS2, i will try old versions of AXIS2. :)
cheers!! -----Original Message----- From: "Paul Fremantle" <[EMAIL PROTECTED]> To: [email protected] Date: Tue, 16 Jan 2007 05:36:03 +0000 Subject: Re: Re: Re: Re: WSDL2Java Help Jiang This is something you have to watch out with XMLBeans. XMLBeans generates a lot of .xsb files which are binary mapping data between the XML and the Java objects. You need to make sure these files are in the classpath. Usually the best way to do that is create a client jar by using the ant build script that WSDL2Java generates. You can do this just by typing ant in the client directory. Paul On 1/16/07, Jiang Liu <[EMAIL PROTECTED]> wrote: > Yeh, thank you so much and i guess it is the school's firewall. > > And, the story is not over, here is the new problem when running the same > command twice(or even more): > > e:\GlobalWeather\client\build\classes>java > -Djava.ext.dirs=H:\Webservice_source\axis2-1.1.1\lib > net.webservicex.www.Client > Exception in thread "main" java.lang.ExceptionInInitializerError > at > net.webservicex.www.GetWeatherDocument$Factory.newInstance(GetWeather > Document.java:132) > at net.webservicex.www.Client.main(Client.java:7) > Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable > to l > oad class with name > schemaorg_apache_xmlbeans.system.s22C110A411CB415190A42F6FFD > BFB022.TypeSystemHolder. Make sure the generated binary files are on the > classpa > th. > at > org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:7 > 83) > at > net.webservicex.www.GetWeatherDocument.<clinit>(GetWeatherDocument.ja > va:19) > ... 2 more > Caused by: java.lang.ClassNotFoundException: > schemaorg_apache_xmlbeans.system.s2 > 2C110A411CB415190A42F6FFDBFB022.TypeSystemHolder > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at > org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:7 > 69) > ... 3 more > > > Exception: schemaorg_apache_xmlbeans.system.s2 > 2C110A411CB415190A42F6FFDBFB022.TypeSystemHolder also happened when i hand > copied all required classes from AXIS2. > > Cheers!! > > > -----Original Message----- > From: "Paul Fremantle" <[EMAIL PROTECTED]> > To: [email protected] > Date: Tue, 16 Jan 2007 05:04:33 +0000 > Subject: Re: Re: Re: WSDL2Java Help > > Jiang > > You just need to have your classpath correct. You shouldn't need to > copy class files around. > > Do you have a personal firewall? Maybe its blocking access to the service. > > Paul > > On 1/16/07, Jiang Liu <[EMAIL PROTECTED]> wrote: > > Thank you so much! :) > > Now it works but still, i got connect refused exceptions, i am not sure > > this is caused by the service which requires user authorization or still, > > WSDL2Java's problem. Here are the exceptions: > > > > e:\GlobalWeather\client\build\classes>java -Djava.ext.dirs= > > H:\Webservice_source\axis2-1.1.1\lib net.webservicex.www.Client > > > > Jan 16, 2007 3:51:20 PM org.apache.commons.httpclient.HttpMethodDirector > > execute WithRetry INFO: I/O exception (java.net.ConnectException) caught > > when processing request: Connection refused: connect > > Jan 16, 2007 3:51:20 PM org.apache.commons.httpclient.HttpMethodDirector > > execute WithRetry INFO: Retrying request Jan 16, 2007 3:51:21 PM > > org.apache.commons.httpclient.HttpMethodDirector execute WithRetry INFO: > > I/O exception (java.net.ConnectException) caught when processing request: > > Connection refused: connect > > Jan 16, 2007 3:51:21 PM org.apache.commons.httpclient.HttpMethodDirector > > execute WithRetry INFO: Retrying request > > Jan 16, 2007 3:51:22 PM org.apache.commons.httpclient.HttpMethodDirector > > execute WithRetry > > INFO: I/O exception (java.net.ConnectException) caught when processing > > request: Connection refused: connect > > Jan 16, 2007 3:51:22 PM org.apache.commons.httpclient.HttpMethodDirector > > execute withRetry > > INFO: Retrying request > > org.apache.axis2.AxisFault: Connection refused: connect; nested exception > > is: > > java.net.ConnectException: Connection refused: connect; nested > > exception > > is: > > org.apache.axis2.AxisFault: Connection refused: connect; nested > > exceptio > > n is: > > java.net.ConnectException: Connection refused: connect > > > > > > and BTW, is that everybody has to provide -Djava... when running the > > generated client or just me? I used to hand copy all required classes from > > AXIS2 jar files but why WSDL2Java can not create them automatically? > > > > cheers!! > > > > > > > > -----Original Message----- > > From: "Paul Fremantle" <[EMAIL PROTECTED]> > > To: [email protected] > > Date: Tue, 16 Jan 2007 04:46:38 +0000 > > Subject: Re: Re: WSDL2Java Help > > > > Jiang > > > > It looks like you have run WSDL2Java successfully and the problem is > > running the client you've created. > > > > Try java -Djava.ext.dirs=[axis2directory]\lib > > > > Paul > > > > On 1/16/07, Jiang Liu <[EMAIL PROTECTED]> wrote: > > > Hi, Thank you for your reply. > > > Heres the detail: > > > > > > (Win XPsp2, AIXS21.1.1, Ant 1.7, Java1.5) > > > > > > Comsumming the service from: > > > http://www.webservicex.net/globalweather.asmx?WSDL > > > > > > WSDL2Java command is: > > > h:\wsdl2java -uri ...wsdl -p net.webservicex.www -d xmlbeans -o client > > > > > > When running: > > > e:\GlobalWeather\build\classes>java net.webservicex.www.Client > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > > org/apache/axis2/clie > > > nt/Stub at java.lang.ClassLoader.defineClass1(Native Method) at > > > java.lang.ClassLoader.defineClass(ClassLoader.java:620) at > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 > > > 4) 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:306) > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > > > > > > > > There is no such folder "axis2" generated at: > > > "e:\...\bulid\classes\" and i can not set CLASSPATH for > > > "e:\..\bulid\classes\axis2\apache\org\xsd\" > > > > > > I think the proble is WSDL2Java can not generate AXIS2 classes for the > > > client. > > > > > > > > > Cheers!! > > > > > > -----Original Message----- > > > From: "Paul Fremantle" <[EMAIL PROTECTED]> > > > To: [email protected] > > > Date: Tue, 16 Jan 2007 04:22:29 +0000 > > > Subject: Re: WSDL2Java Help > > > > > > Hey Jiang > > > > > > Unfortunately we need to know what the blah blah balh is! > > > > > > Can you post the actual fault message? > > > > > > Paul > > > > > > On 1/16/07, Jiang Liu <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I got a wired problem when running WSDL2Java to generate service client. > > > > > > > > I am using Win XP with lastest AXIS2 and all environment and CLASSPATH > > > > variables have been set, when generating client, there is always a > > > > fault message that class can not be found, e.g > > > > org/apache/axis2/client/stub and blah blah > > > > > > > > I guess the problem is there isnt such a folder called "axis2" at > > > > "\client\build\". > > > > > > > > So why i can not generate axis2 folder and keeping missing those > > > > classes when i try to run the client? > > > > > > > > > > > > cheers!! > > > > ----------------------------- > > > > Jiang Liu > > > > Student Number: 3075163 > > > > CS/Yallara Name: ljiang > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > Paul Fremantle > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair > > > > > > http://bloglines.com/blog/paulfremantle > > > [EMAIL PROTECTED] > > > > > > "Oxygenating the Web Service Platform", www.wso2.com > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > ----------------------------- > > > Jiang Liu > > > Student Number: 3075163 > > > CS/Yallara Name: ljiang > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Paul Fremantle > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair > > > > http://bloglines.com/blog/paulfremantle > > [EMAIL PROTECTED] > > > > "Oxygenating the Web Service Platform", www.wso2.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ----------------------------- > > Jiang Liu > > Student Number: 3075163 > > CS/Yallara Name: ljiang > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Paul Fremantle > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair > > http://bloglines.com/blog/paulfremantle > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > ----------------------------- > Jiang Liu > Student Number: 3075163 > CS/Yallara Name: ljiang > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ----------------------------- Jiang Liu Student Number: 3075163 CS/Yallara Name: ljiang --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
