soap

WCF技术剖析之十七:消息(Message)详解(上篇)

本秂侑毒 提交于 2019-12-18 22:51:59
[爱心链接: 拯救一个25岁身患急性白血病的女孩[内有苏州电视台经济频道《天天山海经》为此录制的节目视频(苏州话)] ]消息交换是WCF进行通信的唯一手段,通过方法调用(Method Call)形式体现的服务访问需要转化成具体的消息,并通过相应的编码(Encoding)才能通过传输通道发送到服务端;服务操作执行的结果也只能以消息的形式才能被正常地返回到客户端。所以,消息在整个WCF体系结构中处于一个核心的地位,WCF可以看成是一个消息处理的管道。 尽管消息在整个WCF体系中具有如此重要的意义,可是一般的WCF编程人员,却意识不到消息的存在。原因很简单,WCF设计的目标就是实现消息通信的所有细节,为最终的编程人员提供一个完全面向对象的编程模型。所以对于一般的编程人员来说,他们面对的是接口,却不知道服务契约对于服务的描述;面对的是数据类型,却不知道数据契约对序列化的作用;面对的是方法调用和返回值的获取,却不了解底层消息交换的过程。 鼓励大家深入了解 WCF 关于消息处理的流程具有两个目的:第一,只有在对整个消息处理流程具有清晰认识的基础上才能写出高质量的 WCF 程序。第二, WCF 是一个极具可扩展性的通信框架,可以灵活地创建一些自定义 WCF 扩展( WCF Extension )以实现你所需要的功能。如同 WCF 的插件一样,这些自定义的 WCF 扩展以即插即用的方式参与到

Kerberos error: GSSHeader did not find the right tag

喜你入骨 提交于 2019-12-18 20:11:28
问题 I’m trying to make Kerberos authentication connection to a SOAP service wsdl url. I’m able to establish connection successfully and make service calls. After I start my server, I’m able to make successful service call at least once. However after few requests (1 or more ), I suddenly get invalid token error. Once I get the error, future calls do not work and error persists. IF I restart my server, then again service call works at least once. And above cycle continues. I’m unable to figure out

Kerberos error: GSSHeader did not find the right tag

ⅰ亾dé卋堺 提交于 2019-12-18 20:11:27
问题 I’m trying to make Kerberos authentication connection to a SOAP service wsdl url. I’m able to establish connection successfully and make service calls. After I start my server, I’m able to make successful service call at least once. However after few requests (1 or more ), I suddenly get invalid token error. Once I get the error, future calls do not work and error persists. IF I restart my server, then again service call works at least once. And above cycle continues. I’m unable to figure out

WCF to build SOAP based service

蹲街弑〆低调 提交于 2019-12-18 18:58:09
问题 I am trying to find some good tutorials that would show me to create a simple SOAP based service using WCF and deploy it. I have been googling for the past 2 hour and can't seem to find any good resource.. Can anyone help me? 回答1: As for resources: there's the MSDN WCF Developer Center which has everything from beginner's tutorials to articles and sample code. Also, check out the screen cast library up on MSDN for some really useful, 10-15 minute chunks of information on just about any topic

How to get payload object from SOAP Logical Handler

