简体   繁体   English

在SOAP Web服务中获取请求和响应XML

[英]Get Request and Response XML in SOAP web service

I'm making a call to a web service. 我正在打电话给网络服务。 The call works as expected in most cases. 在大多数情况下,该呼叫均按预期工作。 However, sometimes it fails and for troubleshooting, there is always a request from the developer to send them the request xml and if possible the response xml. 但是,有时会失败,并且为了进行故障排除,开发人员总是会向他们发送请求xml,如果可能的话,还会发送响应xml。 How do I get this? 我怎么得到这个? I tried using fiddler but I don't know if it is because it is https, I only see some tunnel entries but not the xml sent or received. 我尝试使用提琴手,但我不知道是否是因为它是https,我只看到一些隧道条目,但看不到发送或接收的xml。 Sample of the web service code is below: Web服务代码示例如下:

var serviceUrl = "http://190.0.0.1/ServiceLIVE/Service.asmx";
var svc = new LiveEntryService.LiveSoapClient(new BasicHttpBinding("LiveSoap"),new EndpointAddress(serviceUrl));            
var ret = svc.MakeLiveEntry(0, "001001002", "002002003", 3, "New Site Data", "004", DateTime.UtcNow);

For serious testing of web services download a copy of SOAP UI today. 为了对Web服务进行认真的测试,请立即下载SOAP UI副本。 It is relatively simple to get started with it. 开始使用它相对简单。

You will be able to see and manipulate your requests and responses. 您将能够查看和处理您的请求和响应。 It is really worth using this tool for testing. 确实值得使用此工具进行测试。

Disclaimer: I dont work for SOAP UI. 免责声明:我不为SOAP UI工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM