请考虑以下事项:
public MyCustomHeader MyHeader;
public New()
{
//MyHeader is NOT instantiated
}
[SoapHeader("MyHeader")]
[WebMethod()]
public bool MyFunction()
{
//MyHeader is instantiated, but when was it instantiated?
}
答案 0 :(得分:0)
对于您的示例,它将在执行MyFunction
方法之前进行实例化。由于Header需要能够执行MyFunction的操作。
答案 1 :(得分:0)
how to convert this part and attach to XML in android?
POST /SharingpointCheckBarcode.asmx HTTP/1.1
Host: awc.test.trin-it.nl
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/checkBarcode"