views:

33

answers:

0

Folks, I am running out an issue. I am creating a web service in C# that should be consumed by an existing client (written with ATL). Actually this client used to invoke a ATL based web service before, now I need to change the URL of the client so that it can invoke a different web service which I am about to write with C#.

I found some interesting problem doing so. First of all, I noticed that the existing ATL service's WSDL is an RPC-Style web service. So I also changed my .net service to use RPC using SoapRpcService attribute. Now If I compare two WSDL (the ATL one vs .net one) then I can see some element name mismatches.

Any method that returns an Array, for example

[WebMethod] Person[] GetPersons() {..}

The above method's return type can be found into the WSDL of .net service as follows

  <s:complexType name="ArrayOfPerson">
    <s:complexContent mixed="false">
      <s:restriction base="soapenc:Array">
        <s:attribute wsdl:arrayType="tns:Person[]" ref="soapenc:arrayType" />
      </s:restriction>
    </s:complexContent>
  </s:complexType>

But If I take the WSDL from the ATL web service then this is found as follows

  <s:complexType name="GetPersonsLocations_return_Array">
    <s:complexContent mixed="false">
      <s:restriction base="soapenc:Array">
        <s:attribute wsdl:arrayType="s0:Person[]" ref="soapenc:arrayType" />
      </s:restriction>
    </s:complexContent>
  </s:complexType>

And I am guessing this is the reason the ATL client can't invoke my .net web service (it reports errors when I try so..but doesn't give much details of the error).

So guys can anybody suggest me how to rename this WSDL complex types from my .net Web Service ?? By means of any SoapAttributes or so ...?

Any suggestions should be greatly appreciated. Thanks