axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan" <>
Subject first Document Style client
Date Mon, 13 Jan 2003 21:03:54 GMT
I'm just getting started with XML, SOAP, and Axis.  I'm in the early
"figuring it out" stages.  For experience, I'd like to try writing a bare
bones client to get the service at:

using the GetInfoByZipCode function.  I've written an RPC client that can
communicate with the service, but I don't know how to handle the
<NewDataSet> and child elements, since this is a document type service.

I get a 

    [ERROR] Call - -Exception: <org.xml.sax.SAXException: SimpleDeserializer 
    encountered a child element, which is NOT expected, in something it 
    was trying to deserialize.>

because I'm expecting a string return type but get a NewDataSet with
children elements.

I'm aware of the WSDL2Java tool, but since I'm learning I prefer to "write
it myself" so I can get a better understanding of what's going on.  I'm
guessing that the "NewDataSet" element is defined somewhere on the site and
I'd use this to parse the XML portion of the return.

If someone could give a little insight as to what the steps would be to do
this, I'd be thankful.  Is the "XML-portion" (<NewDataSet>) of the return
available in my Call object (or someway to get it)?  Once I get the result
XML, what do I use to parse the XML elements "automatically" using the
<NewDataSet> definition?

The service returns this XML:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="" 
  <GetInfoByZIPResponse xmlns="http://www.webserviceX.NET">
      <NewDataSet xmlns="">
          <CITY>Forest Park</CITY>

View raw message