Step #1: After connecting to the server as root, you can add new accounts. The following statements use GRANT to set up two new accounts:
Would you like your wsdl and xsd's to look this good?
Try clicking on these links to view the annotated wsdl and xsd in your own browser:
Yes. Just run WSDL2Java with the following Options (with the forthcoming Axis2 1.3 Final):
wsdl2java -Eofv -g -uw -u -uri enterprise.wsdl
Notes:
If you run into a "No Trusted Certificate" error when you run wsdl2java and your wsdl is protected by SSL (starts with https://) then look here for a tip to get you going:
http://article.gmane.org/gmane.comp.apache.webservices.axis.user/58499
When the services.xml parameter useOriginalwsdl=true the WSDL soap:address location-parameter is changed to the host address. This becomes a problem when the host is behind a NATed firewall and the WSDL requesting client is coming from a public Internet address. It is confusing that even though the parameter useOriginalwsdl is set to true, Axis2 is still changing the content of the WSDL. There is one more setting that you can switch on to tell Axis2 to just serve the wsdl as it is. You can do this by setting the modifyUserWSDLPortAddress parameter to false as shown below:
<parameter name="useOrignalWSDL">true</parameter>
Axis2 uses Jakart Commons HTTPClient. So you can just use the Context / Wire logging facilities provided by HTTPClient. In example below i set up the Simple logger in an environment variable and use that when i run my client.
C:\TESTING> SET JAVA_OPTS-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
C:\TESTING> java %JAVA_OPTS% MyClient
And the output i got was as follows (munged a bit to protect the innocent):
Step #1: Download Axis2 1.2 and set AXIS2_HOME
Step#2: Run WSDL2Java against the WSDL2.0 document we have come up for Yahoo REST API (See attached YahooV2Search.WSDL) as shown below:
wsdl2java.bat -u -wv 2.0 -uri YahooV2Search.wsdl
Step #3: Write some code to execute the generated stub (see attached Main.java). Drop the Main.java into src directory.
Step #4: Run "ant jar.client", set up your classpath with all axis2 jars and the generated service client jar and execute it. Here's my run.
C:\axis2-1.2\samples\yahoo>java Main
Step #1: Download Axis2 1.2 and set AXIS2_HOME
Step#2: Run WSDL2Java against the WSDL2.0 document we have come up for Flickr API as shown below:
wsdl2java.bat -u -wv 2.0 -uri http://wso2.org/repos/wso2/trunk/wsas/java/modules/samples/FlickrClient/wsdl/FlickrService.wsdl
Step #3: Write some code to execute the generated stub (see attached Main.java). Drop the Main.java into src directory.
Step #4: use http://idgettr.com/ to find the user id of your favorite flickr person. Example, Ken Coar's id is 88257575@N00