OperationContract屬性中Action和ReplyAction的用法是什麼?WCF代理中的Action和ReplyAction
1
A
回答
5
Action爲您的服務方法的soap操作定義了您的輸入uri。
回覆操作定義了服務方法的輸出uri。
它們基本上用於定製兩者的uri。見下文。
[ServiceContract]
public partial interface IServiceContract
{
[OperationContract(
Action = "http://mynamspace/v1/IServiceContract/Input/ServiceMethod",
ReplyAction = "http://mynamspace/v1/IServiceContract/Output/ServiceMethod")]
SomeResponseType ServiceMethod(SomeRequestType x);
您的WSDL中,你會看到
<wsdl:portType name="IServiceContract">
<wsdl:operation name="ServiceMethod">
<wsdl:input wsaw:Action="http://mynamspace/v1/IServiceContract/Input/ServiceMethod" name="SomeRequestType" message="tns:SomeRequestType " />
<wsdl:output wsaw:Action="http://mynamspace/v1/IServiceContract/Output/ServiceMethod" name="SomeResponseType" message="tns:SomeResponseType " />
這有意義嗎?
1
它用於WS尋址。
介紹的WS-Addressing:http://www.fpml.org/_wgmail/_bpwgmail/pdfdz3oYx1M9e.pdf http://www.w3.org/Submission/ws-addressing/
看回復SOAP消息: http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.action.aspx
相關問題
- 1. WCF OperationContract - Action和ReplyAction的作用是什麼?
- 2. WCF ReplyAction =「*」中斷元數據
- 3. OperationContractAttribute的Action和ReplyAction屬性可以相同嗎?
- 4. WCF代理和userPrincipalName
- 5. WCF CustomBinding和代理
- 6. WCF SOAP Action
- 7. 代理代WCF
- 8. WCF DataContact和代理WCF服務。
- 9. WCF代理類
- 10. WCF異常處理代理
- 11. 不處理WCF代理?
- 12. WCF代理池/管理器
- 13. 緩存WCF代理?
- 14. WCF代理設置
- 15. 關閉WCF代理
- 16. WCF代理創建
- 17. MEF和Wcf客戶端代理
- 18. WCF代理行爲和參數
- 19. 使用TAP和wcf EAP生成代理
- 20. WCF和實體框架代理對象
- 21. 服務代理和WCF互操作
- 22. WCF回調,代理和線程安全
- 23. WCF端口問題和代理創建
- 24. WCF代理中的可選參數
- 25. Action和Func的代碼慣例
- 26. Struts2和Spring 3集成+ AOP未能創建Action代理
- 27. 如何重構PlayFramework Action和Async Action以避免代碼重複?
- 28. 請幫我理解「Ajax in Action」中的這段JavaScript代碼
- 29. WCF Restful Service .NET 4 IIS 7.5問題(無法處理Action'消息)
- 30. WCF附加代理類