C# 调用 Webservice,报错404 [问题点数:100分,结帖人unearth]

Bbs3
本版专家分:954
Blank
蓝花 2013年12月 Delphi大版内专家分月排行榜第三
结帖率 100%
Bbs13
本版专家分:537957
版主
Blank
名人 年度总版至少三次排名前十即授予名人勋章
Blank
榜眼 2012年 总版技术专家分年内排行榜第一
2007年 总版技术专家分年内排行榜第二
2006年 总版技术专家分年内排行榜第二
2004年 总版技术专家分年内排行榜第二
Blank
探花 2005年 总版技术专家分年内排行榜第三
2003年 总版技术专家分年内排行榜第三
2002年 总版技术专家分年内排行榜第三
Blank
进士 2011年 总版技术专家分年内排行榜第六
2010年 总版技术专家分年内排行榜第八
Bbs5
本版专家分:3227
Bbs3
本版专家分:954
Blank
蓝花 2013年12月 Delphi大版内专家分月排行榜第三
Bbs12
本版专家分:468662
Blank
进士 2018年总版新获得的技术专家分排名前十
2017年 总版技术专家分年内排行榜第十
2013年 总版技术专家分年内排行榜第八
Blank
铜牌 2018年12月 总版技术专家分月排行榜第三
2018年11月 总版技术专家分月排行榜第三
2017年2月 总版技术专家分月排行榜第三
Blank
红花 2019年1月 .NET技术大版内专家分月排行榜第一
2018年12月 .NET技术大版内专家分月排行榜第一
2018年11月 .NET技术大版内专家分月排行榜第一
2018年10月 .NET技术大版内专家分月排行榜第一
2018年9月 .NET技术大版内专家分月排行榜第一
2018年7月 .NET技术大版内专家分月排行榜第一
2018年6月 .NET技术大版内专家分月排行榜第一
2018年1月 .NET技术大版内专家分月排行榜第一
2017年5月 .NET技术大版内专家分月排行榜第一
2017年4月 .NET技术大版内专家分月排行榜第一
2017年3月 .NET技术大版内专家分月排行榜第一
2017年2月 .NET技术大版内专家分月排行榜第一
2016年10月 .NET技术大版内专家分月排行榜第一
2016年8月 .NET技术大版内专家分月排行榜第一
2016年7月 .NET技术大版内专家分月排行榜第一
Blank
黄花 2019年4月 .NET技术大版内专家分月排行榜第二
2019年3月 .NET技术大版内专家分月排行榜第二
2018年8月 .NET技术大版内专家分月排行榜第二
2018年4月 .NET技术大版内专家分月排行榜第二
2018年3月 .NET技术大版内专家分月排行榜第二
2017年12月 .NET技术大版内专家分月排行榜第二
2017年9月 .NET技术大版内专家分月排行榜第二
2017年7月 .NET技术大版内专家分月排行榜第二
2017年6月 .NET技术大版内专家分月排行榜第二
2016年12月 .NET技术大版内专家分月排行榜第二
2016年9月 .NET技术大版内专家分月排行榜第二
2016年6月 .NET技术大版内专家分月排行榜第二
2016年3月 .NET技术大版内专家分月排行榜第二
2016年1月 .NET技术大版内专家分月排行榜第二
2015年12月 .NET技术大版内专家分月排行榜第二
2015年2月 .NET技术大版内专家分月排行榜第二
2015年1月 .NET技术大版内专家分月排行榜第二
2014年11月 .NET技术大版内专家分月排行榜第二
2014年5月 .NET技术大版内专家分月排行榜第二
2014年4月 .NET技术大版内专家分月排行榜第二
2012年2月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第二
Bbs3
本版专家分:886
Bbs2
本版专家分:128
Bbs7
本版专家分:20710
Bbs2
本版专家分:332
cxf调用webservice报错
写了个简单的测试<em>调用</em>网上的<em>webservice</em>[code=java]JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean(); rn factoryBean.setAddress("http://<em>webservice</em>.webxml.com.cn/WebServices/WeatherWS");rn Object obj = factoryBean.create(); rn WeatherWebService hw = (WeatherWebService) obj; rn String[] str = hw.getWeatherbyCityName("福州");rn System.out.println(str);[/code]rn<em>报错</em>信息[code=java]Exception in thread "main" java.lang.NullPointerExceptionrn at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.getWSInterfaceName(JaxWsImplementorInfo.java:231)rn at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.initialize(JaxWsImplementorInfo.java:270)rn at org.apache.cxf.jaxws.support.JaxWsImplementorInfo.(JaxWsImplementorInfo.java:57)rn at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.setServiceClass(JaxWsServiceFactoryBean.java:174)rn at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializeServiceFactory(AbstractWSDLBasedEndpointFactory.java:227)rn at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)rn at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)rn at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)rn at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)rn at com.hwtt.wlw.web.controller.user.UserMoveController.main(UserMoveController.java:320)rn[/code]rn是不是少什么包,还是测试代码有错
C#引用服务器WebService,传入正确的参数,报404错误
用VS2013,新建一个项目,引用WebService 引用成功后传参数,新建接口对象 运行的时候就报<em>404</em>的错误。 本机和服务器属于同一个局域网,服务器的接口还是用TIPTOP开发的,第一次对接这样
WebAPI返回404
ApiController开放的接口(方法)记得public,否则一直<em>404</em>
调用web api 返回404
不知道能否看明白
WCF 在VS中,添加服务引用,地址输入http://ip/Service.svc,点击前往,提示错误
WCF 在VS中,添加服务引用,地址输入http://ip/Service.svc,点击前往,提示错误
关于C#获取html代码出现404错误的解决方法
一般使用C#读取html代码信息时,使用WebClient client = new WebClient(); Stream strm = client.OpenRead(textBoxWebSite.Text); StreamReader rd = new StreamReader(strm); 但是有些网站可能有防抓取机制,这样就会返回<em>404</em>错误。 看了许多方法,最终只要给request添
调用webservice报错
由于分不多,请知道的朋友帮忙了 谢谢rnrn[code=C#]rn由于目标机器积极拒绝,无法连接。 127.0.0.1:2950 rn说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Net.Sockets.SocketException: 由于目标机器积极拒绝,无法连接。 127.0.0.1:2950rnrn源错误: rnrn执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrnrn[SocketException (0x274d): 由于目标机器积极拒绝,无法连接。 127.0.0.1:2950]rn System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +225rn System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +279rnrn[WebException: 无法连接到远程服务器]rn System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +6022813rn System.Net.HttpWebRequest.GetRequestStream() +13rn System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +110rn DictControl.DictControl.GetOrganizeCategory() +31rn Standard_Search2.DictInit() +91rn Standard_Search2.Page_Load(Object sender, EventArgs e) +61rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35rn System.Web.UI.Control.OnLoad(EventArgs e) +91rn System.Web.UI.Control.LoadRecursive() +74rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.1 rnrn[/code]
axis1调用webservice报错
Unexpected wrapper element execute found. Expected http://was.application/execute.rnrnrn代码如下:rn[code=Java]rnrnrnimport java.io.ByteArrayInputStream;rnimport java.io.ByteArrayOutputStream;rnimport java.io.IOException;rnimport java.rmi.RemoteException;rnimport java.util.zip.GZIPOutputStream;rnrnimport javax.xml.rpc.ServiceException;rnrnimport org.apache.axis.client.Call;rnimport org.apache.axis.client.Service;rnrnpublic class Test rn rn /**rn * 数据GZIP 压缩rn * rn * @param strrn * @returnrn * @throws IOExceptionrn */rn public static String compress(String s) throws IOException rn ByteArrayInputStream input = new ByteArrayInputStream(srn .getBytes("UTF-8"));rn ByteArrayOutputStream output = new ByteArrayOutputStream(1024);rn GZIPOutputStream gzout = new GZIPOutputStream(output);rn byte[] buf = new byte[1024];rn int number;rn while ((number = input.read(buf)) != -1) rn gzout.write(buf, 0, number);rn rn gzout.close();rn input.close();rn String result = new sun.misc.BASE64Encoder().encode(output.toByteArray());rn output.close();rn return result;rn rn public static void main(String[] args) throws ServiceException, RemoteException, IOException rn Service service = new Service();rn String receive_result = "";rn Call call = null;rn String object_key = "W2011112218376";rn String amount = "10.0";rn String json = "orderId:'"+object_key+"',amount:'"+amount+"'";rn call = (Call) service.createCall();rn call.setTargetEndpointAddress("http://115.236.180.114:701/services/wholesaleCheckBalanceWAS?wsdl=IWholesaleCheckBalanceWAS.wsdl");rn call.setOperationName("execute"); rn receive_result = (String)call.invoke(new Object[]"U001",compress(json),"125539"); rn System.out.println(receive_result);rnrn rnrnrnrn[/code]
客户端调用webservice报错
错误原因:java.net.SocketException: SOCKS : authentication failedrn备注在开发环境没有这个问题,部署到服务器上才有这个问题,错误原因是鉴权失败不知是否是服务器上有何设置屏蔽了该<em>调用</em>,服务器是linux环境,可以ping通目标机器的IP及端口;rn希望有碰到类似情况并解决的朋友支持一下,十分感激
pb调用webservice 报错
警告: Interceptor for http://bg.cxf.sts.hnkywl.com/HelloWorldImplService#http://bg.cxf.sts.hnkywl.com/helloworld has thrown exception, unwinding nowrnorg.apache.cxf.interceptor.Fault: The given SOAPAction http://bg.cxf.sts.hnkywl.com/#helloworld does not match an operation.rnrnrnbg.cxf.sts.hnkywl.com 类的包路径rn
WEBSERVICE调用报错
一个WBESERVICE在IIS服务器上测试正常,但是在其他机器<em>调用</em>出现rn您试图从目录中执行 CGI、ISAPI 或其他可执行程序,但该目录不允许执行程序。 rn--------------------------------------------------------------------------------rnrn请尝试以下操作:rnrn如果您认为该目录应该允许执行访问权限,请与网站管理员联系。 rnHTTP 错误 403.1 - 禁止访问:执行访问被拒绝。rnrn望高手指点配置哪儿有问题,WEBSERICE已经设置为"纯脚本"
NET MVC区域路由404等解决方案
第一遍检查发现路由重命名
asp.net 部署到IIS 常见问题解决方案(404
今天捣鼓umbraco,在本地都弄好了,结果放到服务器里面却出现了异常。网站找了好多资料,最终还是把问题解决了。下面把解决方案说下,具体的问题就不一一罗列了;1、没有安装对应的.net framework 框架 解决方案: .net 3.5以下的框架要通过【打开或关闭windows功能】这个地方来安装。 4.0以上的框架要通过微软官方网站下载后来安装。2、IIS没有注册成功 解决方案:
ASP.NET网站如何设置404错误页面
<em>404</em>页面的作用 搜索引擎通过HTTP状态码来识别网页的状态。当搜索引擎获得了一个错误链接时,网站应该返回<em>404</em>状态码,告诉搜索引擎放弃对该链接的索引。而如果返回200或302状态码,搜索引擎就会为该链接建立索引,这导致大量不同的链接指向了相同的网页内容。结果是,搜索引擎对该网站的信任度大幅降低。   如何检查自定义<em>404</em>页面能够返回“<em>404</em>”状态码 在自定义<em>404</em>错误页面设置完毕后,一定
C#,httpwebrequest,页面404错误
高手们,我这里有一小段程序,测试时就说JavaScript 运行时错误: “$”未定义, 返回<em>404</em>页面错误,但可以看到用户已经登陆,不知道问题出现在哪里,高手们帮测试一下 地址可以换开心网什么的,
请问怎样让ASP.NET抛出404错误?
我在ASP.NET MVC管道里作了一些复杂的判断,想在判断失败时抛出<em>404</em>错误 requestContext.HttpContext.Response.StatusCode = <em>404</em> 这样好像不行
Ajax跨域调用webService报错
webService是放在服务器A上的,而<em>调用</em>webService的ajax代码是放在服务器B上的。rn按照在网上查的在web.config中做了配置rn[code=text]rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn[/code]rn然而只有当html直接访问才能成功,一旦把html部署之后再访问就显示没有权限。错误如下图所示:rn[img=https://img-bbs.csdn.net/upload/201707/07/1499408203_15824.png][/img]rn对这两种方式的request headers做了对比,发现他们之间的区别在于部署之后的request里多了一个referer属性rn[img=https://img-bbs.csdn.net/upload/201707/07/1499408567_905045.png][/img]rn不知道现在有什么好的办法可以解决。rnajax<em>调用</em>代码如下:rn[code=javascript][/rn$.ajax(rn url: 'https://XXX.com/xxx.asmx/GetMerchant',rn type: 'POST',rn data: "'merchantName':'XXX'",rn dataType: 'JSON',rn contentType: "application/json",rn success: function (res) rn console.log(res);rn ,rn error: function (data) rn console.log(data);rn rn );rncode]
调用webservice报错====
rnjava.lang.NoSuchMethodException: com.tydic.smpin.intf.imp.BillDataSvrImp.BillInfo([Lcom.tydic.smpin.intf.vo.BillReqVo;, null)rn at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)rn at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)rn at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2939)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)rn at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)rn at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)rn at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)rn at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)rn at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)rn at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)rn at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)rn at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)rn at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)rn at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)rn at org.apache.axis.client.Call.invokeEngine(Call.java:2784)rn at org.apache.axis.client.Call.invoke(Call.java:2767)rn at org.apache.axis.client.Call.invoke(Call.java:2443)rn at org.apache.axis.client.Call.invoke(Call.java:2366)rn at org.apache.axis.client.Call.invoke(Call.java:1812)rn at com..SmsForRuleBMOImpl.call(SmsForRuleBMOImpl.java:123)rn at com.SmsForRuleBMOImpl.callSmsWs(SmsForRuleBMOImpl.java:40)rn
jquery调用webservice报错
js<em>调用</em>WebService:rnrn//WebService所在服务器IP地址rnvar httpUrl = "http://192.168.0.240";rnrn/*jQuery ajax<em>调用</em>WebServicern---------------------------------------------*/rn;function <em>webservice</em>Json(asmxName,methodName,jData) rn $.ajax(rn type: "POST",rn contentType: "application/json; charset=utf-8",rn url: httpUrl + "/"+ asmxName + "/" + methodName,rn data: jData,rn dataType: 'json',rn beforeSend: function () rn // 禁用按钮防止重复提交rn $("#btnSubmit").attr( disabled: "disabled" );rn $("loading").show();rn ,rn success: function (json) rn f_GetLogin(json);rn ,rn complete: function () rn //解除按钮rn $("#btnSubmit").removeAttr("disabled");rn $("loading").hide();rn ,rn error: function (XMLHttpRequest, textStatus, errorThrown) rn WebServiceErroReturn(textStatus);rn //console.info("error: " + data.responseText);rn rnrn );rn rnrn调 用代码:rnfunction f_Login(vUserName,vPassWord)rn rn //获得文档框数据rn var inpUserName = this.document.getElementById(vUserName);rn var inpPassWord = this.document.getElementById(vPassWord);rnrn //传送给 WebServicern var data = '"LG_V_LoginName": "'+inpUserName.value+'"'rn +',"LG_V_PassWord": "' + inpPassWord.value + '"';rn rn <em>webservice</em>Json('WBS_SignInformation.asmx','f_Login',data);rn rn rnrn/*返回处理*/rn;function f_GetLogin(jsonD) rn $.each(jsonD.d, function (key, value) rn if(value.LG_ID > -1 )rn rn //成功rn rn elsern rn //失败rn rn );rnrnrn说明:rnWebService在另一台服务器上(IP:192.168.0.240)rn JS<em>调用</em>代码所在的IIS服务在开发计算机上(IP:192.168.0.141)rnrn问题:rn在本地目录里面直接打开<em>调用</em>的HTML页没有问题,把<em>调用</em>的HTMl文件发布到IIS上<em>调用</em>不行(不执行success里的函数,执行error里的函数)rn请各位大神看看是什么原因,谢谢
webservice调用报错
<em>调用</em><em>webservice</em>时,若<em>报错</em> java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration 则可能是由于更新了class文件后,没有将服务重启,将应用(tom...
调用WEBSERVICE报错!!!!!!!!
基础连接已经关闭: 无法连接到远程服务器。rnrn我<em>调用</em>远程服务器的WEBSERVICErn我的系统<em>报错</em>rn我本机没有设置代理rn所以无法理解!!!
关于HttpWebRequest 遇到404如何处理
HttpWebRequest request = (HttpWebRequest)(WebRequest.Create("http://www.baidu.com")); HttpWebRespon
web service 接口调用 404错误
-
调用远程的webservice报错
我的<em>webservice</em>是在远程服务器上的,在本地引用这个ws后,运行<em>报错</em>:rn[code=C#]Could not find default endpoint element that references contract 'ServiceReference1.UrlServiceNewSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.[/code]是不是要在本地配置下呢?
webservice打包调用报错
错误代码: javax.xml.ws.soap.SOAPFaultException: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream 操作步骤: 用脚本自动生成客户端并打包成jar文件,然后<em>调用</em>该包的类时<em>报错</em>,但服务端没有<em>报错</em>,说明是在通过包连接服务端时出现问题。 错
webservice调用报错:javax.xml.ws.soap.SOAPFaultException
服务端逻辑单独跑是没问题的,启动服务端用wsdl访问也没问题,通过自动生成的客户端代码去访问就出问题了(例如,我在服务端有一个方法“Login58”单独用服务端的main方法去跑是没问题的,可是用<em>webservice</em>的客户端去<em>调用</em>“Login58”就出问题了),求大神详解rn详细<em>报错</em>信息如下rn[code=java]rnException in thread "main" javax.xml.ws.soap.SOAPFaultException: com/google/common/base/Functionrn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)rn at com.sun.proxy.$Proxy27.login58(Unknown Source)rn at com.honestcareer.hunter.util.LoginZPService.Client.Login58(Client.java:147)rn at com.honestcareer.hunter.util.LoginZPService.Client.main(Client.java:202)rnCaused by: org.apache.cxf.binding.soap.SoapFault: com/google/common/base/Functionrn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)rn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)rn at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)rn at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113)rn at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)rn at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)rn at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:845)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1624)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1513)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)rn at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)rn at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)rn at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)rn at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)rn at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)rn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)rn ... 3 morernrn[/code]rn我想过是不是少“com/google/common/base/Function”这个包的问题,可是,在服务端单独跑起来是没问题的,于是我往客户端的项目里边也根据这个链接(http://blog.csdn.net/jlminghui/article/details/41120773)的提示加了包,但也是没任何作用,这,我就有些懵了
CB 调用WebService报错
<em>调用</em>天气WebServicernNew->WebServices->WSDL Importer 导入WSDL定义,生成一个Unit,保存。rnrnWSDL文件路径 "F:\控件\Weather\App_WebReferences\cn\com\webxml\WeatherWebService.wsdl"rnrn<em>调用</em>后报:无法打开"F:\控件\Weather\App_WebReferences\cn\com\webxml\WeatherWebService.wsdl",这是什么问题呀rnrnWeatherWebService.cpprn[code=c]// ************************************************************************ //rn// The types declared in this file were generated from data read from thern// WSDL File described below:rn// WSDL : F:\控件\Weather\App_WebReferences\cn\com\webxml\WeatherWebService.wsdlrn// Encoding : utf-8rn// Version : 1.0rn// (2016-12-09 15:24:01 - $Revision: 1.0.1.0.1.82 $)rn// ************************************************************************ //rnrn#include rn#pragma hdrstoprnrn#if !defined(WeatherWebServiceH)rn#include "WeatherWebService.h"rn#endifrnrnrnrnnamespace NS_WeatherWebService rnrn_di_WeatherWebServiceSoap GetWeatherWebServiceSoap(bool useWSDL, AnsiString addr)rnrn static const char* defWSDL= "F:\控件\Weather\App_WebReferences\cn\com\webxml\WeatherWebService.wsdl";rn static const char* defURL = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx";rn static const char* defSvc = "WeatherWebService";rn static const char* defPrt = "WeatherWebServiceSoap";rn if (addr=="")rn addr = useWSDL ? defWSDL : defURL;rn THTTPRIO* rio = new THTTPRIO(0);rn if (useWSDL) rn rio->WSDLLocation = addr;rn rio->Service = defSvc;rn rio->Port = defPrt;rn else rn rio->URL = addr;rn rn _di_WeatherWebServiceSoap service;rn rio->QueryInterface(service);rn if (!service)rn delete rio;rn return service;rnrnrnrn// ************************************************************************ //rn// This routine registers the interfaces and types used by invoke the SOAPrn// Service.rn// ************************************************************************ //rnstatic void RegTypes()rnrn /* WeatherWebServiceSoap */rn InvRegistry()->RegisterInterface(__interfaceTypeinfo(WeatherWebServiceSoap), L"http://WebXml.com.cn/", L"utf-8");rn InvRegistry()->RegisterDefaultSOAPAction(__interfaceTypeinfo(WeatherWebServiceSoap), L"http://WebXml.com.cn/%operationName%");rn RemClassRegistry()->RegisterXSInfo(__arrayTypeinfo(ArrayOfString), L"http://WebXml.com.cn/", L"ArrayOfString");rn /* getSupportDataSetResult */rn RemClassRegistry()->RegisterXSClass(__classid(getSupportDataSetResult), L"http://WebXml.com.cn/", L"getSupportDataSetResult");rn InvRegistry()->RegisterInvokeOptions(__interfaceTypeinfo(WeatherWebServiceSoap),ioDocument); //uky 20110422rnrn#pragma startup RegTypes 32rnrn; // NS_WeatherWebServicernrn[/code]
调用WebService的时候报错
-
PB11调用WEBSERVICE报错?
SoapConnection i_connrni_conn = create soapconnectionrnn_<em>webservice</em> myproxyrnlong ret rnrnret = i_Conn.CreateInstance(myproxy, "n_<em>webservice</em>","http://localhost/<em>webservice</em>/n_<em>webservice</em>.asmx?wsdl")rnrnmessagebox('b',string(ret)) //此处返回0rntryrn string ls_data rn// ls_data = myproxy.of_getdata( )rn ls_data = myproxy.classname()rn messagebox('a',ls_data)rncatch (SoapException e)rn messagebox('a',e.getmessage())rnend try rn上面代码中,如果用ls_data = myproxy.classname()可以获取正确内容,但如果用ls_data = myproxy.of_getdata()系统则提示:rnThe soapclient doesn't support .net proxyrn请高手帮解答一下,是哪里有问题?rn rn如果在编译那里选择WSDL engine用easysoap却可以获取数据,用.net却不行,是什么原因,希望有人愿意帮一下我rn
java调用webservice报错
对方<em>webservice</em>接口是.net开发的,在网上找了个例子,测试,但是没有成功。rn下面是代码:rn[code=Java]rnprivate static String wsdlUrl = "http://tempuri.org/WebDBManage/Database/GetDataSetByYearAndMonth"; rn public static void main(String[] args) rn rn try rn Integer iYear = new Integer(2011);rn Integer iMonth = new Integer(1);rn String endPoint = "http://192.168.1.104:80/WebDBManage/Database.asmx?wsdl";rn Service service = new Service();rn rn Call call = (Call) service.createCall();rn call.setTargetEndpointAddress(endPoint);rn call.setReturnClass(java.lang.String[].class);rn call.addParameter("iYear", //设置要传递的参数 rn org.apache.axis.encoding.XMLType.XSD_INT, rn javax.xml.rpc.ParameterMode.IN);//接口的参数rn call.addParameter("iMonth", org.apache.axis.encoding.XMLType.XSD_INT, rn javax.xml.rpc.ParameterMode.IN);rn rn call.setOperationName("GetDataSetByYearAndMonth");rn call.setUseSOAPAction(true);rn call.setSOAPActionURI("http://tempuri.org/WebDBManage/Database/GetDataSetByYearAndMonth");rn Object results = (Object) call.invoke(new Object[]iYear,iMonth);rn rn catch (Exception e) rn e.printStackTrace();rn rn rn[/code]rnIP是用的对方提供的,运行后<em>报错</em>。rn15:59:55,546 ERROR Call:2274 - Exception:rnorg.xml.sax.SAXException: No deserializer for http://www.w3.org/2001/XMLSchemaanyTypern搜索后未找到解决办法,求解。
weblogic下调用webservice报错
1:项目在windows+tomcat下运行无<em>报错</em>,运行正常;rn2:在linux+weblogic下部署成功,程序运行到最后一步通过<em>webservice</em>返回报文<em>报错</em>,<em>webservice</em>客户端代码是通过wsdl用myeclipse生成,<em>调用</em>代码如下rn[code=java] ReceiveImplService ris = new ReceiveImplService();rn String res = ris.getReceiveImplPort().receive(sb.toString());rn System.out.println("server返回" + res);[/code]rn客户端代码(ReceiveImplService这个类内容如下)rn[code=java] public ReceiveImplService() rn rn super(RECEIVEIMPLSERVICE_WSDL_LOCATION, new QName(rn "http://yourcompany.com/", "ReceiveImplService"));rn [/code]rn这个super引用如下rn[code=java] protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) rn delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,rn serviceName,rn this.getClass());rn [/code]rn<em>报错</em>信息如下:rn[code=html]rnINFO 2014-02-19 10:31:00,461 [ExportData.java,91] - 535381ad4447fa49014447fb4d6a0003对应wsdl地址为http://11.1.9.213:8088/Server/ReceiveImplPort?wsdlrnrnERROR 2014-02-19 10:31:00,463 [ExportData.java,99] - 发送异步返回报文失败Unable to create Provider: weblogic.wsee.jaxws.spi.WLSProvider cannot be cast to javax.xml.ws.spi.Providerrnjavax.xml.ws.WebServiceException: Unable to create Provider: weblogic.wsee.jaxws.spi.WLSProvider cannot be cast to javax.xml.ws.spi.Providerrnrn at javax.xml.ws.spi.Provider.provider(Provider.java:82)rn at javax.xml.ws.Service.(Service.java:57)rn at cn.net.sinodata.returnData.ReceiveImplService.(ReceiveImplService.java:57)rn at com.bpo.runImpl.ExportData.run(ExportData.java:92)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)rn at java.lang.Thread.run(Thread.java:679)[/code]rnrnrn我怀疑可能是因为在weblogic下缺失“provider”这个类的引用,然后就添加了<em>webservice</em>-rt.jar,之后该项目就无法正常部署,<em>报错</em>信息如下,不知道有没有用rn[code=html]Cannot cast weblogic.wsee.jaxws.framework.policy.WSDLParserExtension to com.sun.xml.ws.api.wsdl.parser.WSDLParserExtensionrn failed to parse runtime descriptor: exception during WSDL parsing:rn[/code]rnrn希望有人能告知导致这个问题的原因,是jar包缺失还是什么的,万分感谢
C# 调用webservice报错,间歇性的
No running communication point is configured to process this request.rn rn就会报这个错,有没有大佬碰到过
C#调用java的webservice报错问题
我是这么<em>调用</em>的:rnUtrustSSO.IAppAccountPwdManager sso = new DocMIS.UtrustSSO.IAppAccountPwdManager(); //实例化接口rnICredentials cre = new NetworkCredential("user1", "pass1", "http://<em>webservice</em>interface.chinautrust.com.cn"); //初始化安全凭证rnsso.Credentials = cre; //设置客户端身份验证的安全凭据rnif (!sso.updateAppPassword("cs004", AppConfig.UserInfo.Create().LoginName, txbNewPwd1.Text.Trim()))rnrnrn<em>报错</em>信息:rn捕捉到SoapHeaderExceptionrnGetRelation Service Should be Authenticatedrn截图如下:rn[img=http://images.cnblogs.com/cnblogs_com/wf5360308/106546/r_SoapHeader_err.jpg][/img]rn
c# 调用webservice 报错,请高手指点
<em>c#</em>写的winform php写的<em>webservice</em>rn在线程中不停的<em>调用</em>,有的时候就会<em>报错</em>:基础连接已经关闭: 服务器关闭了本应保持活动状态的连接;rnrn我想知道是<em>c#</em>的事情,还是<em>webservice</em>的问题。rnrn错误详情:rnSystem.Net.WebException: 基础连接已经关闭: 服务器关闭了本应保持活动状态的连接。rn 在 System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)rn 在 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)rn 在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)rn 在 Clickus.ClickusWeb.<em>webservice</em>.Server_Chat_Msg(String username, String filename)rn 在 Clickus.frmMain.msgReceive()
利用C#调用webservice报错
错误内容为:XML 文档(2, 793)中有错误rn文档中未找到 ID 为“1”的引用元素。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.InvalidOperationException: 文档中未找到 ID 为“1”的引用元素。rnrnrn利用Wireshark检测发现返回来的xml是对的,但就是无法获取结果,请问各位大虾该怎么解决???
C#远程连接webservice报错
大家好。rn做一个项目,需要连接到医院的<em>webservice</em>rn我在本地做测试,自己电脑构建一个<em>webservice</em>,通过添加web引用的方式,连接没有问题rnrn但是通过医院内网连接他们给出的<em>webservice</em>地址时就提示“html文档不包含web服务信息,给出的web地址内容类型text/html;charset=utf-8;跟绑定的(application/soap+xml;charset=utf-8)内容类型不匹配”rn,rn我直接通过ie浏览器是可以进入到他们的service地址的。就是<em>c#</em>远程连接<em>报错</em>。rnrn[img=http://my.csdn.net/my/album/detail/1227303][/img]rnrnrn有人遇到过这个情况吗,怎么解决,谢谢
报错--404???
我想用JAVA做个网站的,刚刚做好了用户注册页面,现在正在做用户浏览界面。可是当把现成的后台框架资源引入时报<em>404</em>错误,不知道咋整呀。我是看着视频一步步做的,视频上引入就没有<em>报错</em>那,咋滴???急~~~~都弄了一天了,谁知道呀,谢谢!rn 以下是<em>报错</em>:rnHTTP Status <em>404</em> - /Shopping/admin/AdminIndex.htmlrn________________________________________rntype Status reportrnmessage /Shopping/admin/AdminIndex.htmlrndescription The requested resource (/Shopping/admin/AdminIndex.html) is not available.rn________________________________________rnApache Tomcat/5.5.27rnrn
关于webService 调用远程webService 报错
有webService 服务 A ,提供远程<em>调用</em>接口 a() ,在a()方法中<em>调用</em>了 webService Brn提供的远程方法b()。这个时候就<em>报错</em>,远程方法找不到 ,还报Jaxb 有错误。 单独<em>调用</em>每一个webService 服务时正确。 求教 :为什么 ? 紧急 望各位高手赐教,不胜感激!rn
java调用webservice时报 faultString: (404)Not Found
******* request *******nnnn ESSn ESS0025n AEGON_WS_ESS_USER_LOGINnnn n n n n 0n 2014-05-13 13:57:01nnn 1926099983n abcdennnnException in thread "main" AxisFaultn faultCode: http://xml.apache.org/axis/HTTPn faultSubcode: n faultString: (<em>404</em>)Not Foundn faultActor: n faultNode: n faultDetail: n :return code: <em>404</em>n Apache Tomcat/6.0.18 - Error report HTTP Status <em>404</em> - /ESS_DEV/services/EssQueryServer type Status report message /ESS_DEV/services/EssQueryServer description The requested resource (/ESS_DEV/services/EssQueryServer) is not available. Apache Tomcat/6.0.18n http://xml.apache.org/axis/HttpErrorCode:<em>404</em>nn(<em>404</em>)Not Foundn at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)n at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)n at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)n at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)n at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)n at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)n at org.apache.axis.client.Call.invokeEngine(Call.java:2784)n at org.apache.axis.client.Call.invoke(Call.java:2767)n at org.apache.axis.client.Call.invoke(Call.java:2443)n at org.apache.axis.client.Call.invoke(Call.java:2366)n at org.apache.axis.client.Call.invoke(Call.java:1812)n at com.aegon_cnooc.ess.WebService.client.EssQueryServerSoapBindingStub.communicationChange(EssQueryServerSoapBindingStub.java:676)n at com.aegon_cnooc.ess.WebService.ServiceClientTest.testEssQueryServer(ServiceClientTest.java:96)n at com.aegon_cnooc.ess.WebService.ServiceClientTest.main(ServiceClientTest.java:29)n n java测试:n public static void testEssQueryServer() throws Exception n String encode = "GBK";n System.out.println("******* request *******");n String request = readFile(requestXMLFile, encode);n // <em>调用</em>WebServicen EssQueryServerServiceLocator services = new EssQueryServerServiceLocator();n EssQueryServerSoapBindingStub client = (EssQueryServerSoapBindingStub) servicesn .getEssQueryServer();n String response = client.communicationChange(request);n System.out.println("******* response *******");n writeXML(response, responseXMLFile, encode);n n n n <em>webservice</em> 代码:n public java.lang.String communicationChange(java.lang.String reqestXML) throws java.rmi.RemoteException n if (super.cachedEndpoint == null) n throw new org.apache.axis.NoEndPointException();n n org.apache.axis.client.Call _call = createCall();n _call.setOperation(_operations[11]);n _call.setUseSOAPAction(true);n _call.setSOAPActionURI("");n _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);n _call.setOperationName(new javax.xml.namespace.QName("http://server.WebService.ess.aegon_cnooc.com", "communicationChange"));nn setRequestHeaders(_call);n setAttachments(_call);n try ** java.lang.Object _resp = _call.invoke(new java.lang.Object[] reqestXML);**这一行<em>报错</em>nn if (_resp instanceof java.rmi.RemoteException) n throw (java.rmi.RemoteException)_resp;n n else n extractAttachments(_call);n try n return (java.lang.String) _resp;n catch (java.lang.Exception _exception) n return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);n n n catch (org.apache.axis.AxisFault axisFaultException) n throw axisFaultException;nn
JMeter启动webservice调用报错
[color=blue]2012/11/18 20:44:05 ERROR - jmeter.gui.action.RemoteStart: Failed to initialise remote engine java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java...
求助,调用JAVA WEBSERVICE报错
<em>调用</em>JAVA开发的WEBSERVICE时报一下错误,有朋友知道如何解决?rn知道的麻烦指点一下,谢谢!rn---------------------------rnDebugger Exception Notificationrn---------------------------rnProject Project2.exe raised exception class ESOAPDomConvertError with message 'DocumentElement http://schemas.xmlsoap.org/soap/envelope/:Envelope expected, http://schemas.xmlsoap.org/wsdl/:definitions found'.rn---------------------------rnBreak Continue Help rn---------------------------rn
SAP调用外部webservice报错
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Ma...
cxf调用webservice报错问题
java.lang.IllegalArgumentException: Can not set final com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic field com.sun.tools.internal.xjc.reader.internalizer.DOMForest.logic to org.apache.cxf.endpoint.dynamic.DynamicClientFactory$1rn
java调用delphi7的webservice报错
[b]使用myeclipse+axis2,导入wsdl文件,生成客户端测试代码:如下所示:[/b]rn java.lang.String url = "http://xxx.xxx.xxx.xxx:xxxx/hansncms/YXTService.exe/wsdl";//http://xxx.xxx.xxx.xxx:xxxx/hansncms/YXTService.exe/wsdl/IHansYXTServicern org.tempuri.IHansYXTServiceserviceStub stub =rn new org.tempuri.IHansYXTServiceserviceStub(url);//the default implementation should point to the right endpointrn rn org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage request=rn (org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage)getTestObject(org.tempuri.IHansYXTServiceserviceStub.ReceiveOverage.class);rn // todo Fill in the param10 herern rn request.setName("xxx"); rn request.setHospitalno("xxx");rn request.setUsername("test");rn request.setPassword("123");rn assertNotNull(stub.receiveOverage(rn request));rnrn[b]附wsdl:[/b]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[b]运行测试代码后,报如下错误:[/b]rnorg.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found htmlrn at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)rn at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)rn at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)rn at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)rn at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)rn at org.tempuri.IHansYXTServiceserviceStub.receiveOverage(IHansYXTServiceserviceStub.java:262)rn at org.tempuri.IHansYXTServiceserviceTest.testreceiveOverage(IHansYXTServiceserviceTest.java:58)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at junit.framework.TestCase.runTest(TestCase.java:164)rn at junit.framework.TestCase.runBare(TestCase.java:130)rn at junit.framework.TestResult$1.protect(TestResult.java:106)rn at junit.framework.TestResult.runProtected(TestResult.java:124)rn at junit.framework.TestResult.run(TestResult.java:109)rn at junit.framework.TestCase.run(TestCase.java:120)rn at junit.framework.TestSuite.runTest(TestSuite.java:230)rn at junit.framework.TestSuite.run(TestSuite.java:225)rn at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)rnCaused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found htmlrn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191)rn at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)rn at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.(StAXSOAPModelBuilder.java:105)rn at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677)rn at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)rn at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)rn ... 24 morernrn备注:rnwsdl url地址,输入在浏览器,可以正常访问。rn在网上查相关资料,说在测试代码中加入如下代码即可访问:rnstub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);rn可是加过后,错误仍存在。rnrn请知道的朋友,发帖解决下,不胜感激。
.NET调用WebService报错:java.lang.OutOfMemoryError
我是Java程序员,同事的.NET程序<em>调用</em>我的Java WebService接口报了java.lang.OutOfMemoryError异常rn 在 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)rn 在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)rnrn请问大家以前遇到过这样的问题吗?
Jquery 调用JAVA的Webservice报错
$('#car_index').live('pageshow',function()rn var para = "arg0='2012-10-10'&arg1='2012-12-03'";rn $.ajax(rn type: "POST", //访问WebService使用Post方式请求rn contentType: "application/json;utf-8", //WebService 会返回Json类型rn url: "http://172.21.3.17:8080/wstest/TestWsPort?wsdl/getStudent", //<em>调用</em>WebServicern data: para,rn dataType: 'json',rn json : 'callback',rn beforeSend: function(x) x.setRequestHeader("Content-Type", "application/json; charset=utf-8"); ,rn success: function(result) //回调函数,result,返回值rn alert("size==> "+result.size());rn rn );rn);rnrn上面是我的jquery 代码,访问不到信息...rnrn
webservice客户端调用报错空指针
![一直再报空指针,要疯了](https://img-ask.csdn.net/upload/201809/28/1538116252_63917.png)
WebService问题,调用外部接口报错
![图片说明](https://img-ask.csdn.net/upload/201703/07/1488878726_780086.png)n返回代码如上图,nnn方法代码如下图,问题出在哪里呢?求助n![图片说明](https://img-ask.csdn.net/upload/201703/07/1488878793_670669.png)
客户端调用webservice报错
错误提示:DocumentElement http://schemas.xmlsoap.org/soap/envelope/:Envelope expected, :html foundrn请问这是什么问题,哪里出了问题么?因为不是每次都出这个错误。但出现的概率挺大。
Oracle调用WebService的存储过程报错
Oracle版本:12crnOS:Linuxrn使用账号:ITAMHR,普通用户权限,已让DBA授予了UTL_DBWS EXECUTE的权限rn存储过程如下:rncreate or replace procedure getITAssetData isrn l_service SYS.UTL_DBWS.service;rn l_call SYS.UTL_DBWS.call;rn l_result ANYDATA;rn l_wsdl_url VARCHAR2(100);rn l_namespace VARCHAR2(100);rn ESB_PWD VARCHAR2(50);rn ESB_SERVICE_ID VARCHAR2(50);rn ESB_SID VARCHAR2(25);rn ESB_SN VARCHAR2(250);rn ESB_USER VARCHAR2(25);rn l_service_qname SYS.UTL_DBWS.qname;rn l_operation_qname SYS.UTL_DBWS.qname;rn rsCursor SYS_REFCURSOR;rn l_name VARCHAR2(256);rn l_input_params SYS.UTL_DBWS.ANYDATA_LIST;rnbeginrn----对应wsdl地址rn l_wsdl_url := 'http://10.10.162.36/esbservice.wsdl';rn l_namespace := 'http://w3.ibm.com/gbs/ais/ei/esb';rn---参数1rn ESB_PWD :='DD4B';rn dbms_output.put_line('1');rn---参数2rn ESB_SERVICE_ID :='00000000000100';rn---参数3rn ESB_SID :='0000';rn---参数4rn ESB_SN :='000020150602142247139621';rn---参数5 rn ESB_USER :='0000';rnrn dbms_output.put_line('2');rn l_service_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'EsbService');rn dbms_output.put_line('3');rn l_operation_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'invoke');rn dbms_output.put_line('4');rn l_service := SYS.UTL_DBWS.create_service (wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),service_name => l_service_qname);rn dbms_output.put_line('5');rn l_call := SYS.UTL_DBWS.create_call (service_handle => l_service,port_name => null, operation_name => l_operation_qname);rn dbms_output.put_line('6');rn l_input_params(1) :=ANYDATA.ConvertVarchar2 (ESB_PWD);rn dbms_output.put_line('7');rn l_input_params(2) :=ANYDATA.ConvertVarchar2(ESB_SERVICE_ID);rn l_input_params(3) :=ANYDATA.ConvertVarchar2(ESB_SID);rn l_input_params(4) :=ANYDATA.ConvertVarchar2(ESB_SN);rn l_input_params(5) :=ANYDATA.ConvertVarchar2(ESB_USER);rnrnrn--返回值rn l_result := SYS.UTL_DBWS.invoke(call_Handle => l_call,input_Params => l_input_params);rn SYS.UTL_DBWS.release_call (call_handle => l_call);rn SYS.UTL_DBWS.release_service (service_handle => l_service);rn dbms_output.put_line(ANYDATA.AccessVarchar2(l_result));rn----<em>调用</em>XML解析函数rnrn OPEN rsCursor for select idAttributeOfDocElements(ANYDATA.AccessVarchar2(l_result)) from dual;rn LOOPrn fetch rsCursor into l_name;exit when rsCursor%NOTFOUND;rn dbms_output.put_line(l_name);rn end LOOP;rn EXCEPTIONrn WHEN OTHERS THENrn dbms_output.put_line(SQLERRM);rnEND getITAssetData;rnrnrn输出语句:rn1rn2rn3rn4rnORA-29532: Java <em>调用</em>被未捕获的 Java 异常错误终止: java.lang.IllegalAccessException: java.lang.NoClassDefFoundErrorrnrnrn我已经按照官网的要求,将dbwsclientdb11.jar和dbwsclientws.jar放入sqlj/lib下了,并且运行了loadjava命令。rn但是执行存储过程的时候系统报“ORA-29532: Java <em>调用</em>被未捕获的 Java 异常错误终止: java.lang.IllegalAccessException: java.lang.NoClassDefFoundError”rn这个错到底是什么引起的?授权和JAR包都已经到位了啊,怎么还会说NoClassFound?rn请大神指点,还有哪没有配置正确的?或者哪里可以查看具体是哪个class有问题?十分感谢!
webservice CXF 客户端调用报错
十月 13, 2015 3:18:01 下午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [jsp] in context with path [] threw exception [Filter execution threw an exception] with root causernjava.lang.NoSuchMethodError: org.apache.neethi.Policy.normalize(Z)Lorg/apache/neethi/PolicyComponent;rn at org.apache.cxf.ws.policy.EffectivePolicyImpl.initialisePolicy(EffectivePolicyImpl.java:134)rn at org.apache.cxf.ws.policy.EffectivePolicyImpl.initialise(EffectivePolicyImpl.java:86)rn at org.apache.cxf.ws.policy.PolicyEngineImpl.getEffectiveClientRequestPolicy(PolicyEngineImpl.java:155)rn at org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.java:110)rn at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:45)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)rn at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)rn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)rn at com.sun.proxy.$Proxy54.getUserInfo(Unknown Source)rn at filters.SessionExpirtService.doOther(SessionExpirtService.java:83)rn at filters.SessionExpirtService.doFilter(SessionExpirtService.java:257)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)
windows2003 下 .NET调用webservice报错
我用.NET做了一个程序,<em>调用</em>另一个空间的<em>webservice</em>rnrn但是代码一到了链接<em>webservice</em>时就报下面的错误,麻烦高手帮我看看是什么原因?我的.NET用的VS2008开发的,用的虚拟空间。rnrnError creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.
求解客户端调用webservice 报错
在5台电脑上面,使用客户端程序的时候,其中的2台老是报下面的错误,其他3台上面没有任何错误····改了不少设置还是没有解决,请高手帮忙指点下rn rn1,system.net.webexception the request failed with http status <em>404</em> not foundrnrn2,System.Net.Sockets.SocketException: 由于目标机器积极拒绝,无法连接
调用webservice偶尔报错问题
<em>调用</em><em>webservice</em>偶尔会<em>报错</em>,有时点没问题,但是有时点就<em>报错</em>,单独运行<em>webservice</em>从来没有出现过这样问题,这是什么原因呢,请高人指点,谢谢。rnrnSystem.Web.Services.Protocols.SoapException: 服务器无法处理请求。 - System.IndexOutOfRangeException: 索引超出了数组界限。rn 在 EDSWebService.ServiceData.RelaContent(String[] devBuf, String[] rtBuf, Int32 devNum, Int32 rtNum) 位置 C:\Projects\EDSWebService\EDSWebService\EDSWebService\ServiceData.cs:行号 193rn 在 EDSWebService.WebService.GetPointMonitorData(String sysId) 位置 C:\Projects\EDSWebService\EDSWebService\EDSWebService\WebService.asmx.cs:行号 276rn --- 内部异常堆栈跟踪的结尾 ---rnrnGetPointMonitorData(String sysId)方法中<em>调用</em>了rnRelaContent(String[] devBuf, String[] rtBuf, Int32 devNum, Int32 rtNum)rn单独运行没有任何问题啊,怎么<em>调用</em>时偶尔会报这个错呢。
webservice服务端被调用报错
WARN : org.apache.cxf.phase.PhaseInterceptorChain#doLog : Interceptor for http://<em>webservice</em>.appframe.com/LbpmSixInterfaceImplService#http://<em>webservice</em>.appframe.comgetTemplateFormList has thrown exception, unwinding nownorg.apache.cxf.interceptor.Fault: Unexpected wrapper element http://<em>webservice</em>.appframe.com/getTemplateFormList found. Expected http://<em>webservice</em>.appframe.comgetTemplateFormList.n at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:106)n at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)n at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)n at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)n at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)n at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)n at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)n at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)n at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)n at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)n at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)n at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)n at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)n at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)n at java.lang.Thread.run(Thread.java:745)nnnn错误代码,求大神解答,在线等
webservice客户端调用服务报错
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Fault: com.shop.<em>webservice</em>.common.BusinessExceptionrnorg.codehaus.xfire.fault.XFireFault: Fault: com.shop.<em>webservice</em>.common.BusinessExceptionrn at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)rn at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)rn at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)rn at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Client.onReceive(Client.java:406)rn at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)rn at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)rn at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)rn at org.codehaus.xfire.client.Client.invoke(Client.java:336)rn at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)rn at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)rn at $Proxy0.getShopFund(Unknown Source)rn at com.shop.<em>webservice</em>.Fund.client.ShopFundGetResponse.getShopFund(ShopFundGetResponse.java:19)rn at test.test.main(test.java:90)rnrnrnrn我<em>调用</em>服务端的接口就报这个错,其他的接口没问题,就其中的一个接口报这个错,com.shop.<em>webservice</em>.common.BusinessException这个类应该是服务端的类,客户端的类应该是com.shop.<em>webservice</em>.common.client.BusinessException,那我这边<em>调用</em>报服务端类的错是为什么
新手AJAX,调用WebService报错
刚刚开始学ASP.NET ajax,<em>调用</em>WebService<em>报错</em>,始终不明白哪里出错。实在没办法上来请朋友给帮帮眼rn现在写的是一个注册时候用户名是否存在的检查,文本框失焦的时候,弹出错误rn代码如下:rn[code=JScript]rn// JScript 文件rnrn//用户名是否重复检查rnfunction CheckName()rnrn WebServiceForUser.CheckUserName(($get('txtName')).value,GetCheckNameResult);rnrnfunction GetCheckNameResult(result)rnrn if ( result == ture )rn rn $get('txtCheckName').style.display ="inline";rn $get('txtCheckName').value = "用户名已经存在";rn rnrn[/code]rnrn[code=C#]rnusing System;rnusing System.Web;rnusing System.Collections;rnusing System.Web.Services;rnusing System.Web.Services.Protocols;rn[WebService(Namespace = "http://tempuri.org/")]rn[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]rn[System.Web.Script.Services.ScriptService()]rnpublic class WebServiceForUser : System.Web.Services.WebServicernrn [WebMethod]rn public bool CheckUserName(string strName)rn rn string strSQL;rn strSQL = "Select * From 用户基本信息 Where 用户昵称 = '" + strName + "'";rn if (DataBaseCs.Select_DataRow(strSQL) != null)rn rn //如用户已经存在,即返回truern return true ;rn rn elsern rn //如用户已经存在,即返回falsern return false;rn rn rnrn [WebMethod]rn public string HelloWorld()rn rn return "Hello World";rn rnrn[/code]rn最后是节选的HTMLrn[code=HTML]rnrn rn rn rn rn rn rnrnrnrnrn[/code]rnrn当运行的时候<em>报错</em>为一提示框(截图):rn[img=http://hiphotos.baidu.com/facesmile/pic/item/dec8ac8ae9486c629f2fb4e2.jpg][/img]rnrn自己瞎忙活了两天,什么结果也没有,希望大家帮忙看看哪里错的或遗漏了什么,再不给想想可能是哪里出错了。
Delphi调用Java的WebService报错
合作伙伴写了一些处理逻辑在WebService中,wsdl地址为:https://114.255.245.64:8080/Crm/services/clienttrade?wsdlrn 我用delphi新建一个WebService的WSDL Import,生成一个文件后,<em>调用</em><em>报错</em>,谁能帮忙:rn <em>调用</em>:rn procedure TForm1.btn2Click(Sender: TObject);rnvarrn x: THTTPRIO;rnrn InterfaceVariable: clienttradePortType;rnbeginrn X :=THTTPRio.Create(Application);rn x.HTTPWebNode.UseUTF8InHeader:=true;rn x.WSDLLocation:= 'https://114.255.245.64:8080/Crm/services/clienttrade?wsdl';rn InterfaceVariable := X as clienttradePortType;rn showmessage(InterfaceVariable.SayHello);rnend;rn<em>报错</em>信息有时是“证书作者不支持。。”、“Empty Document"rn郁闷。rnrn另外,在WSDL Import导入的时候,点击Next有时会出现:rn Unable to load WSDL File/Location: https://114.255.245.64:8080/Crm/services/clienttrade?wsdl. Error [灾难性故障].rn
delphi webservice 调用报错
project project3.exe raised exception class ERemotableException with message 'access violation at address 004037B in module'project2.exe'.read of address 00000003'.process stopped.use step or run to continue.
python suds 调用webservice报错 “”
用suds写了个<em>调用</em><em>webservice</em>的测试客户端,方法输入参数为xml,,通过提供的xml中的条件,查询数据,运行时,发现在服务器中当查询数据时间很短时,<em>webservice</em>客户端<em>调用</em>可正常反馈,但在服务器中的查询时间较长时,客户端会<em>报错</em>,程序代码如下:rn------------rnimport xml.dom.minidomrnimport sudsrnurl = 'http://127.0.0.1:9080/mytest?wsdl'rnclient = suds.client.Client(url,faults=False)rndom=xml.dom.minidom.parse("e:/xmlstr.xml")rnresult=client.service.getQueryInfo(dom.toxml('utf-8'))rnprint result rn------------rn具体<em>报错</em>如下:rnTraceback (most recent call last):rn File "D:\My Documents\Desktop\test2.py", line 9, in rn result=client.service.getQueryInfo(dom.toxml('utf-8'))rn File "build\bdist.win32\egg\suds\client.py", line 538, in __call__rn return client.invoke(args, kwargs)rn File "build\bdist.win32\egg\suds\client.py", line 602, in invokern result = self.send(soapenv)rn File "build\bdist.win32\egg\suds\client.py", line 637, in sendrn reply = transport.send(request)rn File "build\bdist.win32\egg\suds\transport\https.py", line 64, in sendrn return HttpTransport.send(self, request)rn File "build\bdist.win32\egg\suds\transport\http.py", line 77, in sendrn fp = self.u2open(u2request)rn File "build\bdist.win32\egg\suds\transport\http.py", line 116, in u2openrn return url.open(u2request)rn File "D:\Python25\lib\urllib2.py", line 381, in openrn response = self._open(req, data)rn File "D:\Python25\lib\urllib2.py", line 399, in _openrn '_open', req)rn File "D:\Python25\lib\urllib2.py", line 360, in _call_chainrn result = func(*args)rn File "D:\Python25\lib\urllib2.py", line 1107, in http_openrn return self.do_open(httplib.HTTPConnection, req)rn File "D:\Python25\lib\urllib2.py", line 1082, in do_openrn raise URLError(err)rnURLError: rnrnrn看起来像是访问超时的问题,但不知道怎样去优化,请高人指点下,不胜感激!!
C#调用webservice
怎么从C#<em>调用</em>sap的<em>webservice</em>.
C#静态调用webservice
搭建iis网站,通过<em>webservice</em>指定网址,即可通过<em>调用</em><em>webservice</em>访问数据库。
C#调用Java的webservice
C#<em>调用</em>Java的<em>webservice</em>
c#调用java的webservice
[img=https://img-bbs.csdn.net/upload/201405/15/1400123928_680983.jpg][/img]rnrn用<em>c#</em><em>调用</em>java的<em>webservice</em>遇到如上图的问题,不知道如何处理,请教高人。
C# 调用webservice
C# <em>调用</em><em>webservice</em>的实例中,如何将后台程序中得到的数值,赋给前台的程序中的变量。
C#调用WebService问题
两台服务器:rn http://test1/test.asmxrn http://test2/test.asmxrn 里面都有相同的Webservice:test 作用是把输入的值再返回回来.rnrn用C#写的一个程序<em>调用</em>(引用名称:test,引用服务器:http://test1/test.asmx):rnrn test test1 = new test();rn test1.Url = "http://test1/test.asmx";rn string str1 = test1.test("test1"); 这个结果是正确的rnrn test test2 = new test();rn test2.Url = "http://test2/test.asmx";rn string str2 = test2.test("test2");rn //[color=#FF0000]在第一次执行这里的时候提示"Object reference not set to an instance of an object."rn 但第二次以后就正确了,这是为什么???rn 若我引用的是第二台服务器的地址,那就是test1有这样的问题,test2却正常.[/color]rn WebService中test的内容:rn public string test(string str)rn rn return "Result:"+str;rn rn rnrnrn
MFC 调用C# webservice
C++ 如何<em>调用</em><em>c#</em> 发布的websrvice ?rn我能<em>调用</em> 但不能 进行byte[] 数组传递;rn<em>webservice</em>rn[code=C#]rn[WebMethod]rn public string uplowadfile(byte[] fidata)rn rn tryrn rn MemoryStream ms = new MemoryStream(fidata);rn string filepath = @"G:\\test.txt";rn FileStream stream = new FileStream(filepath , FileMode.OpenOrCreate);rn ms.WriteTo(stream);rn ms.Close();rn stream.Close();rn ms = null;rn stream = null;rn rn rnreturn "finish";rnrnrn rn[/code]rnrnC++rn[code=C/C++]rnarray aa=gcnew array('0xff','0x11');rnrnrn[/code]rnrn如何 在c++定义一个byte[].传递给<em>webservice</em>uplowadfile(byte[] fidata)rnrnrnrn错误:rn错误 2 error C3149: “cli::array”: 此处没有顶级“^”,不能使用此类型 rn错误 3 error C2767: 托管数组维度不匹配: 应为 1 个参数,但提供了 2 个 rn错误 4 error C2440: “初始化”: 无法从“cli::array ^”转换为“cli::array ^” rnrnrnrn我是想把客户端c++ 从文件得到的数据流char *p; 传递给<em>webservice</em>,求救 求救
Wince6.0 C#调用webservice
环境:Wince6.0rn开发工具:vs2008rn语言:C#rnrn问题:终端在<em>调用</em><em>webservice</em>时,rn在输出窗口会报如下异常:rn在 System.Net.Sockets.SocketException 中第一次偶然出现的“System.dll”类型的异常rn在 System.Net.Sockets.SocketException 中第一次偶然出现的“System.dll”类型的异常rn在 System.Net.WebException 中第一次偶然出现的“System.dll”类型的异常rn在 System.Net.WebException 中第一次偶然出现的“System.Web.Services.dll”类型的异常rn在 System.ArgumentNullException 中第一次偶然出现的“mscorlib.dll”类型的异常rn另外在<em>调用</em><em>webservice</em>里面的方法时,rntry可以捕捉到异常,如下:rn无法从传输连接中读取数据。rn位于 System.Net.HttpWebRequest.finishGetResponse()rn位于 System.Net.HttpWebRequest.GetResponse()rn位于 System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)rn位于 System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)rn位于 System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName, Object[] parameters, WebClientAsyncResult asyncResult)rn位于 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)rn位于 Transfer.TerminalBusinessServiceProxy.TerminalBusinessServiceService.heartBeat(TerminalWsRequestDto arg0)rn捕捉异常后,终端的消息就无法发送出去。rn我用心跳每5分钟<em>调用</em>一次,该问题有时一小时出现3次,有时一小时一次都没有。该问题不定时出现,目前没有找到规律。rn求大牛帮忙解决!!!成功解决问题可以再追加100分。rn谢谢。rnrnrnrn
c# webservice 调用dll
我用<em>c#</em>写了一个<em>webservice</em> 再用delphi 写另一个dllrn现在想在 websevice <em>调用</em>dll rndelphi code:rnfunction QueryCommand(const ConnectInfo,QuerySQL: String): String; StdCall;rnrnrnC# code rnrn [DllImport("HM_DataCOnnect.dll", EntryPoint="QueryCommand")]rn public static extern string QueryCommand(string ConnectStr, string QuerySQL);rn [WebMethod]rn public string HMQueryCommand_Delphi (string ConnectStr, string QuerySQL)rnrn rn rn string ResultXMLData="";rn ResultXMLData = QueryCommand(System.Configuration.ConfigurationManager.AppSettings["hmConnectionString"], QuerySQL);rn return ResultXMLData; rn rn rnrn<em>调用</em>就出错,那位高手帮我看看。rn
c#调用webservice
我php用nusoap写的<em>webservice</em>,用这个写不是不用谢wsdl文件吗?那<em>c#</em>该如何<em>调用</em>?
C# 调用webservice服务
同样的窗体<em>调用</em>web服务程序,<em>调用</em>同一个地址的 端口不一样而已。其中一个可以<em>调用</em>,访问另一端口时运行到这里就说连接服务器失败,但是这个地址可以打开的。 rnrn出错的是第二句:rn MethodInfo method = t.GetMethod("UserLogin")rn object item = method.Invoke(o, arg);rnrnrn报异常的如下:rnrnrnrn“System.Reflection.TargetInvocationException”类型的未经处理的异常出现在 mscorlib.dll 中。rnrn其他信息: <em>调用</em>的目标发生了异常。rnrnrn想请教大神有没有解的。小弟在此谢过了
C# 调用PHP webservice
C# <em>调用</em>PHP <em>webservice</em>
c#调用webservice的问题
我和sap有一个<em>webservice</em>的<em>调用</em>业务,他们公开的地址是:rnhttp://180.166.250.134:8000/sap/bc/srt/wsdl/srvc_5CF3FCE7C7C61EE288C70D54940D6AF4/wsdl11/allinone/ws_policy/document?sap-client=800rn我<em>调用</em>的过程如下:rn如何我new一个他们公开的类ZWS_TM_SD_01ClientrnServiceReference1.ZWS_TM_SD_01Client zws = new ServiceReference1.ZWS_TM_SD_01Client();rn类zws中有一个函数是ZFUN_SD_002,他的参数也是ZFUN_SD_002,rn所以我就在new一个ZFUN_SD_002rnServiceReference1.ZFUN_SD_002 ZFUN_SD_002 = new ServiceReference1.ZFUN_SD_002();rn根据ZFUN_SD_002在我们这边显示的参数rn分别对IM_WADAT、IM_VBELN及TAB_LIPS1赋值,然后<em>调用</em>ZFUN_SD_002rnzws.ZFUN_SD_002(ZFUN_SD_002);rn<em>调用</em>之后,在new一个ZFUN_SD_002ResponsernServiceReference1.ZFUN_SD_002Response re = new ServiceReference1.ZFUN_SD_002Response();rn从re中读取EX_FLG及EX_MSGrn我这边没有<em>报错</em>,我自认为<em>调用</em>成功,但是对方说我根本没有<em>调用</em>,因为我这边的返回值re中的EX_FLG及EX_MSGrn是空,请高手指点!
C# 调用webservice 出错
大家好,我今天在用C#<em>调用</em><em>webservice</em>的时候出现这样一个错误:rnrn[color=#FF0000]找不到 JetSun.ServiceBus:EventBusSvc 的定义。缺少命名空间为 JetSun.ServiceBus 的服务说明。rn参数名: name[/color]rnrn这是我<em>调用</em>某个机构内网服务器上的一个<em>webservice</em>,由于我不能访问内网,只能用他提供的一个编译后的xml文件。rn但是我用同样的程序<em>调用</em>网上公开的<em>webservice</em>时候就完全没有问题,输出的结果也正确。rn大家觉得这是什么原因呢?rn我的<em>调用</em><em>webservice</em>函数是这样实现的(参考了网上一位朋友的)rnrn[code=csharp] public static object InvokeWebMethod(string _url, string _methodName,rn params object[] _params)rn rn WriteLog("开始执行 动态<em>调用</em> <em>webservice</em> 函数...........", "");rn WebClient client = new WebClient();rn //String url = "http://localhost:3182/Service1.asmx?WSDL";//这个地址可以写在Config文件里面rn Stream stream = client.OpenRead(_url);rn ServiceDescription description = ServiceDescription.Read(stream);rnrn ServiceDescriptionImporter importer = new ServiceDescriptionImporter();//创建客户端代理代理类。rn importer.ProtocolName = "Soap"; //指定访问协议。rn importer.Style = ServiceDescriptionImportStyle.Client; //生成客户端代理。rn importer.CodeGenerationOptions = CodeGenerationOptions.GenerateProperties |rn CodeGenerationOptions.GenerateNewAsync;rn importer.AddServiceDescription(description, null, null); //添加WSDL文档。rn CodeNamespace nmspace = new CodeNamespace(); //命名空间rn nmspace.Name = "yzb"; //这个命名空间可以自己取rn CodeCompileUnit unit = new CodeCompileUnit();rn unit.Namespaces.Add(nmspace);rn ServiceDescriptionImportWarnings warning = importer.Import(nmspace, unit);rn CodeDomProvider provider = CodeDomProvider.CreateProvider("CSharp");rn CompilerParameters parameter = new CompilerParameters();rn parameter.GenerateExecutable = false;rn parameter.OutputAssembly = "MyTest.dll";//输出程序集的名称rn parameter.ReferencedAssemblies.Add("System.dll");rn parameter.ReferencedAssemblies.Add("System.XML.dll");rn parameter.ReferencedAssemblies.Add("System.Web.Services.dll");rn parameter.ReferencedAssemblies.Add("System.Data.dll");rn CompilerResults result = provider.CompileAssemblyFromDom(parameter, unit);rn if (result.Errors.HasErrors)rn rn // 显示编译错误信息 rn rn Assembly asm = Assembly.LoadFrom("MyTest.dll");//加载前面生成的程序集rn //Type t = asm.GetType("yzb.WeatherWS"); //前面的命名空间.类名,类必须是<em>webservice</em>中定义的rn Type t = asm.GetType("yzb.EventBusSvc"); rn //Type t = asm.GetType("JetSun.Iniuservice");rn object o = Activator.CreateInstance(t);rn MethodInfo method = t.GetMethod(_methodName);//GetPersons是服务端的方法名称,你想<em>调用</em>服务端的什么方法都可以在这里改,最好封装一下rn object item = method.Invoke(o, _params); //注:method.Invoke(o, null)返回的是一个Object,如果你服务端返回的是DataSet,这里也是用(DataSet)method.Invoke(o, null)转一下就行了rn WriteLog("动态<em>调用</em> <em>webservice</em> 函数执行完.........", "");rn return item;rn rn[/code]我的主函数中是这样的rn[code=csharp] string _url = "http://svrwcf2.his-test.com/CoreService/EventBus.svc?wsdl";//内网的地址rn string _get = Form1.InvokeWebMethod(_url, "XmlPublish",rn new object[] showXml()).ToString();//我自己的函数<em>调用</em>![/code]rnrn希望大神可以帮忙解答一下
C#调用WebService的问题
程序里有个功能需要<em>调用</em>一个接口获取列表,WebService是用java写的,在有个方法的传入参数中,有个int型的page参数,我用循环给page赋值然后传递过去,但是随便page的值是多少,返回的数据总是相同,调试的时候,WebService那边获取的page参数的值总是0,这时怎么回事,该如何解决?rn加急。。。。。。。。
dephi 调用 C# Webservice
我想<em>调用</em>C#做的WebService.但是我不知道怎么添加C#的WebService.我在File->New->WebService->WSDL Module里面输入C# webService的URL但是找不到.能不能给的详细的例子.谢谢.
c# winform 调用WebService
rn 接口实现方式:WebServicern 接口协议:SOAP1.1 ,SOAP1.2协议rn 接口标识(ifCode):rn 接口请求XML格式:rnrnrnrn rn rn < EnterpriseId>rn < EnterpriseName>rn rn < UserAccount >rn < Money>rn< ConsumeTime >rn < Category>rn < Balance>rn < SmsContent>rn rnrnrn<em>调用</em>说明如上,我<em>c#</em> winform <em>调用</em>WebService 不管怎么传XML文件,都返回说是XML可是不正确,请指导rn<em>c#</em> winform <em>调用</em>WebService 是按照网上大家指导的
flash 调用 C#下的webservice
flash代码:rnvar service:WebService=new WebService();rnservice.loadWSDL("http://192.168.0.200:15005/WebService/Common.asmx?wsdl");rnservice.addEventListener(ResultEvent.RESULT,onResult);rnservice.addEventListener(FaultEvent.FAULT,onFault);rnvar authInfo:AuthInfoVo = new AuthInfoVo();rnservice.PageInit(authInfo);rnrnC#代码:rn [WebMethod(EnableSession = true)]rn [ScriptMethod]rn public UeKeyValueOs PageInit(AuthInfo authInfo)rn rn UeKeyValueOs res;rn if (!AuthInfoUtility.IsAuthInfoValid(authInfo, out res))rn rn return res;rn rn OprRes oprRes = new OprRes();rn res.Add("NowUser", UserClientInfo.NowUser);//UserClientInfo.NowUser 当前用户 User类型rn oprRes.SetModule(System.Reflection.MethodBase.GetCurrentMethod()); oprRes.EndTime = DateTime.Now;rn res.Add(DigitalFamily.ConfigData.Config.RESULT_STR, oprRes);rn return res;rn rnrn问题说明:rn在<em>调用</em><em>webservice</em>时,程序没有进入到后台的序列化方法当中,造成在获取UserClientInfo.NowUser时会死循环。rnUser实体有关联其他实体,在<em>调用</em><em>webservice</em>时,程序有自定义序列化方式,以避免死循环问题,并返回指定数据。rn使用jq<em>调用</em>没有问题,不会出现死循环,正常返回数据,webconfig中配置引用也都正确,之前公司做的项目都是使用jq<em>调用</em><em>webservice</em>接口,没有错误。rn先追踪得到的结论是,以flash<em>调用</em>C#<em>webservice</em>接口,没有调到序列化代码当中。
c# 调用webservice
现在有一个coldfusion语言编写的<em>webservice</em>,rn在本地用vs2010通过Add web reference可以访问,也能返回数据.rn当把<em>webservice</em>地址换成客户qa的<em>webservice</em>地址,通过add web reference的方法添加时就会弹出一个security warning窗口。rn同时运行程序时会返回下面的错误:rnDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. rnrnException Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 40.255.0.206:22311rnrnSource Error: rnrnrnLine 47: [return: System.Xml.Serialization.SoapElementAttribute("orderqueryReturn")]rnLine 48: public QueryBean orderquery(object contactID) rnLine 49: object[] results = this.Invoke("orderquery", new object[] rnLine 50: contactID);rnLine 51: return ((QueryBean)(results[0]));rn rnrnSource File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website3\b454f555\36d009f3\App_WebReferences.n2mvahth.2.cs Line: 49 rnrnStack Trace: rnrnrn[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 40.255.0.206:22311]rn System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +251rn System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +279rnrn[WebException: Unable to connect to the remote server]rn System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +6098117rn System.Net.HttpWebRequest.GetRequestStream() +13rn System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +110rn WS1.GetinfofororderService.orderquery(Object contactID) in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website3\b454f555\36d009f3\App_WebReferences.n2mvahth.2.cs:49rn _Default.Button1_Click(Object sender, EventArgs e) in c:\Documents and Settings\r12433\My Documents\Visual Studio 2010\WebSites\WebSite3\Default.aspx.cs:29rn System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118rn System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563rnrnrn而通过url?wsdl方式访问还可以看到内容,不知道是什么原因?rnrn小弟是纯菜鸟,不知道有没有把问题说明白,希望有看懂问题的大侠可以解答rn rnrn
C# Webservice调用oracle存储过程
rnC# Webservice方法rnpublic int InsertToDataBase(string CorporationName, string DriverID, string DriverName, string FingerPrint)rn rn int retCode = 0;rn string sql_string = "PRC_TEST";rn OracleConnection connect = new OracleConnection(connect_string);rnrnrn OracleCommand command = new OracleCommand(sql_string, connect);rn command.CommandType = CommandType.StoredProcedure;rnrn OracleParameter parm1 = new OracleParameter();rn OracleParameter parm2 = new OracleParameter();rn OracleParameter parm3 = new OracleParameter();rn OracleParameter parm4 = new OracleParameter();rn OracleParameter parm5 = new OracleParameter();rn //inrn parm1 = new OracleParameter("CorporationName", OracleType.NVarChar, 100);rn parm2 = new OracleParameter("DriverID", OracleType.NVarChar, 50);rn parm3 = new OracleParameter("DriverName", OracleType.NVarChar, 20);rn parm4 = new OracleParameter("FingerPrint", OracleType.NVarChar, 1024);rn //outrn parm5 = new OracleParameter("retCode", OracleType.Number, 9);rnrn parm1.Direction = ParameterDirection.Input;rn parm2.Direction = ParameterDirection.Input;rn parm3.Direction = ParameterDirection.Input;rn parm4.Direction = ParameterDirection.Input;rnrn parm5.Direction = ParameterDirection.Output;rnrn parm1.Value = CorporationName;rn parm2.Value = DriverID;rn parm3.Value = DriverName;rn parm4.Value = FingerPrint;rn parm5.Value = retCode;rnrn connect.Open();rn command.ExecuteNonQuery();rnrn retCode = Convert.ToInt32(parm5.Value);rn return retCode;rnrnrn存储过程rncreate or replace procedure PRC_TEST( rn CorporationName in nvarchar2,rn DriverID in nvarchar2, rn DriverName in nvarchar2,rn FingerPrint in nvarchar2,rn retCode out numberrn )rn isrnv_sql number;rnbeginrn insert into FingerPrint(id,staffid) values(CRANE_FINGERPRINT_SEQ.NEXTVAL, DriverID);rn commit;rn rn retCode := 500;rnend PRC_TEST;rnrn调试出现问题:rnSystem.Data.OracleClient.OracleException: ORA-06550: 第 1 行, 第 7 列: rnPLS-00306: <em>调用</em> 'PRC_TEST' 时参数个数或类型错误rnORA-06550: 第 1 行, 第 7 列: rnPL/SQL: Statement ignoredrnrn各位帮忙看看 谢谢
PHP调用C#的webservice
PHP去<em>调用</em>C#写的一个<em>webservice</em>的例子,里面有详细的文字说明,希望对初学者有一定的帮助。
C#调用WebService
Web Service也叫XML Web Service WebService是一种可以接收从Internet或者Intranet上的其它系统中传递过来的请求,轻量级的独立的通讯技术。是:通过SOAP在Web上提供的软件服务,使用WSDL文件进行说明,并通过UDDI进行注册。
c# 简单的webservice调用
<em>c#</em> 简单的<em>webservice</em><em>调用</em> 本人收藏了3年的资源 现放出 都是总结了很多系统 软件项目实施过程中的经验的 慢慢积累的
C#调用WebService的问题。。。
因系统升级需要,现在我要在本地实现WebService的数据传递。WebService已经写好了,我就是用C#<em>调用</em>WebServicernrn现在的问题是提供的WebService与我不在一个局域网中,而他们的WebService也没有在WEB中开放,我在这种情况下能否实现程序的正确编码,难道一定要去现场才能实现吗???rnrn我现在根据IP和服务名模拟了一个WebService,生成后的项目DLL文件发过去数据没有被处理,而且没也没有任何返回值,郁闷中。。。。rnrn请教高手指点,我分不多,帮个忙了。谢谢!!!
2009年淘宝网J2EE面试题集锦(附答案)下载
2009年淘宝网J2EE面试题集锦(附答案) 相关下载链接:[url=//download.csdn.net/download/luzude/2879291?utm_source=bbsseo]//download.csdn.net/download/luzude/2879291?utm_source=bbsseo[/url]
CollabNetSubversion-client-1.7.3-2.x86_64.rpm [注意这是 64 位的]下载
*** 注意这是用于 64 位 linux 操作系统的 *** *** 1.7.x 需要升级原先 1.6.x 的工作库后才能正常工作,参见下面的例子 *** CollabNet 官方提供的用于 linux 的 Subversion 客户端。 安装目录是在 /opt/CollabNet_Subversion 下。 建议为 svn 创建软连接: ln -s -f /opt/CollabNet_Subversion/bin/svn /usr/bin/svn 下面是 1.7.3 在 CentOS 5.7 下运行的示例: [root@centos bin]# uname -sr Linux 相关下载链接:[url=//download.csdn.net/download/lovetide/4076221?utm_source=bbsseo]//download.csdn.net/download/lovetide/4076221?utm_source=bbsseo[/url]
深入浅出ExtJS下载
这个是关于EXT文件的内容,讲述的是EXTJS的第二版内容,本内容与人民邮电出版社书籍相同。 相关下载链接:[url=//download.csdn.net/download/u012202950/6301105?utm_source=bbsseo]//download.csdn.net/download/u012202950/6301105?utm_source=bbsseo[/url]
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件
我们是很有底线的