通过将xml字符串传递给url产生不可预测的响应 [英] unpredictable response by passing xml string to a url

查看:51
本文介绍了通过将xml字符串传递给url产生不可预测的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过将xml字符串传递给url,我得到了无法预测的响应

I am getting unpredictable response by passing xml string to a url

<xml version="1.0" encoding="utf-8"?>
<DataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:nil="true" xmlns="http://tempuri.org/">


这是来自服务API的响应.


this is response from service api. What may be the problem?

推荐答案

在将XML传递给URL之前,您可能缺少XML的编码.
尝试使用UrlEncoding ..

XML中几乎没有字符可以被认为是危险的,并且会与API混为一谈.这可能是您的API无法返回正确响应的原因.检查API收到了什么.
You might be missing encoding of the XML before passing it to URL.
Try UrlEncoding ..

There are few characters in XML that can be considered as dangerous and will mess with API''s. That could be the reason why your API not returning correct response. Check what is received by the API.


这篇关于通过将xml字符串传递给url产生不可预测的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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