SOAP Services and XML  
Author Message
mrche





PostPosted: ASMX Web Services and XML Serialization, SOAP Services and XML Top

I am a php developer and am very new to .net, and need help with consuming a php SOAP service (which uses nusoap) from a .Net client.

The xml that gets returned is well formed and validated. This xml opens up in IE and Firefox with no problems and validates perfectly in W3C validator. Therefore there is no problem with the XML returned from the service.

But when I attempt to consume ths service from a vb.net or c#.net client, the xml returned gives the following errors:

-InvalidOperationException was unhandled
-Response is not well-formed XML.

And the result in the output window is as follows:

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=" http://www.hide-link.com/ ; xmlns:SOAP-ENV=" http://www.hide-link.com/ ; xmlns:xsd=" http://www.hide-link.com/ ; xmlns:xsi=" http://www.hide-link.com/ ; xmlns:SOAP-ENC=" http://www.hide-link.com/ ; xmlns:tns="urn:brands_server"><SOAP-ENV:Body><ns1:get_brandsResponse xmlns:ns1="urn:brands_server"><return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:brands_parsout[14]"><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">9</id><title xsi:type="xsd:string">Addidas</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">7</id><title xsi:type="xsd:string">Armani</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">6</id><title xsi:type="xsd:string">D&amp;G</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">16</id><title xsi:type="xsd:string">Diamond Back</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">3</id><title xsi:type="xsd:string">Kawasaki</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">1</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">10</id><title xsi:type="xsd:string">Kodak</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">5</id><title xsi:type="xsd:string">Levi</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">8</id><title xsi:type="xsd:string">Nike</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">13</id><title xsi:type="xsd:string">Nintendo</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">4</id><title xsi:type="xsd:string">Nissan</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">11</id><title xsi:type="xsd:string">Pentax</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">15</id><title xsi:type="xsd:string">Raleigh</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">14</id><title xsi:type="xsd:string">Sony</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item><item xsi:type="tns:brands_parsout"><id xsi:type="xsd:string">12</id><title xsi:type="xsd:string">Toshiba</title><description xsi:nil="true" xsi:type="xsd:string" /><active xsi:type="xsd:string">yes</active><list_order xsi:type="xsd:string">0</list_order></item></return></ns1:get_brandsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

A first chance exception of type 'System.InvalidOperationException' occurred in System.Web.Services.dll

Can anyone shed any light as to what these errors are and why they are being produced. The xml is fine, therefore .Net must have issues with the schema data that nusoap automatically puts in.



.NET Development3