I have a problem.
I import this in to my program:
using Microsoft.Web.Services2;
using Microsoft.Web.Services2.Addressing;
using Microsoft.Web.Services2.Messaging;
I've also added Microsoft.Web.Services2.dll to my project, but I still get an error when I try to compile program ... What is wrong?
I get these errors:
Error 4 The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing开发者_如何学运维 an assembly reference?) Error 6 The type or namespace name 'SoapServiceAttribute' could not be found (are you missing a using directive or an assembly reference?)
more code:
[SoapService("http://www.example.org/test/")]
public class Payment : SoapClient
{
public Payment() : base( new Uri("http://localhost:8080/TestServer/services/testSOAP") )
{
}
[SoapMethod("http://www.example.org/test/paymant")]
public paymantResponse paymant( paymant request )
{
return (paymantResponse)base.SendRequestResponse("paymant", request).GetBodyObject( typeof(paymantResponse), SoapServiceAttribute.TargetNamespace);
}
public IAsyncResult Beginpaymant( paymant request, System.AsyncCallback callback, object asyncState)
{
return base.BeginSendRequestResponse("paymant", request, callback, asyncState);
}
public paymantResponse Endpaymant( System.IAsyncResult asyncResult )
{
return (paymantResponse)base.EndSendRequestResponse(asyncResult).GetBodyObject( typeof(paymantResponse), SoapServiceAttribute.TargetNamespace);
}
Everything connected with SoapService, SoapClient, SoapService attribute ... can*t get namespace or should I say reference ... }
精彩评论