Microsoft.Web.Services2中的WebServicesClientProtocol是否会返回null?

时间:2018-07-26 06:03:32

标签: xml web-services soap wse

给我一​​个项目,其中有一个类,该类调用外部WebService:

class Client : WebServicesClientProtocol {

    [SoapDocumentMethod("", ParameterStyle = SoapParameterStyle.Bare, Use = SoapBindingUse.Literal)]
    [return: XmlElement("getOutputMessageResponse", Namespace = "http://www.ibm.com/xmlns/prod/websphere/human-task/services/6.0")]
    public XmlElement getOutputMessage([XmlElement("getOutputMessage", Namespace = "http://www.ibm.com/xmlns/prod/websphere/human-task/services/6.0")] getOutputMessage getOutputMessage1)
    {
      return (XmlElement) this.Invoke("getOutputMessage", new object[1]
         {
            (object) getOutputMessage1
         })[0];
    }
}

稍后在代码中,我发现:

XmlElement output = ... // getOutputMessage() invocation

if(output != null){
    // do something...
}else{
    // do something else
}

invoke()方法是否有可能返回null? 我似乎不是以这种方式工作,但是我在项目中发现了上面的30遍代码。

我找不到有关WSE和提到的库的任何文档。

0 个答案:

没有答案