Folks, What is the recommended replacement for the SoapClient30 class
(C#)?
The MSDN website states the SoapToolkit SDK 3.0 has been deprecated and
I should be using the support in the .NET framework.
That is fine with me, but I am not able to early bind to the the WSDL
reference at design time. I am trying to do something like the snippet
below:
---------------------------------------------------------------------------
SoapClient30 sc = new SoapClient30();
string translateText=textToTran.Text;
string wsdl=null;
try
{
if(wsUri==null)
throw new Exception("Please Discover the service first");
if((new Regex("(wsdl)$")).IsMatch(wsUri))
//check if it's the real WSDL
wsdl=wsUri;
else
wsdl=wsUri+"?wsdl"; //otherwise append WSDL to the service
sc.MSSoapInit(wsdl, "piglatin", "piglatinSoap","");
//specify the service name and port name
Type type =sc.GetType();
object []args = {translateText}; //specified service accepts
//just one argument (textToTranslate)
Response.Write("Invoking method using MS SOAP SDK ...");
object ox = type.InvokeMember("toPigLatin",
BindingFlags.InvokeMethod,null,sc,args); //Dynamic Invocation No
//Proxy class, no web reference
Response.Write("Translated String "+ox.ToString());
}
catch(Exception sEx){Response.Write("Exception occurred "+
sEx.Message);}}}
-----------------------------------------------------------
If I should not be using the SoapClient30 class, what should I replace
it with?
thanks for any advice,
bob