views:

871

answers:

2

I have a simple .NET app that makes a SOAP call to a third party Axis web service. When I trace the HTTP traffic, I see that the Request looks fine, however I'm getting an exception: "Response is not well-formed XML." The return object is null, as it seems the XML can't be deserialized.

One question regarding the various namespace declarations inside the wsdl. Several of these declarations point to URLs / domains that no longer exist. Could this cause any problems?

From the wsdl document:

<wsdl:definitions targetNamespace="http://domaindoesntexist.com/"  
xmlns:apachesoap="http://xml.apache.org/xml-soap"  
xmlns:impl="http://domaindoesntexist.com/"  
xmlns:intf="http://domaindoesntexist.com/"  
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"  
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"  
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

A sample HTTP response with incriminating data removed:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 05 Jun 2009 13:54:59 GMT

7cb
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soapenv:Body>
<someMethod xmlns="http://test.com/services/myservice/"&gt;
</someMethod>
</soapenv:Body>
</soapenv:Envelope>
0
A: 

Several of these declarations point to URLs / domains that no longer exist. Could this cause any problems?

Sure. Have you tried updating the webservice in your project?

Ian Patrick Hughes
The webservice is maintained by a third party, so I can't update it. They claim that they use the wsdl as-is to generate working Axis clients.From the WSDL doc:<wsdl:definitions targetNamespace="http://domaindoesntexist.com/"xmlns:apachesoap="http://xml.apache.org/xml-soap"xmlns:impl="http://domaindoesntexist.com/"xmlns:intf="http://domaindoesntexist.com"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Tex
Is the webservice public so I could debug it? What kind of project is this? Did you create the webservice reference through Visual Studio or are you trying to cobble this together from scratch?
Ian Patrick Hughes
A: 

It has been my experience that namespace URLs do not have to be actual existing URIs. Consistency is what is desired, so internal XML schemas can be built for validation. The intent was (I believe) to host the namespace definition at that location so that developers could go there and check it out, but then people got lazy.

I may, in fact, be quite wrong on that latter count.

drachenstern