喜你入骨 提交于 2019-12-18 18:09:15
问题 I am learning how to create Logical Handlers in JAX-WS SOAP web services. Here I am trying to get the payload data and want to print that for testing. But I am getting issues. Here is my LogincalHandler code public class HelloMessengerLogicalHandler implements LogicalHandler<LogicalMessageContext> { public void close(MessageContext ctx) { } public boolean handleFault(LogicalMessageContext ctx) { return false; } public boolean handleMessage(LogicalMessageContext ctx) { Boolean outbound =

SOAP message with javax.xml.soap - namespace error?

a 夏天 提交于 2019-12-18 17:28:03
问题 The following is a generic sample SOAP request for .NET web service I'm supposed to invoke from my java web app: <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <setAMRequestData xmlns="http://tempuri.org/"> <id>int</id> </setAMRequestData> </soap:Body> </soap:Envelope> I am able to generate something similar from java console application using this code

SOAP-ERROR: Encoding: string … is not a valid utf-8 string

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 16:52:32
问题 Hi I have a web service built using the Zend Framework. One of the methods is intended to send details about an order. I ran into some encoding issue. One of the values being returned contains the following: Jaime Torres Bodet #322-A Col. Lomas de Santa María The webservice is returning the following fault: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>SOAP-ERROR: Encoding:

WCF,Net remoting,Web service

六眼飞鱼酱① 提交于 2019-12-18 16:07:54
今天看到WCF,说是整合了Net remoting,Web service。。。下面列一下概念。 一 WCF 概括地说,WCF具有如下的优势: 1、统一性 前面已经叙述,WCF是对于ASMX,.Net Remoting,Enterprise Service,WSE,MSMQ等技术的整合。由于WCF完全是由托管代码编写,因此开发WCF的应用程序与开发其它的.Net应用程序没有太大的区别,我们仍然可以像创建面向对象的应用程序那样,利用WCF来创建面向服务的应用程序。 2、互操作性 由于WCF最基本的通信机制是SOAP,这就保证了系统之间的互操作性,即使是运行不同的上下文中。这种通信可以是基于.Net到.Net间的通信。 可以跨进程、跨机器甚至于跨平台的通信,只要支持标准的Web Service,例如J2EE应用服务器(如WebSphere,WebLogic)。应用程序可以运行在Windows操作系统下,也可以运行在其他的操作系统,如Sun Solaris,HP Unix,Linux等等。 3、安全与可信赖 WS-Security,WS-Trust和WS-SecureConversation均被添加到SOAP消息中,以用于用户认证,数据完整性验证,数据隐私等多种安全因素。 在SOAP的header中增加了WS-ReliableMessaging允许可信赖的端对端通信。而建立在WS

WCF,Net remoting,Web service

纵然是瞬间 提交于 2019-12-18 14:18:18
一 WCF 概括地说,WCF具有如下的优势: 1、统一性 前面已经叙述,WCF是对于ASMX,.Net Remoting,Enterprise Service,WSE,MSMQ等技术的整合。由于WCF完全是由托管代码编写,因此开发WCF的应用程序与开发其它的.Net应用程序没有太大的区别,我们仍然可以像创建面向对象的应用程序那样,利用WCF来创建面向服务的应用程序。 2、互操作性 由于WCF最基本的通信机制是SOAP,这就保证了系统之间的互操作性,即使是运行不同的上下文中。这种通信可以是基于.Net到.Net间的通信。 可以跨进程、跨机器甚至于跨平台的通信,只要支持标准的Web Service,例如J2EE应用服务器(如WebSphere,WebLogic)。应用程序可以运行在Windows操作系统下,也可以运行在其他的操作系统,如Sun Solaris,HP Unix,Linux等等。 3、安全与可信赖 WS-Security,WS-Trust和WS-SecureConversation均被添加到SOAP消息中,以用于用户认证,数据完整性验证,数据隐私等多种安全因素。 在SOAP的header中增加了WS-ReliableMessaging允许可信赖的端对端通信。而建立在WS-Coordination和WS-AtomicTransaction之上的基于SOAP格式交换的信息

What is the best way to download all of the WSDL files exposed by a WCF service?

╄→гoц情女王★ 提交于 2019-12-18 14:16:36
问题 What is the best way to download all of the WSDL files exposed by a WCF service? For example, the root WSDL file references the following other WSDL files: <xsd:import schemaLocation="http://localhost:80/?xsd=xsd0" namespace="http://tempuri.com"/> <xsd:import schemaLocation="http://localhost:80/?xsd=xsd1" namespace="http://tempuri.com"/> Ideally it would be possible to automate the download so that every time the WSDL changes it would be easy to distribute the files to a customer or