Filed in archive
Programming
by jason on October 15, 2005

In order to create a Java client with supporting JavaBeans all a user needs to do with Axis is execute the following:
MyLinuxServer> java --classpath commons-logging.jar;log4j-1.2.8.jar;wsdl4j.jar;axis.jar;commons-discovery.jar;jaxrpc.jar;saaj.jar org.apache.axis.wsdl.WSDL2Java http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

One thing I will say about these Axis utilities is that they don't work perfectly 100% of the time. A developer has to dig sometimes to figure out where an error is coming from but I've found those instances few and far between. An example of this is the -- testCase option I mentioned above. With the NOAA web service WSDL2Java created a signature as follows to envoke one of the NOAA services:
binding.NDFDgen(new java.math.BigDecimal(0), new java.math.BigDecimal(0), gov.weather.www.forecasts.xml.DWMLgen.schema.DWML_xsd.ProductType.value1, java.util.Calendar.getInstance(), java.util.Calendar.getInstance(), new gov.weather.www.forecasts.xml.DWMLgen.schema.DWML_xsd.WeatherParametersType());The web service is looking for a date in the format of "2004-01-01T00:00:00" but java.util.Calendar.getInstance() we are trying to submit is not going to provide that format. Once this is changed the JUnit test case works as expected and all is well. A developer could then start pulling and parsing data.
In a future article I will talk about how to create a web service using Axis. The first time I did it I thought to myself "you mean that is it... I don't have to do anything else?" It was really simple.
Permalink: Pulling NOAA Data with Axis
Trackback: http://publish.creative-weblogging.com/publish/mt-tb.pl/10247
Mr Wong
Vote for Pulling NOAA Data with Axis:
|
Rating: 9.00 out of 2 vote(s) cast.
|
Subscribe
Use the search to look for other interesting posts
| RSS | See all blog subscribe options |
|
What is RSS? | |
| Yahoo! |
|
| Addthis |
|
| Bloglines |
|
| Newsletter | |
| Follow us on Twitter! |










