无法访问网络服务 [英] Unable to access web service

查看:84
本文介绍了无法访问网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法访问网络服务
当我将xml字符串传递给Web服务api时,出现以下错误.即请求服务器返回了一个错误-400错误的请求.我的请求已成功发送,但是当我得到响应时.发生时间错误.我的xml字符串是格式正确的

I am unable to access web service
while I am passsing xml string to a web service api,the following error is coming.i.e request server returned an error-400 bad request.my request is successfully send,but when i m getting response.that time error occur.my xml string is in correct format

推荐答案

检查Web服务文档以查看是否传递了所有正确的参数.

根据您在问题中提供的详细信息,可以推断出所有内容.
Check the web service documentation to see if you are passing all the right parameters.

Based on the details you have provided in your question, that is all that can be inferred.


您是否在Web方法中使用字符串作为参数?
我的意思是这样:
Do you have string as your parameter in your web method ?
I mean like this :
[WebMethod]
public int YourMethod(string str)
{
  //Your code here

  return 1;
}



您可以通过使用iis发布服务来调试项目,然后可以看到参数的值(例如:"str").我认为您的xml中没有您的流程中的一些错误.:)可能是当您要解析xml数据时发生了错误..:)



You can debug your project by publishing your service using iis, and then you can see the value of your parameter (eg: "str"). I think there are some errors in your process not in your xml.. :) May be when you want to parse xml data, the error was occured.. :)


这篇关于无法访问网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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