2012-03-30 21 views
0

の名前空間がありません。WindowsサービスでWCF Webサービスをホストしています。私たちはbasicHttpBindingを使用しています。 Soap 1.1 Webサービスとの下位互換性を維持する必要があります。私たちの問題は、Webメソッドのパラメータの要素EPTalkMessageの名前空間がありません。私は多くを検索しましたが、この要素に名前空間を追加する方法はありませんでした。古いWebサービスからWcf下位互換性の問題 - メソッドパラメータ

石鹸は、次のとおりです。

[ServiceContract (Namespace = "http://aaa.sk/EPTalk")] 
[XmlSerializerFormat(Use = OperationFormatUse.Literal, Style = OperationFormatStyle.Document)] 
public interface IRegistryInputWebService 
{ 
    [OperationContract(Action = "http://aaa.sk/EPTalk/IssueDocument")] 
    RegistryServiceResult IssueDocument([MessageParameter(Name = "EPTalkMessage")] 
     UpvsPortalEmulator.ToSignInput.EPTalkMessage message); 
} 

バインディング::次のように

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> 
    <s:Header> 
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://aaa.sk/EPTalk/IssueDocument</Action> 
    </s:Header> 
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <IssueDocument xmlns="http://aaa.sk/EPTalk"> 
     <EPTalkMessage /> 
    </IssueDocument > 
    </s:Body> 
</s:Envelope> 

サービスシグネチャは次のとおりです。

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> 
<s:Header> 
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://aaa.sk/EPTalk/IssueDocument</Action> 
</s:Header> 
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<IssueDocument xmlns="http://aaa.sk/EPTalk"> 
    <EPTalkMessage xmlns="http://aaa.sk/EPTalk/ToSignInput" /> 
</IssueDocument> 
</s:Body> 
</s:Envelope> 

新石鹸が生成さ

BasicHttpBinding 
{     
MaxReceivedMessageSize = 1024 * 1024 * 10, 
MaxBufferSize = 1024 * 1024 * 10, 
ReaderQuotas = 
       { 
       MaxArrayLength = 1024 * 1024 * 10, 
       MaxStringContentLength = 1024 * 1024 * 10 
       }, 
MessageEncoding = WSMessageEncoding.Text, 
Security = new BasicHttpSecurity 
       { 
       Mode = BasicHttpSecurityMode.None 
       } 
}; 

編集:EPTalkMessage定義が追加されました。

[XmlType, XmlRoot (ElementName = "EPTalkMessage", Namespace = Declarations.SchemaVersion, IsNullable = false), Serializable] 
    public class EPTalkMessage 
{ 
} 

おかげでしばらくの間、検索した後、あなたの助け

答えて

0

ための多くは、私がMessageContractsでこの問題を解決しました。