At 02:19 PM 12/17/2007, [EMAIL PROTECTED] wrote:
Hello,
I am trying to perform a basic test
where I can call a basic web service that I
created and deployed in Tomcat with Axis2. I
am able to get the call to make it to the web
service and perform the function, but the
response has an error that I cant seem to
figure out. It is failing in the sax parser
and it is saying that it has run into an
unexpected child element. In the following
response, I cant figure out what is the offending element.
org.xml.sax.SAXException: SimpleDeserializer
encountered a child element, which is NOT
expected, in something it was trying to deserialize.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:HelloWorldNoReturnResponse xmlns:ns="http://sampleAxisWebSvc">
<ns:return>1</ns:return>
</ns:HelloWorldNoReturnResponse>
</soapenv:Body>
</soapenv:Envelope>
I have pasted the code, the web service and the error that I am receiving.
Any help would be appreciated.
Todd
Tested with Tomcat 5.5 and 6.0
Axis2 1.3
Openlaszlo 4.0.7
I don't know if it's the same issues that I faced when
trying web services, but I can say I never got the
shipped SOAP client to work. The Laszlo guys were
really terrific looking at my issues, but frankly I
was told the current WSDL scan is being done by very
old Apache code and it completely mis-generated the
XML for me. I was told it's a big deal to get the
client side up to snuff to the level of something like
Axis 2 (client piece - not anything to do with your
server side part of the web service).
I'd give the same advice to you that was given before,
and give it to the other question about SOAP as well -
don't use the SOAP implementation. Instead, code
the creation of your XML in two steps - one as a callable
function that's got all the Envelope, Header, and Body
tags in it, the other as the part of the XML that's different
every call. Then just pass the variable XML to the callable
function, and return the XML back into a plain old dataset.
After all, the XML returned is still XML just with a
wrapper around it. Then use a data path to the
real values inside the XML by working around the envelope
like "myDataset:/SOAP-Envelope/SOAP-Header/SOAP-Body/myXML/*"
Use that either directly in fields or a grid, or make a
data pointer out of it if you're going to use it repeatedly.
HTH
=====================================================================
Geoff Crawford Phone: (973) 361 - 4224
Innov8 Computer Solutions, LLC FAX: (973) 537 - 6946
711 Route 10 East, Suite 204 Email: [EMAIL PROTECTED]
Randolph NJ 07869 Web: http://www.innov8cs.com
Progress Blog: http://blogs.ittoolbox.com/database/progress/
Take a Step Up to StepUp Accounting