SoapHttpClientProtocol登录响应XML [英] SoapHttpClientProtocol log response xml

查看:251
本文介绍了SoapHttpClientProtocol登录响应XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关几天我们有问题,我们的应用程序。我们使用SoapHttpClientProtocol以调用Java的MBean。这基本上使一个Java Web服务调用方法的调用。

For a couple of days we have problem with our app. We use SoapHttpClientProtocol in order to invoke java mbeans. This basically makes a call to a java webservice to invoke methods.

我们的问题是,有时我们得到了以下异常:

Our problem is that sometimes we get the following exception:

有XML文档中的错误(1,172089)。在
System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader中
XmlReader中,字符串encodingStyle的,XmlDeserializationEvents事件)在System.Xml.Serialization.XmlSerializer.Deserialize结果
(的XmlReader
XmlReader中,字符串encodingStyle的)留在
系统
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
消息,WebResponse的响应,流responseStream,布尔
asyncCall)。在
线781:Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串
方法名,对象[]参数)在JMXConnectorService.cs在
DynamicMBeanResourceBinding.Invoke(OperationRequestType
ManagedResourceOperation) JMXWSClient.InvokeMethodOnObject(字符串对象名,字符串methodName中,
参数类型[] paramValue)在connectivity\Client.cs:行132

There is an error in XML document (1, 172089). at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at DynamicMBeanResourceBinding.Invoke(OperationRequestType ManagedResourceOperation) in JMXConnectorService.cs:line 781 at JMXWSClient.InvokeMethodOnObject(String objectName, String methodName, ParameterType[] paramValue) in connectivity\Client.cs:line 132

产生的原因:意外结束发生了文件。下列元素
未关闭:图标

Caused by: Unexpected end of file has occurred. The following elements are not closed: Icon

我们在通信层最后的代码是:

Our last code in the communication layer is:

 /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("soapHeaders", Direction = SoapHeaderDirection.In)]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://jsr262.dev.java.net/DynamicMBeanResource/Invoke", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("ManagedResourceOperationResult", Namespace = "http://jsr262.dev.java.net/jmxconnector")]
public GenericValueType Invoke([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://jsr262.dev.java.net/jmxconnector")] OperationRequestType ManagedResourceOperation)
{
    object[] results = this.Invoke("Invoke", new object[] {ManagedResourceOperation});
    return ((GenericValueType)(results[0]));
}

有日志记录之前是由框架反序列化的响应XML的任何方式?任何帮助或想法非常欢迎。

Is there any way of logging the response xml before is being deserialized by the framework? Any help or idea is very welcomed.

推荐答案

在一个干净的方式做最简单的方法是创建一个SOAP扩展。我发现了一个很好的教程在这里。

The easiest way for doing this in a clean manner is to create a SOAP extension. I found a good tutorial here.

HTTP:// WWW。 codeproject.com/KB/webservices/efficientsoapextension.aspx

这篇关于SoapHttpClientProtocol登录响应XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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