[サービス参照の追加] を介して追加されたサービスを機能させるのに苦労しています。問題なくサービスを呼び出すことができ、応答が返されます (Fiddler で確認できます)。
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<executeResponse>
<request_number>REQ0048172</request_number>
</executeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ただし、そこには nullexecuteResponse
があります。Reference.cs の関連部分を以下に示します。
インターフェース:
[System.ServiceModel.ServiceContractAttribute(Namespace="http://www.serviceprovider.com/service")]
public interface Soap {
// CODEGEN: Generating message contract since the operation execute is neither RPC nor document wrapped.
[System.ServiceModel.OperationContractAttribute(Action="http://www.serviceprovider.com/service/execute", ReplyAction="*")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
executeResponse1 execute(executeRequest request);
}
クライアント:
public partial class SoapClient : System.ServiceModel.ClientBase<Soap>, Soap {
executeResponse1 Soap.execute(executeRequest request) {
return base.Channel.execute(request);
}
public executeResponse execute(execute execute1) {
executeRequest inValue = new executeRequest();
inValue.execute = execute1;
executeResponse1 retVal = ((Soap)(this)).execute(inValue);
return retVal.executeResponse;
}
}
executeResponse1:
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class executeResponse1 {
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://www.serviceprovider.com/service", Order=0)]
public executeResponse executeResponse;
}
実行応答:
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.serviceprovider.com/service")]
public partial class executeResponse : object, System.ComponentModel.INotifyPropertyChanged {
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
public string request_number { get; set; }
}
SOAP 応答からこの問題の修正に戻る方法がわかりません。任意の提案をいただければ幸いです。