嗨,我可以添加一個屬性到我的asp.net Web服務頭?ASP.NET WEB服務:添加自定義屬性C#
我需要包含如下內容:xmlns:trac =「http:// whatever」。
這是我的代碼:
namespace com.chronopost.notification.push.trace.webservice
{
[WebService(Namespace = "http://webservice.trace.push.notification.chronopost.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class TracePushWSService : System.Web.Services.WebService
{
[WebMethod]
public string TraceMessageFeedback(DtTrackTraceParamUserCredential mtTrackTraceParamUserCredential, string mtTrackTraceTestFeedBack)
{
return "DTM00: TracePush Feedback: " + mtTrackTraceTestFeedBack;
}
[WebMethod]
public DtTrackTraceAnswer NewTraceMessage(DtTrackTraceParamUserCredential mtTrackTraceParamUserCredential, DtTrackTraceParam mtTrackTraceReq)
{
DtTrackTraceAnswer iDtTrackTraceResp = new DtTrackTraceAnswer("DTM00: TracePush OBJ - OK");
return iDtTrackTraceResp;
}
[WebMethod]
public DtTrackTraceAnswerXML NewTraceMessageXML(DtTrackTraceParamUserCredential mtTrackTraceParamUserCredential, DtTrackTraceParamXML mtTrackTraceReqXML)
{
DtTrackTraceAnswerXML iDtTrackTraceResp = new DtTrackTraceAnswerXML("DTM00: TracePush XML - OK");
return iDtTrackTraceResp;
}
}
}