android webservice调用ksoap2出错 [问题点数:40分,结帖人w1027296673]

Bbs1
本版专家分:0
结帖率 83.33%
Bbs1
本版专家分:0
Bbs1
本版专家分:0
KSoap2调用WebService异常
String method="add";rnString nameSpace="http://tempuri.org/";rnString SOAP_ACTION="http://tempuri.org/add";rnString serviceUrl="http://10.10.50.7<em>2</em>/abs/abs.dll/wsdl/ITABS"; rnLog.d(TAG,"new Request ");rnSoapObject request = new SoapObject(nameSpace, method); rnrequest.addProperty("id", id);rnrequest.addProperty("la", lat); rnrequest.addProperty("ln", lng);rnrequest.addProperty("time", time);rnSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);rnenvelope.bodyOut = request;rnHttpTransportSE ht = new HttpTransportSE(serviceUrl); rn tryrn rn Log.d(TAG,"my_Webservice Call"); rn ht.call(null, envelope);rn rn catch (Exception ep)rn rn Log.d(TAG,"my_webservcie_Error: "+ep.getMessage());rn rn rnrn异常:rn org.xmlpull.v1.XmlPullParserException: expected: START_TAG rnhttp://schemas.xmlsoap.org/soap/envelope/rnEnvelope (rnposition:START_TAG rn@<em>2</em>:349 in java.io.InputStreamReader@44f08f50) rnrnrn说明:rn Delphi 7 开发的WebService+IIS,使用delphi <em>调用</em>正常,<em>android</em> Eclipse+KSoap<em>2</em>
ksoap2调用webservice的问题
大神们好,小弟在使用<em>ksoap</em><em>2</em><em>调用</em><em>webservice</em>的接口时遇到问题,该<em>webservice</em>的参数为对象,我在网上查是说需要将传入的参数进行序列化。但是我依葫芦画瓢没成功。rn[code=java]String serverurl = "http://19<em>2</em>.168.1.8<em>2</em>:7001/test/print?wsdl";rn String namespace = "http://print.ws.prt.tplife.com/";rn String methodName = "getPostList";rn rn PostListInfoIn aPostListInfoIn = new PostListInfoIn(); rn rn HttpTransportSE httpTranstation = new HttpTransportSE(serverurl);rn httpTranstation.debug = true;rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rn SoapObject soapObject = new SoapObject(namespace, methodName);rn soapObject.addProperty("arg0", aPostListInfoIn);rn envelope.addMapping(namespace, "arg0", aPostListInfoIn.getClass());rn envelope.bodyOut = soapObject;rn envelope.dotNet = true;rn try rn httpTranstation.call(namespace + methodName, envelope);rnrn if (envelope.getResponse() != null) rn Object result = envelope.getResponse();rn return result;rn rn catch (Exception e)rn rn e.printStackTrace();rn rn[/code]rn报错信息指向httpTranstation.call(namespace + methodName, envelope)这个函数里。rn报错信息:[img=http://img.my.csdn.net/uploads/<em>2</em>01301/04/1357<em>2</em>68198_<em>2</em>130.jpg][/img]rn我用.NET WebService Studio工具查看了我<em>调用</em>的方法的信息:[img=http://img.my.csdn.net/uploads/<em>2</em>01301/04/1357<em>2</em>68471_1406.jpg][/img]rn请问:我要如何改代码,才能正确的<em>调用</em>到<em>webservice</em>的接口呢?
使用KSOAP2调用WebService
WebService 是一种基于SOAP协议的远程<em>调用</em>标准。在Android SDK中并没有提供<em>调用</em>WebService的库,因此,需要使用第三方类库(KSOAP<em>2</em>)来<em>调用</em>WebService。本文将介绍在Android 中<em>调用</em>WebService的具体细节,并在最后给出一个完整的例子来演示如何使用KSOAP<em>2</em>来<em>调用</em>WebService。
Android 访问WebService 用ksoap2出错
代码如下[code=java] public String HelloWorld() throws IOException,rn XmlPullParserExceptionrnrn rnSoapObject request = new SoapObject("http://tempuri.org/",rn "HelloWorld");rn//request.addProperty("userId", userId);rn//request.addProperty("password", password);rnrnSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER1<em>2</em>);rnenvelope.dotNet = true;rnenvelope.bodyOut = request;rnrnHttpTransportSE ht = new HttpTransportSE(rn "http://19<em>2</em>.168.0.101:1010/CB_Service.asmx");rnrnLog.i(Tag, Mes+"1");rnht.call(null, envelope);rnLog.i(Tag, Mes+"<em>2</em>");rnObject ret = envelope.getResponse();rnLog.i(Tag, Mes+"3");rnif (ret != null) return ret.toString();rnelse return "";rn[/code]rnrn在ht.call(null, envelope); <em>出错</em>rn错误信息是 SoceketException:socket failed
ksoap2完整版jar包 Android调用webservice
完整版<em>ksoap</em><em>2</em>.jar包,Android<em>调用</em><em>webservice</em>需要的第三方jar包
androidksoap2调用远程webservice问题
做了个天气预报跟手机归属查询的,都OK没问题了,现在做另一个,需要用户名及密码登录的,现在登录就用rnrpc.addProperty("UserName", "xxxxxxx");rnrpc.addProperty("Password", "xxxxxxx");rnenvelope.encodingStyle="UTF-8";这个编码也设了rn用SoapObject result = (SoapObject) envelope.bodyIn;会直接跳出来rn如果用Object result=envelope.bodyIn;不会跳出,我把错误打印出来rnsoapfault- faultcode:'soap:server' faultstring;'server was unable to process request.-rnobject reference not set to an instance of an object.'faultactor:'null' detail:org.kxm1<em>2</em>.kdom.node@44f311<em>2</em>0rn搞了一天了也不知道什么原因,我是新手,希望大家帮一下忙呀,到处问人都没人理呀。
在Android 中使用KSOAP2调用WebService
在Android 中使用KSOAP<em>2</em><em>调用</em>WebService.docx
Android 开发记录 webservice调用ksoap2框架
1. 引入项目包:<em>ksoap</em><em>2</em>-<em>android</em>-assembly-<em>2</em>.5.7.jar   <em>2</em>. java程序:     protected ResultDO callWebservice(String <em>webservice</em>Url, SoapObject soapObject){ //创建HttpTransportSE对象,通过HttpTransportSE类的构...
Android 使用ksoap2调用Webservice实例
使用<em>ksoap</em><em>2</em><em>调用</em>Webservice实例 需将lib文件夹设置为源文件夹 在AndroidManifest.xml文件中加入
android中使用KSOAP2调用webservice
简述在<em>android</em>中使用<em>ksoap</em><em>2</em><em>调用</em><em>webservice</em>的方法
Android调用Webservice使用的ksoap2
Android通过Ksoap包的方法 <em>调用</em>了 .net webserivce
WebService利用KSoap2调用天气预报接口
转载:[url]http://www.cnblogs.com/ghj1976/archive/<em>2</em>011/04/<em>2</em>6/<em>2</em>0<em>2</em>8904.html[/url] 效果图: [img]http://dl.iteye.com/topics/download/c733844a-813b-3456-9457-<em>2</em>c670e34<em>2</em>803[/img] [b]使用的<em>ksoap</em>包在附件[/b] [b]KSO...
android调用webservice出错
[img=https://img-bbs.csdn.net/upload/<em>2</em>01305/0<em>2</em>/1367479871_846990.png][/img]rnrnLogcat已贴出 [img=https://img-bbs.csdn.net/upload/<em>2</em>01305/0<em>2</em>/1367479959_<em>2</em>995<em>2</em>9.png][/img] <em>调用</em><em>webservice</em>时进入catch里面 报500错 求大神解决。。。
android ksoap2调用wcf出错,急。。。。
String result = "";rn SoapObject rpc = new SoapObject("http://tempuri.org/", "UserLogin");rn rpc.addProperty("loginName", "aaa");rn rpc.addProperty("pwd", "bbb");rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);rn envelope.bodyOut = rpc;rn envelope.dotNet = true;rn envelope.setOutputSoapObject(rpc);rn HttpTransportSE ht = new HttpTransportSE("http://19<em>2</em>.168.<em>2</em>00.31:80<em>2</em><em>2</em>/HuoYanAgentVehicleService.svc"); rn ht.debug = true;rn try rn ht.call("http://tempuri.org/IHuoYanAgentVehicleService/UserLogin", envelope);//这里<em>出错</em>rn if(envelope.getResponse()!=null)rn SoapPrimitive response = (SoapPrimitive) envelope.getResponse();rn result = response.toString();rn rn System.out.println("detail" + result);rn return result;rn catch (IOException e) rn e.printStackTrace();rn catch (XmlPullParserException e) rn // TODO Auto-generated catch blockrn System.out.println("*******"+ ht.requestDump.toString());rn System.out.println("*******"+ ht.responseDump.toString()); rn e.printStackTrace();rn rnrn错误描述:rnorg.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@40890440) rnhttp://19<em>2</em>.168.<em>2</em>00.31:80<em>2</em><em>2</em>/HuoYanAgentVehicleService.svc为<em>webservice</em>可访问rn那位大侠帮看看啊
WebService利用KSoap2调用接口
[img]http://dl.iteye.com/topics/download/cf17031<em>2</em>-03f0-35f0-9e77-6b46c43a60c7[/img] [b]Android端例子:[/b] [b]首先先设置AndroidManifest.xml赋予访问网络权限[/b] [code=&quot;xml&quot;][/code] 主Activity内容: [code=&quot;java&quot;]pa...
java调用webservice(axis + ksoap2
java<em>调用</em><em>webservice</em>的例子,axis + <em>ksoap</em><em>2</em>。 一个.java文件 + 引用的jar包。 在Android开发中使用时须另开子线程进行。
android ksoap2 3.6 webservice专用
这个是<em>android</em> <em>webservice</em>所需要的jar包,这个是3.6版本,应该是比较新的
android使用KSOAP2连接webservice
<em>android</em>开始连接<em>webservice</em>都问题,搁置了一段时间后再运行,结果返回就是null值。报java.net.SocketException: sendto failed: ECONNRESET (Connection reset by peer)错误。rn请大神吗帮忙解决
用java编写webservice,并使用ksoap2 for android 调用WebService
用java编写<em>webservice</em>,并使用<em>ksoap</em><em>2</em> for <em>android</em> <em>调用</em>WebService
Android调用webservice出错记录
由于最近在写<em>android</em>接口,看了很多网上有关<em>ksoap</em>的博客,参考了一些源代码,犯了很多错,也查了不少东西。每当解决一个问题,粗心的我又会犯下一个,错误的解决办法总是那么难找到,仅此记录,有需要的朋友们可以借鉴。在我犯下的错误中,大致可以分为四类,一是<em>webservice</em>提供接口代码有错,二是<em>android</em>端代码有错,三是设备(手机&服务器)网络设置有误,四是网络有问题。第一类,很容易测试,让后
急啊ksoap2调用webservice出错soapenv:Server' faultstring
[code=Java]/* WebService方式上传 */rn public boolean uploadFile<em>2</em>WebSvr(String filePath)rn boolean result = false;rn try rn File file = new File(filePath);rn FileInputStream fis = new FileInputStream(file); rn ByteArrayOutputStream baos = new ByteArrayOutputStream(); rn byte[] buffer = new byte[(int)file.length()]; rn int count = 0; rn while((count = fis.read(buffer)) >= 0) rn baos.write(buffer, 0, count); rn rn String uploadBuffer = new String(Base64.encodeBase64(buffer)); //进行Base64编码 rn connectWebService(uploadBuffer); //<em>调用</em><em>webservice</em> rn Log.i("connectWebService", "start"); rn fis.close(); rn catch (FileNotFoundException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn catch (IOException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn return result;rn rn rn rn private boolean connectWebService(String imageBuffer) rn // 命名空间,即服务器端得接口,注:后缀没加 .wsdlrn boolean r = false;rn String namespace = "http://method.service.com"; rn String url = "http://19<em>2</em>.168.1.<em>2</em>36:8080/axis<em>2</em>/services/Upload"; //对应的url rn String methodName = "UpdateImage";rn //以下就是 <em>调用</em>过程了,不明白的话 请看相关<em>webservice</em>文档 rn SoapObject request = new SoapObject(namespace, methodName);rn request.addProperty("name", "aaa.jpg");rn request.addProperty("image", imageBuffer); //参数<em>2</em> 图片字符串 rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( rn SoapEnvelope.VER11); rn// envelope.dotNet = false; rn envelope.setOutputSoapObject(request); rn AndroidHttpTransport httpTranstation = new AndroidHttpTransport(url); rn try rn httpTranstation.call(namespace, envelope);//说是这里<em>出错</em>rn SoapObject result = (SoapObject) envelope.getResponse();rn r = Boolean.valueOf(result.getProperty("return").toString());rn// Object result = envelope.getResponse(); rn Log.i("connectWebService", result.toString()); rn catch (Exception e) rn e.printStackTrace(); rn rn return r; rn [/code]rn错误代码rn[code=XML]0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): SoapFault - faultcode: 'soapenv:Server' faultstring: 'org.apache.commons.codec.binary.Base64.decodeBase64(Ljava/lang/String;)[B' faultactor: 'null' detail: org.kxml<em>2</em>.kdom.Node@45054f90rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at org.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:11<em>2</em>)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at org.<em>ksoap</em><em>2</em>.SoapEnvelope.parse(SoapEnvelope.java:137)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at org.<em>ksoap</em><em>2</em>.transport.Transport.parseResponse(Transport.java:63)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE.call(HttpTransportSE.java:100)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at com.wk.photograph.Upload.connectWebService(Upload.java:<em>2</em>87)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at com.wk.photograph.Upload.uploadFile<em>2</em>WebSvr(Upload.java:<em>2</em>57)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at com.wk.photograph.Upload$<em>2</em>.onClick(Upload.java:185)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at com.<em>android</em>.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at <em>android</em>.os.Handler.dispatchMessage(Handler.java:99)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at <em>android</em>.os.Looper.loop(Looper.java:1<em>2</em>3)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.341: W/System.err(683): at <em>android</em>.app.ActivityThread.main(ActivityThread.java:46<em>2</em>7)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.35<em>2</em>: W/System.err(683): at java.lang.reflect.Method.invokeNative(Native Method)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.35<em>2</em>: W/System.err(683): at java.lang.reflect.Method.invoke(Method.java:5<em>2</em>1)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.35<em>2</em>: W/System.err(683): at com.<em>android</em>.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.35<em>2</em>: W/System.err(683): at com.<em>android</em>.internal.os.ZygoteInit.main(ZygoteInit.java:6<em>2</em>6)rn0<em>2</em>-<em>2</em>9 0<em>2</em>:51:<em>2</em><em>2</em>.35<em>2</em>: W/System.err(683): at dalvik.system.NativeStart.main(Native Method)rn[/code]
Android(Ksoap2)调用Service文档
Android(Ksoap<em>2</em>)<em>调用</em>Service说明文档
在OPhone 中使用KSOAP2调用WebService
详细讲解了怎么在OPhone 中使用KSOAP<em>2</em><em>调用</em>WebService 附有例子
关于 ksoap2调用 webservice 遇到的一些问题
拿到了 <em>webservice</em> 接口<em>调用</em> 不算完整的文档 当用 <em>ksoap</em><em>2</em> 写好代码 ,去<em>调用</em> <em>webservice</em> 遇到 服务器返回 500 的错误码 解决方案: 可能是 <em>ksoap</em><em>2</em>的 jar包有问题, 换一个试试(虽然原来用的这个jar是好着的,但是这次做的时候 怎么都是500.网上细细查询后,才说换个 jar包试试,换了后确实好了,可能也跟<em>webservice</em>服务器有关系吧,毕
ksoap2调用webService出现错误
org.xmlpull.v1.XmlPullParserException: expected: START_TAG http://schemas.xmlsoap.org/soap/envelope/Envelope (position:START_TAG @<em>2</em>:7 in java.io.InputStreamReader@4054bca0) rn我用<em>ksoap</em><em>2</em>访问.net的<em>webservice</em>出现这个错误,把<em>webservice</em>放到服务器上用域名访问和修改版本到v10都没用,残念。。。。。求解救啊
安卓调用WebService(ksoap2)-飞机航班Dome
适合新手学习交流,布局不是很好,工具类封装! 安卓<em>调用</em>WebService(<em>ksoap</em><em>2</em>)-飞机航班Dome
使用ksoap2调用webservice java.io.EOFException问题
rn使用<em>ksoap</em><em>2</em><em>调用</em><em>webservice</em>(.NET),可以<em>调用</em>成功,但经常会返回java.io.EOFExceptionrnrnrn错误返回处代码如下:rn[code=java] rn try rn rn <em>android</em>HttpTransport.call(SOAP_ACTION, envelope); rn catch (Exception e) rn e.printStackTrace(); rn rn rn[/code]rnrnrn求解啊,可以<em>调用</em>成功,但经常返回EOFExceptionrnrn
使用ksoap2调用WebService在android4.0环境异常
如题,请救助。rn说明:使用<em>2</em>.<em>2</em>、<em>2</em>.3的手机可正常<em>调用</em>WebServicern为什么4.0的就不行了呢?求高手指点?
Android Ksoap2调用WebService怎么得到List对象
其实就是一个WebService返回结果怎么转换成List的问题,我是一直搞C#的,Java不熟rn下面是代码 rnrnWebService方法原型 [code=Java] ListgetBuildingsByAccountName(String accountName);[/code]rnJava代码<em>调用</em>如下:rn [code=Java] String method = "getBuildingsByAccountName";//方法名称rn List params = new ArrayList();rn params.add(new BasicNameValuePair("accountName", String.valueOf("max")));rnrn retrurn WSHelper.GetResponse(method,params);[/code]rn下面是WSHelper类rn[code=Java]public class WSHelper rn final static String WSUrl="http://19<em>2</em>.168.5.<em>2</em>5:8080/automation/services/equipService?wsdl";rn rn private static String namespace = "http://<em>webservice</em>.device.automation.zhaohai.com/";rn /*************************************rn * 获取web services内容rn * @param urlrn * @param paramsrn * @returnrn *************************************/rn @SuppressWarnings("deprecation")rn public static List GetResponse(String method,List params)rn rn try rn rn String url = WSUrl;rn SoapObject request = new SoapObject(namespace, method);rn for(int i=0,len=params.size();i list;rn if(envelope.getResponse() != null)rn rn SoapObject soapObject = (SoapObject) envelope.getResponse(); rn //List list = envelope. //这里不知道怎么写了rn //List list=soapObject.getClass();//这样写是错的rn // 通过getProperty下面这种方法可以得到类中属性的值 ,但要重新实例化一个Building,就太耗资源了,rn //所有肯定有直接获得List的方法rn result += "building名称:" + soapObject.getProperty("name") + "\n"; rn result += "ID:" + soapObject.getProperty("pid") + "\n"; rn rn else result="no value";rn return list;rn catch (Exception e) rn return null;rn rn rn[/code]rn
Android用ksoap2调用Webservice怎么传递List集合参数?
最近用到<em>ksoap</em><em>2</em><em>调用</em>Webservice获取数据,需要传递一些参数过去,除了基本类型的参数,还有List集合参数,各种试都报错,求教怎么传递List集合参数?
WebService ksoap2列车时刻表.zip
本项目是一个基于安卓的查询列车时刻表的小项目源码,使用http://<em>webservice</em>.webxml.com.cn/WebServices/TrainTimeWebService.asmx接口提供的列车数据,结合<em>ksoap</em><em>2</em>进行数据解析。可以查询两站之间的车次信息和指定车次的到站信息。
Android 手札:使用Ksoap2框架调用WebService速成
一、前提 1、在PC端创建WebService服务,别忘了记下WebService服务的URL地址,相关步骤可参照百度的相关教程。 <em>2</em>、可将WebsService服务发布至外网或内网,若条件有限,只求实现功能,最简单的办法: (1)在PC端通过”猎豹免费WiFi“等软件开启网络热点,由移动设备连接。 (<em>2</em>)在移动端开启热点,由PC端连接。 (3)使用AVD模拟器无需考虑,默认的AVD模拟...
Android利用KSOAP2调用现有的webservice问题
请问有谁做过吗?我在网上找了好多例子,但是转到自己的电脑上总是有问题,实在搞不懂为什么,请教大家。。。rnrnpackage <em>webservice</em>.weather;rnrnimport org.<em>ksoap</em><em>2</em>.SoapEnvelope;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapObject;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope;rnimport org.<em>ksoap</em><em>2</em>.transport.AndroidHttpTransport;rnrnimport <em>android</em>.app.Activity;rnimport <em>android</em>.app.AlertDialog;rnimport <em>android</em>.app.Dialog;rnimport <em>android</em>.content.DialogInterface;rnimport <em>android</em>.os.Bundle;rnimport <em>android</em>.text.method.LinkMovementMethod;rnimport <em>android</em>.util.Log;rnimport <em>android</em>.view.Menu;rnimport <em>android</em>.view.MenuItem;rnimport <em>android</em>.view.View;rnimport <em>android</em>.widget.Button;rnimport <em>android</em>.widget.EditText;rnimport <em>android</em>.widget.ImageView;rnimport <em>android</em>.widget.TextView;rnrnpublic class WeatherActivity extends Activity rn private static String LOG_TAG = "Weather";rn private static boolean DEBUG = false;rn private static final int SHOW_ABOUT = 0x0001;rn private static final String NAMESPACE = "http://WebXml.com.cn/";rnrn private static String URL = "http://www.webxml.com.cn/<em>webservice</em>s/weather<em>webservice</em>.asmx";rn private static final String METHOD_NAME = "getWeatherbyCityName";rn private static String SOAP_ACTION = "http://WebXml.com.cn/getWeatherbyCityName";rnrn private String weatherToday;rn private String weatherTomorrow;rn private String weatherAfterday;rn private String weatherCurrent;rn private int iconToday[] = new int[<em>2</em>];rn private int iconTomorrow[] = new int[<em>2</em>];rn private int iconAfterday[] = new int[<em>2</em>];rnrn private Button okButton;rn private EditText textInput;rn private ImageView imageView1;rn private ImageView imageView<em>2</em>;rn private TextView textWeatherToday;rn private ImageView imageView3;rn private ImageView imageView4;rn private TextView textWeatherTomorrow;rn private ImageView imageView5;rn private ImageView imageView6;rn private TextView textWeatherAfterday;rn private TextView textWeatherCurrent;rnrn /** Called when the activity is first created. */rn @Overridern public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main);rnrn okButton = (Button) findViewById(R.id.WeatherSearch);rn textInput = (EditText) findViewById(R.id.TextWeather);rn imageView1 = (ImageView) findViewById(R.id.ImageView01);rn imageView<em>2</em> = (ImageView) findViewById(R.id.ImageView0<em>2</em>);rn textWeatherToday = (TextView) findViewById(R.id.WeatherToday);rn imageView3 = (ImageView) findViewById(R.id.ImageView03);rn imageView4 = (ImageView) findViewById(R.id.ImageView04);rn textWeatherTomorrow = (TextView) findViewById(R.id.WeatherTomorrow);rn imageView5 = (ImageView) findViewById(R.id.ImageView05);rn imageView6 = (ImageView) findViewById(R.id.ImageView06);rn textWeatherAfterday = (TextView) findViewById(R.id.WeatherAfterday);rn textWeatherCurrent = (TextView) findViewById(R.id.WeatherCurrent);rnrn okButton.setOnClickListener(new Button.OnClickListener() rn public void onClick(View v) rn showWeather();rn rn );rn rnrn private void showWeather() rn String city = textInput.getText().toString();rn if (city.length() == 0)rn city = "杭州";rn getWeather(city);rnrn textWeatherToday.setText(getWeatherToday());rn imageView1.setImageResource(getIconToday(0));rn imageView<em>2</em>.setImageResource(getIconToday(1));rnrn textWeatherTomorrow.setText(getWeatherTomorrow());rn imageView3.setImageResource(getIconTomorrow(0));rn imageView4.setImageResource(getIconTomorrow(1));rnrn textWeatherAfterday.setText(getWeatherAfterday());rn imageView5.setImageResource(getIconAfterday(0));rn imageView6.setImageResource(getIconAfterday(1));rnrn textWeatherCurrent.setText(getWeatherCurrent());rn rnrn public void getWeather(String cityName) rn try rn [color=#FF0000]SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);[/color]rn rpc.addProperty("theCityName", cityName);rnrn AndroidHttpTransport ht = new AndroidHttpTransport(URL);rn ht.debug = true;rnrn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rnrn envelope.bodyOut = rpc;rn envelope.dotNet = true;rn envelope.setOutputSoapObject(rpc);rnrn ht.call(SOAP_ACTION, envelope);rnrn debug(LOG_TAG, "DUMP>> " + ht.requestDump);rn debug(LOG_TAG, "DUMP<< " + ht.responseDump);rnrn SoapObject result = (SoapObject) envelope.bodyIn;rn SoapObject detail = (SoapObject) resultrn .getProperty("getWeatherbyCityNameResult");rnrn parseWeather(detail);rn return;rn catch (Exception e) rn e.printStackTrace();rn rn rnrn private void parseWeather(SoapObject detail) rn String date = detail.getProperty(6).toString();rn weatherToday = "今天:" + date.split(" ")[0];rn weatherToday = weatherToday + "\n天气:" + date.split(" ")[1];rn weatherToday = weatherToday + "\n气温:"rn + detail.getProperty(5).toString();rn weatherToday = weatherToday + "\n风力:"rn + detail.getProperty(7).toString() + "\n";rn iconToday[0] = parseIcon(detail.getProperty(8).toString());rn iconToday[1] = parseIcon(detail.getProperty(9).toString());rnrn weatherCurrent = detail.getProperty(10).toString();rnrn date = detail.getProperty(13).toString();rn weatherTomorrow = "明天:" + date.split(" ")[0];rn weatherTomorrow = weatherTomorrow + "\n天气:" + date.split(" ")[1];rn weatherTomorrow = weatherTomorrow + "\n气温:"rn + detail.getProperty(1<em>2</em>).toString();rn weatherTomorrow = weatherTomorrow + "\n风力:"rn + detail.getProperty(14).toString() + "\n";rn iconTomorrow[0] = parseIcon(detail.getProperty(15).toString());rn iconTomorrow[1] = parseIcon(detail.getProperty(16).toString());rnrn date = detail.getProperty(18).toString();rn weatherAfterday = "后天:" + date.split(" ")[0];rn weatherAfterday = weatherAfterday + "\n天气:" + date.split(" ")[1];rn weatherAfterday = weatherAfterday + "\n气温:"rn + detail.getProperty(17).toString();rn weatherAfterday = weatherAfterday + "\n风力:"rn + detail.getProperty(19).toString() + "\n";rn iconAfterday[0] = parseIcon(detail.getProperty(<em>2</em>0).toString());rn iconAfterday[1] = parseIcon(detail.getProperty(<em>2</em>1).toString());rn rnrn public String getWeatherToday() rn debug(LOG_TAG, "weatherToday: " + weatherToday);rn return weatherToday;rn rnrn public String getWeatherTomorrow() rn debug(LOG_TAG, "weatherTomorrow: " + weatherTomorrow);rn return weatherTomorrow;rn rnrn public String getWeatherAfterday() rn debug(LOG_TAG, "weatherAfterday: " + weatherAfterday);rn return weatherAfterday;rn rnrn public String getWeatherCurrent() rn debug(LOG_TAG, "weatherCurrent: " + weatherCurrent);rn return weatherCurrent;rn rnrn public int getIconToday(int index) rn return iconToday[index];rn rnrn public int getIconTomorrow(int index) rn return iconTomorrow[index];rn rnrn public int getIconAfterday(int index) rn return iconAfterday[index];rn rnrn private int parseIcon(String strIcon) rn if (strIcon == null)rn return -1;rnrn if ("0.gif".equals(strIcon))rn return R.drawable.a_0;rn if ("1.gif".equals(strIcon))rn return R.drawable.a_1;rn if ("<em>2</em>.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>;rn if ("3.gif".equals(strIcon))rn return R.drawable.a_3;rn if ("4.gif".equals(strIcon))rn return R.drawable.a_4;rn if ("5.gif".equals(strIcon))rn return R.drawable.a_5;rn if ("6.gif".equals(strIcon))rn return R.drawable.a_6;rn if ("7.gif".equals(strIcon))rn return R.drawable.a_7;rn if ("8.gif".equals(strIcon))rn return R.drawable.a_8;rn if ("9.gif".equals(strIcon))rn return R.drawable.a_9;rn if ("10.gif".equals(strIcon))rn return R.drawable.a_10;rn if ("11.gif".equals(strIcon))rn return R.drawable.a_11;rn if ("1<em>2</em>.gif".equals(strIcon))rn return R.drawable.a_1<em>2</em>;rn if ("13.gif".equals(strIcon))rn return R.drawable.a_13;rn if ("14.gif".equals(strIcon))rn return R.drawable.a_14;rn if ("15.gif".equals(strIcon))rn return R.drawable.a_15;rn if ("16.gif".equals(strIcon))rn return R.drawable.a_16;rn if ("17.gif".equals(strIcon))rn return R.drawable.a_17;rn if ("18.gif".equals(strIcon))rn return R.drawable.a_18;rn if ("19.gif".equals(strIcon))rn return R.drawable.a_19;rn if ("<em>2</em>0.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>0;rn if ("<em>2</em>1.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>1;rn if ("<em>2</em><em>2</em>.gif".equals(strIcon))rn return R.drawable.a_<em>2</em><em>2</em>;rn if ("<em>2</em>3.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>3;rn if ("<em>2</em>4.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>4;rn if ("<em>2</em>5.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>5;rn if ("<em>2</em>6.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>6;rn if ("<em>2</em>7.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>7;rn if ("<em>2</em>8.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>8;rn if ("<em>2</em>9.gif".equals(strIcon))rn return R.drawable.a_<em>2</em>9;rn if ("30.gif".equals(strIcon))rn return R.drawable.a_30;rn if ("31.gif".equals(strIcon))rn return R.drawable.a_31;rnrn return 0;rn rnrn private static void debug(String tag, String msg) rn if (DEBUG)rn Log.d(tag, msg);rn rnrn private void showAbout() rn TextView textAbout = new TextView(this);rn textAbout.setText(R.string.about_text);rn textAbout.setMovementMethod(LinkMovementMethod.getInstance());rnrn Dialog dlg = new AlertDialog.Builder(this)rn .setTitle(R.string.app_about)rn .setView(textAbout)rn .setPositiveButton(R.string.about_ok,rn new DialogInterface.OnClickListener() rn public void onClick(DialogInterface dialog,rn int whichButton) rn rn ).create();rn dlg.show();rn rnrn public boolean onCreateOptionsMenu(Menu menu) rn menu.add(0, SHOW_ABOUT, 0, R.string.app_about);rn return true;rnrn rnrn public boolean onOptionsItemSelected(MenuItem item) rn switch (item.getItemId()) rn case SHOW_ABOUT:rn showAbout();rn return true;rn rn return false;rn rnrnrn代码中的红色部分抛出异常,请问为什么啊?
Android通过ksoap2这个框架调用webservice大讲堂
昨天有人问我Android怎么连接mysql数据库,和对数据库的操作呀,我想把,给他说说json通信,可是他并不知道怎么弄,哎算了吧,直接叫他用<em>ksoap</em>吧,给他说了大半天,好多零碎的知识,看来还是有必要把这些东西整合起来,一方面自己有时候也看,另一方面当然是能帮助没有做个的小伙伴,其实东西不是很多,就是讲的有点详细,不怕多,就怕不仔细, WebServices简介 Web services是一
Android使用KSOAP2调用WebService及正确导入jar包的问题
最近在学Android使用KSOAP<em>2</em><em>调用</em>现有的Webservice的方法,期间在网上找了很多代码,但是每次在Android模拟器中运行的时候程序都会崩溃,搞得自己都快崩溃了。。。。    查看了一下LogCat中的错误报告,发现是下面的错误是程序崩溃的:ERROR/Androi
android ksoap2调用webservice android端代码应该怎么写 跪求!
这是我在别人那里拔下来的代码 可以连接<em>webservice</em> 我想修改成可以返回数据库数据的 <em>webservice</em>已经可以实现查询数据库 只是在这我不会改 求求你们帮帮我 在线等 如果可以我发红包感谢 谢谢大家了rnpackage com.bang.test<em>webservice</em>call;rnrnimport java.io.IOException;rnimport java.util.Dictionary;rnimport java.util.HashMap;rnimport java.util.Iterator;rnimport java.util.Map;rnrnimport org.<em>ksoap</em><em>2</em>.SoapEnvelope;rnimport org.<em>ksoap</em><em>2</em>.SoapFault;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapObject;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapPrimitive;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope;rnimport org.<em>ksoap</em><em>2</em>.transport.HttpResponseException;rnimport org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE;rnimport org.xmlpull.v1.XmlPullParserException;rnrnimport <em>android</em>.os.AsyncTask;rnimport <em>android</em>.os.Bundle;rnimport <em>android</em>.app.Activity;rnimport <em>android</em>.util.Log;rnimport <em>android</em>.view.Menu;rnimport <em>android</em>.view.MenuItem;rnimport <em>android</em>.view.View;rnimport <em>android</em>.view.View.OnClickListener;rnimport <em>android</em>.widget.Button;rnimport <em>android</em>.widget.TextView;rnimport <em>android</em>.support.v4.app.NavUtils;rnrnpublic class MainActivity extends Activity rn TextView tvMessage;rn final String METHOD_HELLO_WORLD = "HelloWorld"; rn final String METHOD_ECHO_MESSAGE = "selectAllCargoInfor";rn //服务器链接rn final String WEB_SERVICE_URL = "http://19<em>2</em>.168.<em>2</em>.160:8080/Service1.asmx?WSDL";rn final String Namespace = "http://19<em>2</em>.168.<em>2</em>.160/";//命名空间rn @Overridern public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn initBtn();// 初始化按钮rn initTv();rn rnrn private void initTv() rn tvMessage = (TextView) this.findViewById(R.id.tvMessage);rn rnrn private void initBtn() rn View btnHelloWorld = this.findViewById(R.id.btnHelloWorld);rn btnHelloWorld.setOnClickListener(new OnClickListener() rnrn @Overridern public void onClick(View v) rnrn Map values = new HashMap();rn values.put("selectAllCargoInforResule", "");rn Request(METHOD_HELLO_WORLD);rn rn );rnrn View btnEchoMessage = this.findViewById(R.id.btnEchoMessage);rn btnEchoMessage.setOnClickListener(new OnClickListener() rn @Overridern public void onClick(View v) rn Map values = new HashMap();rn values.put("msg", "这是Android手机发出的信息");rn Request(METHOD_ECHO_MESSAGE, values);rn rn );rn rnrn @Overridern public boolean onCreateOptionsMenu(Menu menu) rn getMenuInflater().inflate(R.menu.activity_main, menu);rn return true;rn rnrn /**rn * <em>调用</em>WebServicern * rn * @return WebService的返回值rn * rn */rn public String CallWebService(String MethodName, Map Params) rn // 1、指定<em>webservice</em>的命名空间和<em>调用</em>的方法名rn rn SoapObject request = new SoapObject(Namespace, MethodName);rn // <em>2</em>、设置<em>调用</em>方法的参数值,如果没有参数,可以省略,rn if (Params != null) rn Iterator iter = Params.entrySet().iterator();rn while (iter.hasNext()) rn Map.Entry entry = (Map.Entry) iter.next();rn request.addProperty((String) entry.getKey(),rn (String) entry.getValue());rn rn rn // 3、生成<em>调用</em>Webservice方法的SOAP请求信息。该信息由SoapSerializationEnvelope对象描述rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER1<em>2</em>);rn envelope.bodyOut = request;rn // c#写的应用程序必须加上这句rn envelope.dotNet = true;rn HttpTransportSE ht = new HttpTransportSE(WEB_SERVICE_URL);rn // 使用call方法<em>调用</em>WebService方法rn try rn ht.call(null, envelope);rn catch (HttpResponseException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn catch (XmlPullParserException e) rn e.printStackTrace();rn rn try rn final SoapPrimitive result = (SoapPrimitive) envelope.getResponse();rn if (result != null) rn Log.d("----收到的回复----", result.toString());rn return result.toString();rn rnrn catch (SoapFault e) rn Log.e("----发生错误---", e.getMessage());rn e.printStackTrace();rn rn return null;rn rnrn /**rn * 执行异步任务rn * rn * @param paramsrn * 方法名+参数列表(哈希表形式)rn */rn public void Request(Object... params) rn new AsyncTask() rnrn @Overridern protected String doInBackground(Object... params) rn if (params != null && params.length == <em>2</em>) rn return CallWebService((String) params[0],rn (Map) params[1]);rn else if (params != null && params.length == 1) rn return CallWebService((String) params[0], null);rn else rn return null;rn rn rnrn protected void onPostExecute(String result) rn if (result != null) rn tvMessage.setText("服务器回复的信息 : " + result);rn rn ;rnrn .execute(params);rn rnrnrn
Android 采用KSOAP2方式访问WebService
NULL 博文链接:https://topmanopensource.iteye.com/blog/1<em>2</em>90498
androidksoap2传递对象到webservice出现的问题
soapfault-faultcode:'soap:client' faultstring:'server was unable to read request.There is an error inXML document(1,<em>2</em>99). The specified type was not recognized:name='loginRequest',namespace='http://xxx.com/NorthBoundAPI',at.'faultactor:'null' detail:org.kxml<em>2</em>.kdom. Node@44e75<em>2</em>88rn谁知道是怎么错
ANDROID使用KSOAP2连接.NET发布WEBSERVICE
ANDROID使用KSOAP<em>2</em> 开发 ,使用.NET开发的WEBSERVICE
ksoap2 android (轻量级 用于和WebService通信第三方开源库)
<em>ksoap</em><em>2</em> <em>android</em>(轻量级 用于和WebService通信第三方开源库)
Android、ksoap2的WebService通信客户端demo
服务器端代码: http://blog.csdn.net/zlin3007/article/details/516933<em>2</em><em>2</em>
Android通过ksoap2进行WebService网络通信demo
一个简单封装好的小型使用<em>ksoap</em><em>2</em>进行WebService的<em>android</em>小型demo,根据其中的README.txt文档可以直接对其中进行修改
ANdroid:Ksoap2
<em>android</em> 的 <em>webservice</em> 应用到的KSoap<em>2</em> 包,包括自己修改后的可用
xfire开发webservice以及Android利用ksoap2访问webservice
xfire开发<em>webservice</em>以及Android利用<em>ksoap</em><em>2</em>访问<em>webservice</em>。包括源码和jar包
紧急求助,Ksoap2出错
上周还是好好的rn印象中也没改过什么东西rn这周就<em>出错</em>了rnSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rn这样语句执行<em>出错</em>rnrn是不是Ksoap<em>2</em>需要授权才能使用?收费的?rn还是我引用哪里<em>出错</em>了?
android调用webservice连接oracle出错,求助!
目的:想将服务器上oracle数据库表中的数据在手机上展示rn方法:做了一个<em>webservice</em>服务连接数据库,然后在<em>android</em>手机上<em>调用</em>此<em>webservice</em>rn问题:程序中没有提示错误,但一运行时程序就强制关闭,不知道问题出现在哪里?rn源码:rnpackage com.example.sayhello_wb;rnimport org.<em>ksoap</em><em>2</em>.SoapEnvelope;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapObject;rnimport org.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope;rnimport org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE;rnimport <em>android</em>.os.Bundle;rnimport <em>android</em>.os.StrictMode;rnimport <em>android</em>.annotation.SuppressLint;rnimport <em>android</em>.app.Activity;rnimport <em>android</em>.view.Menu;rnimport <em>android</em>.widget.TextView;rnrnpublic class MainActivity extends Activity rnrn private TextView mobileAddress;rn //private Button btnSearch;rn @SuppressLint("NewApi")rn @Overridern rn public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn // 命名空间 rn StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();rn StrictMode.setThreadPolicy(policy); rn String nameSpace = "http://tempuri.org/"; rn rn // <em>调用</em>的方法名称 rn String methodName = "sqldatt<em>2</em>"; rn // EndPoint rn String endPoint = "http://10.64.160.96/WsData/Service.asmx"; rn // SOAP Action rn String soapAction = "http://tempuri.org/sqldatt<em>2</em>"; rn SoapObject request = new SoapObject(nameSpace, methodName); rn request.addProperty( "name", "user id=system;data source=orcl_dz;password=xxzx");rn request.addProperty( "strsql", "select name from v$datafile");rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); rn envelope.bodyOut = request; rn HttpTransportSE ht = new HttpTransportSE(endPoint);rn rn // 设置是否<em>调用</em>的是dotNet开发的WebService rn envelope.dotNet = true; rn // 等价于envelope.bodyOut = rpc; rn envelope.setOutputSoapObject(request); rn rn rn try rn // <em>调用</em>WebService rn ht.call(soapAction, envelope); rn catch (Exception e) rn e.printStackTrace(); rn rn rn rn // 获取返回的数据 rn SoapObject object = (SoapObject) envelope.bodyIn; rn // 获取返回的结果 rn String result = object.getProperty(0).toString(); rn rn //将WebService返回的结果显示在TextView中 rn mobileAddress.setText(object.getProperty(0).toString()); rn rnrn @Overridern public boolean onCreateOptionsMenu(Menu menu) rn // Inflate the menu; this adds items to the action bar if it is present.rn getMenuInflater().inflate(R.menu.main, menu);rn return true;rn rnrnrn错误提示:java.lang.RuntimeException: Unable to start activity ComponentInfocom.example.sayhello_wb/com.example.sayhello_wb.MainActivity: java.lang.NullPointerExceptionrnrnCaused by: java.lang.NullPointerExceptionrnrn注:本人新手,接触<em>android</em>编程时间不长;rn我Q:7831<em>2</em>791 希望能和大家多多交流
[问题]android 调用webservice出错org.xmlpull.v1.XmlPullParserException
[code=Java]rnrn<em>调用</em><em>webservice</em><em>出错</em>,代码如下(返回结果是json格式字符串):rn public String getConnect(String methodName, String parameter) rn try rn SoapObject request = new SoapObject("http://service", methodName);rn request.addProperty("test", parameter);rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rn envelope.bodyOut = request;rn HttpTransportSE ht = new HttpTransportSE(HOSTADDRESS);rn ht.call(null, envelope);rn if (envelope.getResponse() != null) rn SoapObject soapObject = (SoapObject) envelope.getResponse();rn return soapObject.getAttribute(0).toString();rn rn catch (Exception e) rn e.printStackTrace();rn return null;rn rn return null;rn rn[/code]
使用ksoap2传递字符串数组到webservice
在<em>android</em>程序中有一个Web Client使用<em>ksoap</em><em>2</em>,但是还是不能把字符串数组作为一个参数传递到<em>webservice</em>中。rn贴出相关代码:rnrn String[] items="hello","world";rn request.addproperty("str",items);rn请求大家的帮忙,谢谢!
求助,调用WebService出错
请教一下 <em>webservice</em> 方法能传递实体参数吗,以及帮忙解决下以下的错误。rnrnrnSystem.Web.Services.Protocols.SoapException: 服务器无法处理请求。 - System.Data.SqlClient.SqlException: 从 char 数据类型到 datetime 数据类型的转换导致 datetime 值越界。rn语句已终止。rn 在 Education.PublicLibary.db.ExecuteSql(String SQLString) 位置 E:\tech0<em>2</em>\SubEducation\Common\Common\SqlLibary.cs:行号 151rn 在 School.DAL.ZT_JZG.Update(ZT_JZG model) 位置 E:\tech0<em>2</em>\SubEducation\ProcessCenter\DAL\ZT_JZG.cs:行号 416rn 在 ProcessCenter.ZT_JZGFunc.Update(ZT_JZG mzt) 位置 E:\tech0<em>2</em>\SubEducation\ProcessCenter\ZT_JZGFunc.cs:行号 41rn 在 Teacher.Update(String ZGH, Int3<em>2</em> FK_XX, String XM, String CYM, String SFZH, Int3<em>2</em> TKID, String userName, String userPass) 位置 E:\tech0<em>2</em>\SubEducation\School\WebInterface\Teacher.asmx.cs:行号 1<em>2</em>9rn --- 内部异常堆栈跟踪的结尾 --- 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 - System.Data.SqlClient.SqlException: 从 char 数据类型到 datetime 数据类型的转换导致 datetime 值越界。rn语句已终止。rn 在 Education.PublicLibary.db.ExecuteSql(String SQLString) 位置 E:\tech0<em>2</em>\SubEducation\Common\Common\SqlLibary.cs:行号 151rn 在 School.DAL.ZT_JZG.Update(ZT_JZG model) 位置 E:\tech0<em>2</em>\SubEducation\ProcessCenter\DAL\ZT_JZG.cs:行号 416rn 在 ProcessCenter.ZT_JZGFunc.Update(ZT_JZG mzt) 位置 E:\tech0<em>2</em>\SubEducation\ProcessCenter\ZT_JZGFunc.cs:行号 41rn 在 Teacher.Update(String ZGH, Int3<em>2</em> FK_XX, String XM, String CYM, String SFZH, Int3<em>2</em> TKID, String userName, String userPass) 位置 E:\tech0<em>2</em>\SubEducation\School\WebInterface\Teacher.asmx.cs:行号 1<em>2</em>9rn --- 内部异常堆栈跟踪的结尾 ---rnrn
Delphi 调用WebService 出错
1.新建一个App, 放上一个button, listbox, HTTPRIOrn<em>2</em>.新建<em>webservice</em>s -> wsdlInmporter 导入你这个网站的Wsdl 让程序知道<em>调用</em>规则rn 不出意外会生成个WeatherWebService.pas ,主窗体引用它rn http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdlrnrn3.设置HTTPRIO的 port, service, wsdlLocation 会下拉出来rn4.写点代码吧rn //得到支持的地区rnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn AOS,ss: ArrayOfString;rn I: Integer;rnbeginrn AOS := (HTTPRIO1 as WeatherWebServiceSoap).getSupportProvince;rn for I := Low(AOS) to High(AOS) dorn Listbox1.Items.Add(AOS[I]); -- 可以把所有省份列出来rnrn[color=#FF0000]但是使用下面代码,出现错误:[/color]rn -- 取省份下的城市rn ss := (HTTPRIO1 as WeatherWebServiceSoap).getSupportCity('广西')rn -- 取城市的天气rn ss := (HTTPRIO1 as WeatherWebServiceSoap).getWeatherbyCityName('深圳');rnrn---- 错误信息为:rnProject Project1.exe raised exception class ERemotableException with message '服务器无法处理请求。 - 未将对象引用设置到对象的实例。'. Process stopped. Use Step or Run to continue.
VB.NET调用WebService出错
从VB的UI中<em>调用</em>WebService时出了一个错误,如下rn"Validation error: If the 'nillable' attribute is false in the schema, the 'xsi:nil' attribute must not be present in the instance."rnrn Dim myService As APIServiceSoapClient = New APIServiceSoapClient("APIServiceSoap", ConfigurationManager.AppSettings("APIUrl"))rn rn myService.Method()rnrn错误发生在<em>调用</em>远程WebService中的一个method,自己估计是送过去的Request里有东西没设置好,可是不知道在什么地方。rn请高手指示如何调试我的程序。因为是第一次用Webservice,而且明天就要交东西,很急呀! 谢谢!
调用webservice出错
错误信息:rnAxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Serverrn faultSubcode: rn faultString: Error invoking 'com.asiainfo.boss4.<em>webservice</em>.OnBoss4Service.onBoss4Pboss(java.lang.String)'. Nested exception is java.lang.reflect.InvocationTargetException: nullrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/stackTrace:Error invoking 'com.asiainfo.boss4.<em>webservice</em>.OnBoss4Service.onBoss4Pboss(java.lang.String)'. Nested exception is java.lang.reflect.InvocationTargetException: nullrn at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:<em>2</em><em>2</em><em>2</em>)rn at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:1<em>2</em>9)rn at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)rn at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)rn at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at javax.xml.parsers.SAXParser.parse(Unknown Source)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:<em>2</em><em>2</em>7)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.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:6<em>2</em>)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:<em>2</em>06)rn at org.apache.axis.client.Call.invokeEngine(Call.java:<em>2</em>784)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>767)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>443)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>366)rn at org.apache.axis.client.Call.invoke(Call.java:181<em>2</em>)rn at com.asiainfo.boss4.<em>webservice</em>.OnBoss4ServiceHttpBindingStub.onBoss4Pboss(OnBoss4ServiceHttpBindingStub.java:435)rn at com.asiainfo.boss4.<em>webservice</em>.WebserviceClient.main(WebserviceClient.java:48)rnrn http://xml.apache.org/axis/hostname:3WS1F5TR5E8QLTKrnrnError invoking 'com.asiainfo.boss4.<em>webservice</em>.OnBoss4Service.onBoss4Pboss(java.lang.String)'. Nested exception is java.lang.reflect.InvocationTargetException: nullrn at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:<em>2</em><em>2</em><em>2</em>)rn at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:1<em>2</em>9)rn at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)rn at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)rn at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at javax.xml.parsers.SAXParser.parse(Unknown Source)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:<em>2</em><em>2</em>7)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.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:6<em>2</em>)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:<em>2</em>06)rn at org.apache.axis.client.Call.invokeEngine(Call.java:<em>2</em>784)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>767)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>443)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>366)rn at org.apache.axis.client.Call.invoke(Call.java:181<em>2</em>)rn at com.asiainfo.boss4.<em>webservice</em>.OnBoss4ServiceHttpBindingStub.onBoss4Pboss(OnBoss4ServiceHttpBindingStub.java:435)rn at com.asiainfo.boss4.<em>webservice</em>.WebserviceClient.main(WebserviceClient.java:48)rn
调用webservice 出错的问题
刚装的机器(番茄花园),装了.net 测试asp.net<em>调用</em><em>webservice</em>的页面<em>出错</em>,<em>调用</em>别的asp.net 页面正常,注:不是程序错误,运行quickstart中的mathservice出现同样的错误rn请问大家是怎么回事?rn错误:找不到文件或程序集 *.dll(每次运行都不一样)rnc:\winnt\temp\*.dll创建失败rnrn请高手指教rn
axis调用webservice出错!!!
我用eclipse中的<em>webservice</em> client解析wsdl地址生成客户端代码。在<em>调用</em>客户端代码时总是<em>出错</em>!nnn```n AxisFaultn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionn faultSubcode: n faultString: org.xml.sax.SAXException: Invalid element in mocha.framework.mpms.<em>webservice</em>.service.ProjectInfo - lastUpdateTimen faultActor: n faultNode: n faultDetail: n http://xml.apache.org/axis/stackTrace:org.xml.sax.SAXException: Invalid element in mocha.framework.mpms.<em>webservice</em>.service.ProjectInfo - lastUpdateTimen at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:<em>2</em>58)n at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)n at org.apache.axis.message.SAX<em>2</em>EventRecorder.replay(SAX<em>2</em>EventRecorder.java:165)n at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)n at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:<em>2</em>36)n at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)n at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>467)n at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>366)n at org.apache.axis.client.Call.invoke(Call.java:181<em>2</em>)n at mocha.framework.mpms.<em>webservice</em>.service.impl.QueryServiceImplServiceSoapBindingStub.inquireProjectInfo(QueryServiceImplServiceSoapBindingStub.java:414)n at com.zzp.Test.main(Test.java:38)n```nnnn```n n```nnnn```n n```nn
webservice客户端调用出错
用MyEclipse中的JAX-WS发布的Webservice服务,服务端使用了Mysql数据库,需要添加mysql驱动jar包,服务端测试成功后,部署同样成功,但是客户端<em>调用</em>却总显示无法找到mysql驱动jar包,而我的服务端和客户端都是添加了该包的,最后发现,服务器上也需要添加该驱动包,即只需将Mysql驱动包添加到Tomcat安装目录下的lib目录里,客户端便可正常<em>调用</em>。
[求助]webservice调用出错
我在一个spring的项目中写了一个<em>webservice</em>,发布没有问题。可是客户端<em>调用</em>时总是<em>出错</em>。异常如下:我单步调试,总是在对数据库操作的步骤抛出异常。望高人指点迷津rnAxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionrn faultSubcode: rn faultString: java.lang.NullPointerExceptionrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/hostname:jason-30b944bd0rnrnjava.lang.NullPointerExceptionrn at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:<em>2</em><em>2</em>1)rn at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:1<em>2</em>8)rn at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)rn at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)rn at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:<em>2</em><em>2</em>7)rn at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)rn at org.apache.axis.Message.getSOAPEnvelope(Message.java:4<em>2</em>4)rn at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:6<em>2</em>)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:<em>2</em>06)rn at org.apache.axis.client.Call.invokeEngine(Call.java:<em>2</em>765)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>748)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>4<em>2</em>4)rn at org.apache.axis.client.Call.invoke(Call.java:<em>2</em>347)rn at org.apache.axis.client.Call.invoke(Call.java:1804)rn at com.unihub.unicall.<em>webservice</em>.client.testWebServiceClient.main(testWebServiceClient.java:36)
webservice调用出错
<em>webservice</em><em>调用</em>helloword都不行...rn这是什么问题rnrn代码:rn[WebMethod]rn public string HelloWord()rn rn return "HelloWord";rn rnrn点击<em>调用</em>出现下面错误:rn异常详细信息: System.InvalidOperationException:因 URL 意外地以“/HelloWord”结束,请求格式无法识别rnrn各位大仙给研究下
第一次调用Webservice出错
一:发布了一个<em>webservice</em>,.net<em>调用</em>。服务器启动后,直接<em>调用</em>会<em>出错</em>,但是在浏览器上输入wsdl的地址刷新一下,然后<em>调用</em>就正常了。 不知何故。rn二:于是准备在服务器启动后,自动刷新一下wsdl地址,如何操作。rn请高手赐教。
调用 WEBSERVICE 方法 出错
[code=Java]rnrn rn rn import mx.controls.Alert;rn import mx.rpc.events.ResultEvent;rn [Bindable]rn public var str:String;rnrn private function say():voidrn rn WS.sayHello("李四");rn rnrn private function resultHandler(event:ResultEvent):voidrn rn str=event.result as String;rn t.text=str;rn rn rn rn rn rn rn rn rn rnrnrn[/code]rn点 按钮 <em>出错</em> Security error accessing urlrnhttp://localhost:8080/webService/services/HelloWorld?wsdl这个地址在本机上 是正确的
客户端调用WebService出错
最近在学习WebService,碰到一个比较头疼的事情。rn该WebService在本机调试正常,服务器上也正常。就是客户端<em>调用</em>时<em>出错</em>。rn错误信息如下:rnrn配置错误 rn说明: 在处理向该请求提供服务所需的配置文件时<em>出错</em>。请检查下面的特定错误详细信息并适当地修改配置文件。 rnrn分析器错误信息: 找到的名为“WebService1”的程序集清单定义与程序集引用不匹配。rnrn源错误: rnrnrn行 197: rn行 198: rn行 199: rn行 <em>2</em>00: rn行 <em>2</em>01:rn rnrn源文件: c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config 行: 199 rnrnrn我的WebService对象为ViewDBService,没有WebService1呀。请高手帮忙看看,谢谢!rn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET 框架版本:1.0.3705.<em>2</em>88; ASP.NET 版本:1.0.3705.<em>2</em>88
关于调用WebService出错
我写了个<em>调用</em>WebService的程式,但是运行是提示错误:"请求因 HTTP 状态 401 失败:Access Denied。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Net.WebException: 请求因 HTTP 状态 401 失败:Access Denied。rnrn源错误: rnrnrn行 61: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetStore", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]rn行 6<em>2</em>: public System.Data.DataSet GetStore() rn行 63: object[] results = this.Invoke("GetStore", new object[0]);rn行 64: return ((System.Data.DataSet)(results[0]));rn行 65: rn rnrn源文件: c:\inetpub\wwwroot\WebService1\Web References\webService\Reference.cs 行: 63 rn"rnrnusing System;rnusing System.Collections;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Web;rnusing System.Web.SessionState;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.HtmlControls;rnrnnamespace WebService1rnrn /// rn /// WebForm1 的摘要说明。rn /// rn public class WebForm1 : System.Web.UI.Pagern rn protected System.Web.UI.WebControls.DataGrid DataGrid1;rn rn private void Page_Load(object sender, System.EventArgs e)rn rn // 在此处放置用户代码以初始化页rn webService.Service1 ss=new webService.Service1();rn this.DataGrid1.DataSource=ss.GetStore(); //从SQL中获得库存GetStorern this.DataGrid1.DataBind();rn rn rnrn
VB调用Webservice出错
Dim h As MSXML<em>2</em>.ServerXMLHTTP40 rnDim strWebserviceURL As String rnDim x As MSXML<em>2</em>.DOMDocument40 rnDim rs As New ADODB.RecordsetrnSet x = New MSXML<em>2</em>.DOMDocument40rnSet h = New MSXML<em>2</em>.ServerXMLHTTP40 rnstrWebserviceURL = "http://localhost:<em>2</em>7651/WebService1.asmx/GetPerson"rnh.Open "post ", strWebserviceURL, Falsern' h.setRequestHeader "Content-Type", "text/xml;charset=utf-8"rn h.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"rn x.Load h.responseXMLrn rs.Open x (这一步报错) [img=http://hi.csdn.net/attachment/<em>2</em>01110/13/3967581_1318517138wjhg.jpg][/img] rn这是Webservice的显示结果 [img=http://hi.csdn.net/attachment/<em>2</em>01110/13/3967581_1318517081Zgtx.jpg][/img]rn请指教。
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:318<em>2</em>/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://svrwcf<em>2</em>.his-test.com/CoreService/EventBus.svc?wsdl";//内网的地址rn string _get = Form1.InvokeWebMethod(_url, "XmlPublish",rn new object[] showXml()).ToString();//我自己的函数<em>调用</em>![/code]rnrn希望大神可以帮忙解答一下
oracle 调用webservice出错
oracle 10g <em>调用</em> axis<em>2</em>,接口有发布成功。但oracle <em>调用</em>有问题。第一次写oracle <em>调用</em> <em>webservice</em>.rn[code=SQL]rnCREATE OR REPLACE FUNCTION call_sayHello(username IN VARCHAR<em>2</em>)rn RETURN VARCHAR<em>2</em> ASrn l_service SYS.UTL_DBWS.service;rn l_call SYS.UTL_DBWS.call;rn l_result ANYDATA;rn l_wsdl_url VARCHAR<em>2</em>(10<em>2</em>4);rn l_service_name VARCHAR<em>2</em>(<em>2</em>00);rn l_operation_name VARCHAR<em>2</em>(<em>2</em>00);rn l_input_params SYS.UTL_DBWS.anydata_list;rnBEGINrn l_wsdl_url := 'http://19<em>2</em>.168.0.169:8081/ic/services/ICSMSService?wsdl';rn l_service_name := 'ICSMSService';rn l_operation_name := 'sendMsg';rn l_service := SYS.UTL_DBWS.create_service(wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),rn service_name => l_service_name);rn l_call := SYS.UTL_DBWS.create_call(service_handle => l_service,rn port_name => NULL,rn operation_name => l_operation_name);rn l_input_params(1) := ANYDATA.ConvertVarchar<em>2</em>(username);rn l_result := SYS.UTL_DBWS.invoke(call_handle => l_call,rn 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 RETURN ANYDATA.AccessVarchar<em>2</em>(l_result);rnEXCEPTIONrn WHEN OTHERS THENrn dbms_output.put_line(sqlerrm);rn RETURN NULL;rn return sqlerrm;rnEND call_sayHello;rnrn[/code]rnrn报错rnrnORA-<em>2</em>953<em>2</em>: Java <em>调用</em>被未捕获的 Java 异常错误终止: serialization error: java.lang.IllegalArgumentException: getSerializer requires a Java type and/or an XML typernrn求实例或发现错误。
客户端调用webService出错
public static void main(String[] args) throws Exception rn rn Cert_queryLocator locator=new Cert_queryLocator(); rn System.out.println( stub.getUseByuid("testyangmin")); rn rn上面是我的mian方法rnrn下面是报错信息rnException in thread "main" AxisFaultrn faultCode: http://xml.apache.org/axis/Server.NoEndpointrn faultSubcode: rn faultString: No endpointrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/exceptionName:org.apache.axis.NoEndPointExceptionrn http://xml.apache.org/axis/stackTrace:No endpointrn at com.ibm.wpf._<em>2</em>00<em>2</em>._03.models.cert_query.Cert_queryRPCBindingStub.getUseByuid(Cert_queryRPCBindingStub.java:136)rn at com.ibm.wpf._<em>2</em>00<em>2</em>._03.models.cert_query.StubClient.main(StubClient.java:<em>2</em>0)rnrn http://xml.apache.org/axis/hostname:FDNYWQJTHLCHNYHrnrnNo endpointrn at com.ibm.wpf._<em>2</em>00<em>2</em>._03.models.cert_query.Cert_queryRPCBindingStub.getUseByuid(Cert_queryRPCBindingStub.java:136)rn at com.ibm.wpf._<em>2</em>00<em>2</em>._03.models.cert_query.StubClient.main(StubClient.java:<em>2</em>0)rn
调用webservice出错
连接<em>webservice</em>后生成的模块代码如下:rnunit DataTransmissionService1;rnrninterfacernrnuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;rnrntypernrn DataTransmissionService = interface(IInvokable)rn ['5BAC4FD9-8B6F-C<em>2</em>0F-1765-14E0CCFB7CFC']rn function transportEnergyData(const buildingid:WideString;const gatewayid:WideString;const sequence:WideString;const md5:WideString;const mymessage:WideString): WideString; stdcall;rn function transportHeartBeat(const buildingid:WideString;const gatewayid:WideString): WideString; stdcall;rn end;rn function GetDataTransmissionService(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): DataTransmissionService;rnrnrnimplementationrnrnfunction GetDataTransmissionService(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): DataTransmissionService;rnconstrn defWSDL = 'http://data.yangpufxjl.org:9000/DataTransmissionService?WSDL';rn defURL = 'http://data.yangpufxjl.org:9000/DataTransmissionService';rn defSvc = 'DataTransmissionService';rn defPrt = 'DataTransmissionServicePort';rnvarrn RIO: THTTPRIO;rnbeginrn Result := nil;rn if (Addr = '') thenrn beginrn if UseWSDL thenrn Addr := defWSDLrn elsern Addr := defURL;rn end;rn if HTTPRIO = nil thenrn RIO := THTTPRIO.Create(nil)rn elsern RIO := HTTPRIO;rn tryrn Result := (RIO as DataTransmissionService);rn if UseWSDL thenrn beginrn RIO.WSDLLocation := Addr;rn RIO.Service := defSvc;rn RIO.Port := defPrt;rn end elsern RIO.URL := Addr;rn finallyrn if (Result = nil) and (HTTPRIO = nil) thenrn RIO.Free;rn end;rnend;rnrnrninitializationrn InvRegistry.RegisterInterface(TypeInfo(DataTransmissionService), 'http://platform.ems.jky/', 'UTF-8');rn InvRegistry.RegisterDefaultSOAPAction(TypeInfo(DataTransmissionService), '');rn InvRegistry.RegisterInvokeOptions(TypeInfo(DataTransmissionService), ioDocument);rn InvRegistry.RegisterInvokeOptions(TypeInfo(DataTransmissionService), ioLiteral);rnrnend. rn<em>调用</em>代码如下:rnvarrn sendstring:string;//要发送的数据包rn mysend:DataTransmissionService;//<em>webservice</em>的服务器定义rn md5:string;rnbeginrn mysend:=GetDataTransmissionService(False,'',nil);rn md5:=model.MD5Ecryption(AuthenticationKey+sequence);rn sendstring:=mysend.transportHeartBeat(building_id,gateway_id);rnend;rnrn 报错如下:rncannot find dispatch method forrnhttp://schemas.xmlsoap.org/soap/envelope/stringrnrnrn是服务器没连上吗,第一次做<em>webservice</em>,真心不懂,望各位高手指点rn
AJAX调用webservice出错
我照着网上做了一个超简单的AJAX<em>调用</em>WEBSERVICE的范例,结果失败,各位帮忙看看什么原因.rnrn操作步骤如下:添加一个wsDemo.asmx的新项,产生<em>2</em>个文件(wsDemo.asmx和wsDemo.cs)rnrn在wsDemo.cs文件中实现代码如下[code=C#]using System;rnusing System.Web;rnusing System.Collections;rnusing System.Web.Services;rnusing System.Web.Services.Protocols;rnusing System.Web.Script.Services;rnrn/// rn/// wsDemo 的摘要说明rn/// rnrn[WebService(Namespace = "http://tempuri.org/")]rn[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]rn[ScriptService]rnpublic class wsDemo : System.Web.Services.WebServicernrn public wsDemo()rn rn rnrn [WebMethod]rn public string Welcome(string u)rn rn string strMsg = "欢迎[" + u + "]";rn return strMsg;rn rn[/code]rn在页面文件中实现代码:rnrnjavascript部分[code=JScript] [/code]rnrn页面就是一个客户端按钮,点一下触发OnbtOk_Click事件,代码略.rn同时,在页面拖入scriptmanager控件,设置EnablePageMethods="true"(后来设置会FALSE也不行)rnrn系统的在执行ws.Welecome(userName,ShowMsg);的时候<em>出错</em>.rn
pb9 调用 WEBservice 出错
我用的是PB9.0 <em>调用</em><em>webservice</em> 时,如果url 是地址正确的情况下,没有问题,如果 url 地址错误,或 web服务器没有启动。PB 就会报错,点确定后程序就全关了。有没有什么办法提示一下,如果地址错误或服务器没有连上,点确定后返回。。。rnrn如下是错误的提示。rnrn---------------------------------------------------------rnpowerbuilder application Execution Error(Roooo)rnrn X application terminatedrn Error:Failed to connect to host 1<em>2</em>7.0.0.1,port 8888: NO errorrnrn 确定rnrn---------------------------------------------------------------rn上边是<em>出错</em>窗口,rnrnrn下边的按钮下的代码:rn-------------------------------rnSoapConnection conn rnpublic<em>webservice</em>publicinterface public_ws rnstring ls_urlrnlong rVal rn string str_endpoint,s_xml rn ls_url=trim(sle_1.text)rn str_endpoint = "http://1<em>2</em>7.0.0.1:8888/interface/services/PublicInterface?wsdl" rn conn = create SoapConnection rn s_xml=trim(mle_1.text)rn rn rVal = Conn.CreateInstance(public_ws,"public<em>webservice</em>publicinterface",ls_url) rnrn if rval <> 0 then rn messagebox('提示:','连接网络URL 出现错误,错误代码: '+string(rval))rnend ifrn mle_<em>2</em>.text = public_ws.getMemberInfo(s_xml) rn destroy conn rn
调用webservice客户端出错
[color=#FF0000]求助!!!我<em>调用</em>这个接口用了CXF跟axis都调不通,报错是下边的,不太了解<em>webservice</em>,求大神指点[/color][size=<em>2</em>4px][/size]rn[img=https://img-bbs.csdn.net/upload/<em>2</em>01608/31/147<em>2</em>645454_348048.png][/img]rn[img=https://img-bbs.csdn.net/upload/<em>2</em>01608/31/147<em>2</em>645469_638<em>2</em>58.png][/img][img=https://img-bbs.csdn.net/upload/<em>2</em>01608/31/147<em>2</em>645673_739604.png][/img]
调用WEBService 出错
1.新建一个App, 放上一个button, listbox, HTTPRIOrn<em>2</em>.新建<em>webservice</em>s -> wsdlInmporter 导入你这个网站的Wsdl 让程序知道<em>调用</em>规则rn 不出意外会生成个WeatherWebService.pas ,主窗体引用它rn http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdlrnrn3.设置HTTPRIO的 port, service, wsdlLocation 会下拉出来rn4.写点代码吧rn //得到支持的地区rnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn AOS,ss: ArrayOfString;rn I: Integer;rnbeginrn AOS := (HTTPRIO1 as WeatherWebServiceSoap).getSupportProvince;rn for I := Low(AOS) to High(AOS) dorn Listbox1.Items.Add(AOS[I]); -- 可以把所有省份列出来rnrn[color=#FF0000]但是使用下面代码,出现错误:[/color]rn -- 取省份下的城市rn ss := (HTTPRIO1 as WeatherWebServiceSoap).getSupportCity('广西')rn -- 取城市的天气rn ss := (HTTPRIO1 as WeatherWebServiceSoap).getWeatherbyCityName('深圳');rnrn---- 错误信息为:rnProject Project1.exe raised exception class ERemotableException with message '服务器无法处理请求。 - 未将对象引用设置到对象的实例。'. Process stopped. Use Step or Run to continue.rn
vc调用webservice出错
// TODO: 在此添加控件通知处理程序代码rn CoInitialize(NULL);rn HRESULT hr = S_OK;rnrn CBusSmsWebServiceImplService* p = new CBusSmsWebServiceImplService;rn BSTR action = _bstr_t("ADDDCSMS");rn BSTR xmlPara = _bstr_t("057181509638133065<em>2</em>017<em>2</em>05718150<em>2</em><em>2</em><em>2</em>310571815<em>2</em>09<em>2</em>50571"); rn BSTR* bReturn = NULL;rn hr = p->doService(action, xmlPara, bReturn);rn if (FAILED(hr))rn rn cout << "FAILED" << endl;rn rn elsern rn cout << "SUCCESS" << endl;rn rnrn delete p;rn CoUninitialize();rnrnrndoService是webService提供的接口。hr的值是E_POINTER,不知道是什么原因。rnrn求大神指点
Webservice调用存储过程出错
我的Webservice里<em>调用</em>一个存储过程是把查询数据导出到Excel文件里的,<em>调用</em>的时候出现rn【无法启动链接服务器"(null)"的 OLE DB 访问接口 "MICROSOFT.JET.OLEDB.4.0"的事务。rn链接服务器"(null)"的 OLE DB 访问接口"MICROSOFT.JET.OLEDB.4.0"返回了消息"既不支持隔离层,也不支持加强型。"】rn这样的错误。但我回收了进程后,又可以了,然后<em>调用</em>多几次又出现这个错误了!rn请问这是出了什么问题呢?
WebService 调用出错!?
我用VS.Net做了一个很简单的Web Service,然后用C#写了个Window 应用程序去<em>调用</em>WebService (已经将Web Service的代理类用WSDL.exe生成之后,包含在应用程序里了).rn 应用程序在我本机上是能够<em>调用</em>的,而且结果也正确,问题是移到别的机器就不能用了,提示的错误信息是什么"<em>调用</em>的程序安全策略不允许,请通知系统管理员或者使用Microsoft .NET安全策略配置工具".rn 请问我应该怎么做才能让我写的应用程序在别人的机器上也能正确执行呢?
pb11.5调用webservice出错..
完全按照网上的教程写的.rnrn写了一个最简单的<em>webservice</em> 用pb11.5写的.rnrn然后用11.5来<em>调用</em>..rnrn居然报错....rnrni_conn = create soapconnectionrnrnll_result = i_conn.setsoaplogfile( 'mysoaplog.log')rnll_result = i_conn.createinstance( iws_proxy_obj,"n_data<em>webservice</em>soap")rnrn就是在<em>调用</em>i_conn的方法的时候<em>出错</em>.rnrn在家里电脑刚系统重装的好的.rnrn今天在办公室电脑就有问题.rnrnpbd已经加上了..rnrn各位帮我看看是哪里出了问题?rnrnBad runtime function reference at line 6 in clicked event of object cb_1 of w_client. rn
WebService调用Jmail出错
提示:rnSystem.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID F81<em>2</em>B147-0E<em>2</em>6-4<em>2</em><em>2</em><em>2</em>-8EE4-9F753CD<em>2</em>B39C failed due to the following error: 80070005.rn at LocalRemoteSyncTool.ReceiveRemoteMailList()rn at WebService.Sync()rnrn在本地<em>2</em>003 IIS调试时没有问题的,但是安装到服务器虚拟主机上时出现这个问题,主机上也安装了跟我本机相同的jmail版本,谁能解释一下是什么原因
WebService ksoap2天气查询源码.zip
WebService <em>ksoap</em><em>2</em>天气查询源码是学习WebService<em>调用</em>和<em>ksoap</em><em>2</em>使用的最佳源码。  
用KSOAP2连接C#的WebService
自己用<em>2</em>008写了一个WebService,一个加法函数rn两个参数 i j rn然后我在Android里用<em>ksoap</em><em>2</em>.5.8rn[code=Java]rnSoapObject request = new SoapObject(NAME_SPACE, NAME);rn request.addProperty("i", 6.00);rn request.addProperty("j", 9.00);rn SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);rn envelope.dotNet = true;rn envelope.setOutputSoapObject(request);rn HttpTransportSE ht = new HttpTransportSE(URL); rn ht.debug = true;rn ht.call(null, envelope);rn //callback = (SoapObject)envelope.bodyIn;rn if(envelope.getResponse()!=null)rn SoapPrimitive response = (SoapPrimitive) envelope.getResponse();rn callback = response.toString();rn rn[/code]rn错误现在不知道问题出在哪了。 哪位大牛给解答一下。
WebService中ksoap2的使用总结
公司的服务端开发也是醉了,上一个项目使用<em>webservice</em>,这个项目又使用<em>webservice</em>,天呐,怎么都不会HTTP啊,好吧,由于本人记性超级差,上次用过又忘记了,这次来个大总结,因为<em>webservice</em>使用的是soap协议,官网给出对应开源的框架是<em>ksoap</em><em>2</em>,所以来总结下<em>ksoap</em><em>2</em>的用法吧 第一步:项目添加依赖 下载<em>ksoap</em><em>2</em> 下载 <em>ksoap</em><em>2</em> 的 jar 文件
Android(Ksoap2)调用Service说明文档
Android(Ksoap<em>2</em>)<em>调用</em>Service说明文档 (可传递自定义对象)
androidksoap2调用webservice接口查询
,<em>android</em>用<em>ksoap</em><em>2</em><em>调用</em><em>webservice</em>接口查询,导入能直接运行
Ksoap2调用说明文档
Android(Ksoap<em>2</em>)<em>调用</em>Service说明文档
android ksoap2库的使用
最近在忙一个<em>android</em>作业,准备的架构是C/S,服务器端用php,客户端在<em>android</em>上运行。打算用soap协议进行web service的交互,已经成功进php客户端和php服务器端的通信,所以服务器端应该没什么问题。准备移到andoid端。rn 网上查了一下,很多文章都提到<em>ksoap</em><em>2</em>应该是<em>android</em>上很好的选择,但网上好的例子和文档真的很少,又用过的吗,可以给个清楚明白的链接或者直接贴段示例代码吗?rn 本人感激不尽!!
android 利用ksoap2参数传递
我想用<em>ksoap</em><em>2</em>往web服务器发送一个图片流的数据,但是<em>ksoap</em>只能传递基本的数据类型,我想问一下大家图片的类型应该怎么传递啊?
ksoap2 android 3.6.0
<em>ksoap</em><em>2</em> <em>android</em> 3.6.0 轻量级 用于 <em>android</em> <em>调用</em><em>webservice</em>的第三方jar <em>2</em>015-10-15 最新版本 主页已从搬家到http://simpligility.github.io/<em>ksoap</em><em>2</em>-<em>android</em>/index.html
KSOAP2 Android 文档资料
<em>ksoap</em><em>2</em>.<em>android</em>.assembly 文档。
用.NET webservice调用java的webservice出错
添加web引用的时候出现rn自定义工具错误: 无法导入 Web 服务/架构。无法从命名空间“http://XXX/XXX”导入绑定“XXXXXX”。 无法导入操作“XXXXXXXX”。 缺少数据类型“DataHandler”。rn如何解决呢?是java那边问题还是.net这边问题?rn
高分求教,webservice调用webservice,随机性出错
要实现的功能是通过两次<em>webservice</em>,实现外部访问邮件服务器的内容。rnrn其中,<em>webservice</em><em>2</em>和邮件服务器在内网,<em>webservice</em>1有两个IP,一个内网一个外网,对外提供服务。rnrn网络结构如下:rnrn外部访问→Webservice1→Webservice<em>2</em>→邮件服务器rnrn我现在做测试,直接从WebService<em>2</em>访问邮件服务器,没有问题。rn从Webservice1→<em>webservice</em><em>2</em>→邮件服务器时,邮件数量较少时,不会出问题,当邮件数量较多,随机性<em>出错</em>,<em>出错</em>的提示是:rnSystem.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. - System.IO.IOException: Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。. - rnrn我个人考虑是否是从<em>webservice</em><em>2</em>上数据缓存丢失的问题,如果是,该如何解决?rnrn没经验,请高手指点,谢谢。
求助安卓使用KSOAP2出错
程序启动后使用没有问题,接受数据也没有问题,但是!!!!机器搁置一下后程序也不退出,再扫描<em>调用</em>WEBSERVICE就会报错!!!!求大神帮忙看看 这是代码![code=java]public String CallWebService (String MethodName, Map Params) rnrn // 1、指定<em>webservice</em>的命名空间和<em>调用</em>的方法名rn rn SoapObject request = new SoapObject(Namespace, MethodName);rn rn // <em>2</em>、设置<em>调用</em>方法的参数值,如果没有参数,可以省略,rn if (Params != null) rn Iterator iter = Params.entrySet().iterator();rn while (iter.hasNext()) rn Map.Entry entry = (Map.Entry) iter.next();rn request.addProperty((String) entry.getKey(),rn (String) entry.getValue());rn rn rn //3、生成<em>调用</em>Webservice方法的SOAP请求信息。该信息由SoapSerializationEnvelope对象描述rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER1<em>2</em>);rn envelope.bodyOut = request;rn // c#写的应用程序必须加上这句rn envelope.dotNet = true;rn //envelope.setOutputSoapObject(request);rn HttpTransportSE ht = new HttpTransportSE(WEB_SERVICE_URL);rn System.out.println("*ht*"+ht+"*envelope*"+envelope);rn // 使用call方法<em>调用</em>WebService方法rn try rn ht.call(null, envelope);rn catch (HttpResponseException e) rn e.printStackTrace();rn Log.e("----发生错误1---", e.getMessage());rn rn catch (IOException e) rn e.printStackTrace();rn Log.e("----发生错误<em>2</em>---", e.getMessage());rn catch (XmlPullParserException e) rn e.printStackTrace();rn Log.e("----发生错误3---", e.getMessage());rn rn try rn //finalrn SoapPrimitive result = (SoapPrimitive) envelope.getResponse();rn if (result != null) rn Log.d("----收到的回复----", result.toString());rn return result.toString();rn rnrn catch (SoapFault e) rn Log.e("----发生错误4---", e.getMessage());rn e.printStackTrace();rn rn return null;rn [/code]rn报错是[code=text]08-15 09:58:38.030: V/EditText(5401): abortBroadcast simscan action now. path=/data/app/com.bang.test<em>webservice</em>call-1.apkrn08-15 09:58:38.540: I/System.out(5401): 3-<em>2</em>0140731143330970扫描配送单<em>2</em>800rn08-15 09:58:38.550: I/System.out(5401): htorg.<em>ksoap</em><em>2</em>.transport.HttpTransportSE@41a4da<em>2</em>8envelopeorg.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope@419eb3e0rn08-15 09:58:38.570: D/dalvikvm(5401): GC_FOR_ALLOC freed 30K, 14% free 11638K/13447K, paused 17ms, total 18msrn08-15 09:58:38.580: W/IInputConnectionWrapper(5401): clearMetaKeyStates on inactive InputConnectionrn08-15 09:58:38.640: W/System.err(5401): java.net.SocketException: sendto failed: ECONNRESET (Connection reset by peer)rn08-15 09:58:38.640: W/System.err(5401): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)rn08-15 09:58:38.640: W/IInputConnectionWrapper(5401): clearMetaKeyStates on inactive InputConnectionrn08-15 09:58:38.640: W/System.err(5401): at libcore.io.IoBridge.sendto(IoBridge.java:475)rn08-15 09:58:38.640: W/System.err(5401): at java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)rn08-15 09:58:38.640: W/System.err(5401): at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)rn08-15 09:58:38.640: W/System.err(5401): at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:<em>2</em>70)rn08-15 09:58:38.640: W/System.err(5401): at java.io.BufferedOutputStream.flushInternal(BufferedOutputStream.java:185)rn08-15 09:58:38.640: W/IInputConnectionWrapper(5401): clearMetaKeyStates on inactive InputConnectionrn08-15 09:58:38.640: W/System.err(5401): at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:85)rn08-15 09:58:38.640: W/System.err(5401): at libcore.net.http.FixedLengthOutputStream.flush(FixedLengthOutputStream.java:49)rn08-15 09:58:38.640: W/IInputConnectionWrapper(5401): clearMetaKeyStates on inactive InputConnectionrn08-15 09:58:38.640: W/System.err(5401): at org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE.call(HttpTransportSE.java:188)rn08-15 09:58:38.640: W/System.err(5401): at org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE.call(HttpTransportSE.java:118)rn08-15 09:58:38.640: W/System.err(5401): at org.<em>ksoap</em><em>2</em>.transport.HttpTransportSE.call(HttpTransportSE.java:113)rn08-15 09:58:38.640: W/System.err(5401): at com.bang.test<em>webservice</em>call.WorkActivity.CallWebService(WorkActivity.java:<em>2</em>6<em>2</em>)rn08-15 09:58:38.640: W/System.err(5401): at com.bang.test<em>webservice</em>call.WorkActivity$6.doInBackground(WorkActivity.java:301)rn08-15 09:58:38.640: W/System.err(5401): at com.bang.test<em>webservice</em>call.WorkActivity$6.doInBackground(WorkActivity.java:1)rn08-15 09:58:38.640: W/System.err(5401): at <em>android</em>.os.AsyncTask$<em>2</em>.call(AsyncTask.java:<em>2</em>87)rn08-15 09:58:38.640: W/System.err(5401): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)rn08-15 09:58:38.640: W/System.err(5401): at java.util.concurrent.FutureTask.run(FutureTask.java:137)rn08-15 09:58:38.650: W/System.err(5401): at <em>android</em>.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:<em>2</em>30)rn08-15 09:58:38.650: W/System.err(5401): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)rn08-15 09:58:38.650: W/System.err(5401): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)rn08-15 09:58:38.650: W/System.err(5401): at java.lang.Thread.run(Thread.java:856)rn08-15 09:58:38.650: W/System.err(5401): Caused by: libcore.io.ErrnoException: sendto failed: ECONNRESET (Connection reset by peer)rn08-15 09:58:38.650: W/System.err(5401): at libcore.io.Posix.sendtoBytes(Native Method)rn08-15 09:58:38.650: W/System.err(5401): at libcore.io.Posix.sendto(Posix.java:146)rn08-15 09:58:38.650: W/System.err(5401): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)rn08-15 09:58:38.650: W/System.err(5401): at libcore.io.IoBridge.sendto(IoBridge.java:473)rn08-15 09:58:38.650: W/System.err(5401): ... 19 morern08-15 09:58:38.650: E/----发生错误<em>2</em>---(5401): sendto failed: ECONNRESET (Connection reset by peer)rn08-15 09:58:38.650: W/dalvikvm(5401): threadid=1<em>2</em>: thread exiting with uncaught exception (group=0x40e50438)rn08-15 09:58:38.660: E/AndroidRuntime(5401): FATAL EXCEPTION: AsyncTask #<em>2</em>rn08-15 09:58:38.660: E/AndroidRuntime(5401): java.lang.RuntimeException: An error occured while executing doInBackground()rn08-15 09:58:38.660: E/AndroidRuntime(5401): at <em>android</em>.os.AsyncTask$3.done(AsyncTask.java:<em>2</em>99)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:<em>2</em>73)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.FutureTask.setException(FutureTask.java:1<em>2</em>4)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.FutureTask.run(FutureTask.java:137)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at <em>android</em>.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:<em>2</em>30)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.lang.Thread.run(Thread.java:856)rn08-15 09:58:38.660: E/AndroidRuntime(5401): Caused by: java.lang.NullPointerExceptionrn08-15 09:58:38.660: E/AndroidRuntime(5401): at org.<em>ksoap</em><em>2</em>.serialization.SoapSerializationEnvelope.getResponse(SoapSerializationEnvelope.java:5<em>2</em>1)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at com.bang.test<em>webservice</em>call.WorkActivity.CallWebService(WorkActivity.java:<em>2</em>76)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at com.bang.test<em>webservice</em>call.WorkActivity$6.doInBackground(WorkActivity.java:301)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at com.bang.test<em>webservice</em>call.WorkActivity$6.doInBackground(WorkActivity.java:1)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at <em>android</em>.os.AsyncTask$<em>2</em>.call(AsyncTask.java:<em>2</em>87)rn08-15 09:58:38.660: E/AndroidRuntime(5401): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)rn08-15 09:58:38.660: E/AndroidRuntime(5401): ... 5 morern[/code]
java android 调用webservice
java <em>android</em><em>调用</em>.net web服务的方法
Android调用WebService
NULL 博文链接:https://w1<em>2</em>3456h19.iteye.com/blog/1660113
android调用webservice例子
通过简单的示例来演示Android平台的Web Service开发,及第三方jar <em>ksoap</em><em>2</em>-<em>android</em>类库的使用,完整简单的源码,可以看到很好的运行效果,很适合初学者学习
android webservice调用wsdl
[color=#FF0000]一直报xml解析错误:谁知道原因[/color]rnrnpublic class WebService rnrn public void login(String name,String password)rn //WSDL文档中的命名空间 rn final String targetNameSpace="urn:Users"; rn rn String methodName = "ClentLogin" ;rn //WSDL文档中的URL rn final String WSDL="http://1<em>2</em>4.4<em>2</em>.77.77/api/center/Users";rn rn SoapObject soapObject=new SoapObject(targetNameSpace,methodName); rn //<em>调用</em>的方法参数与参数值(根据具体需要可选可不选)rn rn soapObject.addProperty("sitekey", "");rn soapObject.addProperty("sitepwd", "");rn soapObject.addProperty("option", "");rn soapObject.addProperty("username", name);rn soapObject.addProperty("password", password);rn rn // 生成<em>调用</em>WebService方法的SOAP请求信息,并指定SOAP的版本rn SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER10); rn // 设置是否<em>调用</em>的是dotNet开发的WebServicern //envelope.dotNet=false; rn //envelope.bodyOut = soapObject; rn envelope.setOutputSoapObject(soapObject);rn rn HttpTransportSE httpTransportSE = new HttpTransportSE(WSDL);rn rn try rn rn httpTransportSE.call(targetNameSpace+methodName, envelope); rn rn SoapObject result=(SoapObject)envelope.getResponse();rn rn int count=result.getPropertyCount(); rn for(int index=0;index
android调用webservice
我想写一个<em>android</em>小程序 <em>调用</em>我用c#写好的<em>webservice</em>进行对数据库的操作。可是我一点都不会 请高手指点一下怎么<em>调用</em>怎么传数据
Spring Security3.1最新配置实例下载
基于struts2 hibernate Spring Security3的权限配置。详情可以关注我的博客。 相关下载链接:[url=//download.csdn.net/download/k10509806/3283687?utm_source=bbsseo]//download.csdn.net/download/k10509806/3283687?utm_source=bbsseo[/url]
软件工程课程设计 软件综合设计下载
软件工程课程设计软件工程课程设计 软件综合设计 相关下载链接:[url=//download.csdn.net/download/cdaniel/3439235?utm_source=bbsseo]//download.csdn.net/download/cdaniel/3439235?utm_source=bbsseo[/url]
迅雷界面SDK1.5下载
迅雷界面SDK1.5 相关下载链接:[url=//download.csdn.net/download/benzkuai/5739779?utm_source=bbsseo]//download.csdn.net/download/benzkuai/5739779?utm_source=bbsseo[/url]
相关热词 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天 c#字典序排序 c# 截屏取色 c#中的哪些属于托管机制
我们是很有底线的