概述
Web服务寻址规范
<S:Envelope xmlns:S="[url]http://www.w3.org/2002/12/soap-envelope[/url]" xmlns:wsa="[url]http://schemas.xmlsoap.org/ws/2003/03/addressing[/url]"> <S:Header> <wsa:ReplyTo> <wsa:Address>[url]http://business456.com/client1[/url]</wsa:Address> </wsa:ReplyTo> <wsa:To>[url]http://fabrikam123.com/Purchasing[/url]</wsa:To> <wsa:Action>[url]http://fabrikam123.com/SubmitPO[/url]</wsa:Action> </S:Header> <S:Body> ...... </S:Body> </S:Envelope>
终结点引用
<wsa:EndpointReference> <wsa:Address>xs:anyURI</wsa:Address> <wsa:ReferenceProperties>... </wsa:ReferenceProperties> ? <wsa:ReferenceParameters>... </wsa:ReferenceParameters> ? <wsa:PortType>xs:QName</wsa:PortType> ? <wsa:ServiceName PortName="xs:NCName"?>xs:QName</wsa:ServiceName> ? <wsa:Policies> ... </wsa:Policies>? <xs:any/>* </wsa:EndpointReference>
<wsa:myLocation> <wsa:Address>[url]http://localhost:8887/CalculatorService</[/url]wsa:Address> </wsa:myLocation>
消息信息报头
<wsa:To>xs:anyURI</wsa:To> ? <wsa:From>wsa:EndpointReferenceType</wsa:From> ? <wsa:ReplyTo>wsa:EndpointReferenceType</wsa:ReplyTo> ? <wsa:FaultTo>wsa:EndpointReferenceType</wsa:FaultTo> ? <wsa:Action>xs:anyURI</wsa:Action> <wsa:MessageID>xs:anyURI</wsa:MessageID> ? <wsa:RelatesTo RelationshipType="xs:anyURI"?>xs:anyURI</wsa:RelatesTo> * <wsa:ReferenceParameters>xs:any*</wsa:ReferenceParameters> ?
<wsa:Action>[url]http://tempuri.org/ICalculator/Add[/url]</wsa:Action>
分析WCF消息
/// <summary> /// Author: TerryLee /// Url:[url]http://www.cnblogs.com/terrylee[/url] /// </summary> [ServiceContract] public interface ICalculator { [OperationContract] int Add(int x, int y); } public class CalculatorService : ICalculator { public int Add(int x, int y) { return x + y; } }
<s:Envelope xmlns:s="[url]http://schemas.xmlsoap.org/soap/envelope/[/url]"> <s:Header> <To s:mustUnderstand="1">[url]http://localhost:8887/CalculatorService[/url]</To> <Action s:mustUnderstand="1">[url]http://tempuri.org/ICalculator/Add[/url]</Action> </s:Header> <s:Body> <Add xmlns="[url]http://tempuri.org/[/url]"> <x>1</x> <y>2</y> </Add> </s:Body> </s:Envelope>
结束语
-
C语言学习Part1(1-1000行代码)
记录系统学习C语言的过程
操作符 八进制 #include -
WCF系列-WCF基础(1)
WCF服务化
服务化编程 -
WCF系列之Jquery调用WCF(1)
代码下载Jquery+WCF(AJAX) 关键点 1,添加引用System.ServiceModel.Web 注意(系统要引用System.ServiceModel
wcf jquery function string ajax -
wcf问题集1
wcf问题 1 另一应用程序已使用 HTTP.SYS 注册了该 URL
wcf 服务器 url 客户端 应用程序 -
WCF初探-1:认识WCF
1.WCF是什么? WindowsCommunication Foundation(WC
WCF 客户端 .net 代理类 配置文件
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M