1

I have developed a web service in ASP.NET using C#. One of its web methods returns a complex type created from an xsd schema file using the xsd command.

Many client devices use this web services without a problem. WindowsMobile, PC. All are .Net applications.

Now one VB6 client needs to use this web service using SOAP Toolkit 3.0 and he has a problem probably due to the for different namespaces in the serialized xml data.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <GetProductionDataMachineryResponse xmlns="http://myFactory.it/">
         <GetProductionDataMachineryResult xmlns="http://tempuri.org/XMLSchemaData.xsd">
            <ResultRequest>Ok or No Data Found </ResultRequest>
            ..... 
         </GetProductionDataMachineryResult>
      </GetProductionDataMachineryResponse>
   </soap:Body>
</soap:Envelope>

If I remove the following annotations in the .cs file

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/XMLSchemaData.xsd")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.org/XMLSchemaData.xsd", IsNullable=false)]

the VB6 client works fine. But the other clients need to update the web reference. There are over 80 other clients so this is not an attractive option.

Is there a way to get this to work with the new client without breaking the old ones?

flup
  • 26,937
  • 7
  • 52
  • 74
  • Perhaps the VB6 app can be extended with a little bit of .Net code, client side, to call your web service? http://msdn.microsoft.com/en-us/library/aa730836%28v=vs.80%29.aspx – flup Feb 13 '13 at 18:00
  • Otherwise, take a look here: http://stackoverflow.com/questions/122607/what-is-the-best-way-to-consume-a-web-service-from-vb6 – flup Feb 13 '13 at 18:12

0 Answers0