自定义SOAP正文的问题 [英] Problem customizing SOAP body

查看:116
本文介绍了自定义SOAP正文的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是使用从.NET 4.0中用java编写的Web服务。 我已经基于wsdl和schema文件创建了一个代理类。 当我查看传出的SOAP信封时,我发现发送的内容与预期的不同。 
我包括我的.NET 4.0接口,它产生错误的SOAP,错误的SOAP本身和预期的SOAP。

My task is to consume a web service written in java from .NET 4.0.  I have created a proxy class based on the wsdl and schema files.  When I review the outgoing SOAP envelope I see that what is being sent is different from what is expected.  I am including my .NET 4.0 interface that is producing the wrong SOAP, the wrong SOAP itself and the SOAP that is expected.

这是接口。生成错误肥皂的NET


<ServiceContract(), XmlSerializerFormat(Style:=ServiceModel.OperationFormatStyle.Document, Use:=ServiceModel.OperationFormatUse.Literal)> _
Public Interface IPortType
    <OperationContractAttribute(), _
    SoapDocumentMethod("http://www.ClientsDomain.com/getApplicant", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Bare)> _
    Function getApplicant(<XmlElement([Namespace]:="http://www.ClientsDomain.com/request", isnullable:=True)> ByVal request As getApplicantRequest) As getApplicantResponse
End Interface

推荐答案

我最后通过使用IClientMessageInspector来解决这个问题。 我稍后会添加我的代码以及对该网站的引用。

I ended up resolving this by using IClientMessageInspector.  I will add my code along with a reference to the site later.

谢谢。


这篇关于自定义SOAP正文的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