SOAP/XML Parse problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SOAP/XML Parse problem

Matthew Clark-4
I'm trying to parse an XML to use in a Swazoo/SOAP app in Cincome
VW5i.4,
but my code keeps balking with the following error:

'Unhandled exception: < expected, but not found'

I traced the stack with the following flow:

XML.DOM_SAXDriver(XML.SAXDriver)>>fatalError:
XML.XMLParser>>malformed:
XML.XMLParser>>expected:
XML.XMLParser>>mustFind:
XML.XMLParser>>elementAtPosition:
XML.XMLParser>>getElement
optimized [] in XML.XMLParser>>scanDocument

mustFind: calls skipIf: str, where str is '<'.  The problem lay in
skipIf:,
speficially the line

hereChar = str first ifFalse: [^false].

My problem is that hereChar, from the XML StreamWrapper ReadStream, is
inspecting to the ASCII number of  '<' (i.e., 60), so its comparison to
str
('<') is always false.  I added some Transcript calls:

    Transcript nextPutAll: 'hereChar: '; print: hereChar ; cr.

prints '60', while

    Transcript nextPutAll: 'hereChar: '; print: hereChar asCharacter;
cr.

prints '<', which is what I want.

Assuming the Cincom XML code is correct, I can only deduce that I'm
somehow
loading the XML file incorrectly, causing it to be parsed as it's ASCII
number, instead of the string values themselve.  The SOAP/Swazoo call
I'm
using that actually invokes this is:

req := SoapRequest new
 binding: XMLObjectBinding soapBinding;
 transport: (SoapHttpBindingDescriptor verb: 'POST' soapAction:
'http://soapinterop.org/' );
 accessPoint: 'http://localhost:8123/index.xml' asURI;
 operation: soapOprBindg;
 smalltalkEntity: (Message selector: #echoString arguments:
#(ParabolicSoftwareSystems));
 execute.

Can anyone help clue me into what's going on?  Thanks.

Matt