Hi - we are MSDN Enterprise subscribers, our no-spam address is
mu****@computer share.com
We are currently trying to replace a SoapToolkit web-service with a .NET
WebMethod implementation, but can't seem to get the WSDL to line up properly.
I consulted the migration document:
http://msdn.microsoft.com/library/de...oapwebserv.asp
I then used wsdl.exe to create an abstract class definition for the new
service. The class and first method are as follows:
[System.Web.Serv ices.WebService BindingAttribut e(Name="PAFServ erSoapBinding",
Namespace="http ://tempuri.org/wsdl/")]
public abstract class AbstractPAFServ er : System.Web.Serv ices.WebService {
[System.Web.Serv ices.WebMethodA ttribute()]
[System.Web.Serv ices.Protocols. SoapRpcMethodAt tribute("http://tempuri.org/action/PAFServer.GetAd dressList",
RequestNamespac e="http://tempuri.org/message/",
ResponseNamespa ce="http://tempuri.org/message/")]
[return: System.Xml.Seri alization.SoapE lementAttribute ("Result")]
public abstract string GetAddressList( string PostCode, string
StreetName, string StreetNo, bool ExactMatch, out int nItems);
I then created an implementation which derives from this abstract class. All
is fine so far, but the resulting asmx?WSDL does not match the original WSDL.
For instance, the message names:
-------- OLD SOAP TOOLKIT WSDL -------------
- <message name="PAFServer .GetAddressList ">
<part name="PostCode" type="xsd:strin g" />
<part name="StreetNam e" type="xsd:strin g" />
<part name="StreetNo" type="xsd:strin g" />
<part name="ExactMatc h" type="xsd:boole an" />
</message>
- <message name="PAFServer .GetAddressList Response">
<part name="Result" type="xsd:strin g" />
<part name="nItems" type="xsd:int" />
</message>
---------- NEW ASMX?WSDL --------------
- <message name="GetAddres sListSoapIn">
<part name="PostCode" type="s:string" />
<part name="StreetNam e" type="s:string" />
<part name="StreetNo" type="s:string" />
<part name="ExactMatc h" type="s:boolean " />
</message>
- <message name="GetAddres sListSoapOut">
<part name="Result" type="s:string" />
<part name="nItems" type="s:int" />
</message>
Now, I read some articles on overriding these message names, for instance:
http://msdn.microsoft.com/library/de...insidewsdl.asp
which describes the use of various attributes to modify the resulting WSDL.
Nothing seems to be able to stop .NET appending "SoapIn" and "SoapOut" to the
message names.
Is there a way of getting the new WSDL to match the old WSDL, or are we
going to have to give up and distribute new client side proxies that match
the .NET asmx WSDL?