Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone ever seen XML like this? 1

Status
Not open for further replies.

woolly2

Programmer
Jan 22, 2007
11
US
Hi

I am fairly new to XML and I'm working with a client who is using a form of XML I have never seen before, I was wondering if anyone here had? As you can see they are encoding the angle brackets of the tags and I have no idea why!

Thanks

<Address>
&lt;Line1></Line1&gt;
&lt;Line2/&gt;
&lt;Line3/&gt;
&lt;City></City&gt;
&lt;State></State&gt;
&lt;PostalCode></PostalCode&gt;
&lt;/Address&gt;
 
Tom

Again, is this a publicly published web service?

I believe the answer to that question is no, they control access by IP.

The service is far from complete and as I think I stated before they are using us to beta test, something that to me would qualify them as "showing callous disregard for the client" in and of itself. Its clear to me (well maybe not totally clear) that they are viewing the XML within the SOAP packet as data.

I found this schema on their site which I believe confirms this;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:Body>
<MYRequest xmlns=" <testXML>string</testXML>
<SToken>string</SToken>
</MYRequest>
</soap:Body>
</soap:Envelope>

All of the XML, the encoded XML, goes within the <testXML></testXML> tags, as you can see they treat that as a string. I can't say I was much of a fan of webs services or XML before this experience and I'm certainly not now.

Thanks all of the help guys.
 
Don't judge web services by this bit of malpractice.
pointlaugh.gif


Web services will play a very strong role in IT for years to come.

Tom Morrison
 
A couple more thoughts...

All this would make good sense if the purpose of the web service were to pass an XML string through to some other application. In other words, is the input parameter to the web service supposed to be an escaped XML 'string' so that every aspect of the string is preserved? (I am looking at the element name testXML and this just might be the intent of the web service.) If so, then this is just the 'web service version' of tsuji's comment (he used textarea).

And, again, what happens if, using your browser, you do a simple HTTP GET (i.e. type the URL into the browser's address box)? Does some XML come back? Does that XML look like a WSDL?

Tom Morrison
 
Hi Tom

This is my second experience with SOAP and XML and believe me, the first one was much worse than this and is still ongoing. I will try and answer your questions.

I am not exactly sure what they are doing on their end to be honest. We are passing them member survey data which they then (I assume) put into their database, I am not sure what processes take place before it gets to the DB, can't image why there should be any but who knows! I do know, that they pass back the data in the same format, everything between the <testXML> tags is encoded. All we do, all anyone should have to do, is parse the XML pull out a value and either pass it back (depending on the transaction) or report on the status of the post, in other words submit a value to the DB.

I hope that all makes sense.

I did find a WSDL in the way that you suggested, I hope you don't mind me posting it here as I am both trying to protect my own identity as well as the identity of the client.

Thanks for all of the help and advice, believe it or not I do understand what is going on much better now.

Keith
 
woolly2 said:
the first one was much worse than this and is still ongoing

Well engineered web services can be exceptionally useful and easy to use. Poorly engineered web services, especially those where the implementor has felt the need to overcome some presumed weakness in SOAP, etc., are worse than useless.

Actually, modern development tools, including Visual Studio and some Eclipse plugins, can fetch the WSDL and build a proxy that is so good that the programmer using the IDE never leaves the comfort of the IDE's programming paradigm.

Although I have no direct evidence by which to fix blame, it seems to me that implementations using Axis are too often found to be the 'rotten apple' web services, saving the 'SOAP stack' from confusion.

Oh well...guess I am in a grumpy mood.
grumpy.gif


Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top