关于Android调用webservice后SoapObject数据解析问题

图片说明

            现在的问题是我能拿到所有数据,就想知道这两个不同的表格怎么各拿各的数据
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于android调用WebService的问题
今天在写android端通过koasp调用WebService的时候,需要传一个char类型的参数。然后想也没想就和之前一样传了: SoapObject soapObject = new SoapObject(nameSpace, function);         soapObject.addProperty("isIn",ch); 但是在运行的时候却出现了异常: java.l
关于Android调用webservice的问题
服务端只给了一个wsdl文件,其他什么都没有,我现在要在Android中调用这个服务,求大神解惑[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/54.gif][/img]rnhttp://shop_xd.norken.cn/service/CabinetOperator.svcrn就给了这么个地址,说要的东西都在里面,菜鸟一个,实在不知道怎么搞定。
关于android调用webservice的问题
我按照网上的ksoap2的办法,能成功调用手机号归属地查询等功能。rn但是公司自己的webservice,用同样的方法调用不了。rn有高人解答下吗,或者说实际的android项目开发不是用ksoap2这个扩展包来实现的,有其他解决方案吗?
基于SoapObject的http请求调用webservice
基于SoapObject的http请求调用webservice方法的一些个人经验,有不足之处望指点
调用webservice时,soapobject创建出错!请教。
我本人在本机上面部署了axis2的webservice,代码附后。rnrn在使用eclipse创建apk应用程序时,报错了!rn报错的地方为:rn SoapObject request = new SoapObject(NAMESPACE, methodName); rnrnrn下面是我的webservice的?wsdlrnrnThis XML file does not appear to have any style information associated with it. The document tree is shown below.rnrnJDBCDatabaseServicernrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrnrn函数调用代码:rn private String getRequest()rnrn String str = "";rn try rn rn //第1步:先定义要访问的webservice相关的几个参数 rn // 定义webservice的URL,注意不包括?wsdl或.aar,对应文件里的documentation字段 rn String serviceUrl = "http://10.57.253.249:8080/axis2/services/JDBCDatabaseService"; rn //定义命名空间,对应targetNamespace字段 rn String NAMESPACE = "http://database.com"; rn //定义要调用的WebService方法名 rn String methodName = "executeQueryStr"; rn String SOAP_ACTION = "http://database.com/executeQueryStr"; rn rn //第2步:根据WebService的命名空间和调用的方法名 创建SoapObject对象, rn SoapObject request = new SoapObject(NAMESPACE, methodName); rn rn //第3步:设置WebService方法的参数 ,参数名可以不一样,但顺序要一致 rn String strParam = "select FDAName from SystemParameter"; rn request.addProperty("sql",strParam ); rn rn //第4步:创建soap序列化封装对象:SoapSerializationEnvelope,并指定WebService的版本 rn //版本要对应wsdl文件里的soap版本 rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); rn rn //设置soap序列化封装对象属性 rn envelope.bodyOut = request;//也可通过 setOutputSoapObject来设置 rn envelope.dotNet = true; rn rn //第5步:根据webservice的URL创建HttpTransportSE对象(通过HTTP协议传输soap序列化对象) rn HttpTransportSE ht = new HttpTransportSE(serviceUrl); rn ht.debug = true; rn rn //第6步:开始调用,soap版本不一致时会出现异常 rn //同步调用,实际处理的时候,要起个线程处理 rn ht.call(SOAP_ACTION, envelope); rn rn //第7步获取返回结果,有两种方法,此处用bodyIn,有时出现异常可能是webservice端的方法有问题造成的 rn //getResponse好像有问题,据说是服务端没搞定的原因,此处不在深究 rn SoapObject soapObject = (SoapObject) envelope.bodyIn; rn //SoapObject soapObject =(SoapObject)envelope.getResponse(); rn rn System.out.println("soapObject" + soapObject); rn Toast.makeText(this, soapObject.toString(), Toast.LENGTH_LONG).show(); rn rn //获取返回的内容 rn str = soapObject.getProperty("return").toString(); rn rn rnrn报错日志:rn11-14 03:48:30.463: E/AndroidRuntime(885): FATAL EXCEPTION: mainrn11-14 03:48:30.463: E/AndroidRuntime(885): Process: com.example.helloworld, PID: 885rn11-14 03:48:30.463: E/AndroidRuntime(885): java.lang.IllegalStateException: Could not execute method of the activityrn11-14 03:48:30.463: E/AndroidRuntime(885): at android.view.View$1.onClick(View.java:3814)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.view.View.performClick(View.java:4424)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.view.View$PerformClick.run(View.java:18383)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.os.Handler.handleCallback(Handler.java:733)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.os.Handler.dispatchMessage(Handler.java:95)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.os.Looper.loop(Looper.java:137)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.app.ActivityThread.main(ActivityThread.java:4998)rn11-14 03:48:30.463: E/AndroidRuntime(885): at java.lang.reflect.Method.invokeNative(Native Method)rn11-14 03:48:30.463: E/AndroidRuntime(885): at java.lang.reflect.Method.invoke(Method.java:515)rn11-14 03:48:30.463: E/AndroidRuntime(885): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)rn11-14 03:48:30.463: E/AndroidRuntime(885): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)rn11-14 03:48:30.463: E/AndroidRuntime(885): at dalvik.system.NativeStart.main(Native Method)rn11-14 03:48:30.463: E/AndroidRuntime(885): Caused by: java.lang.reflect.InvocationTargetExceptionrn11-14 03:48:30.463: E/AndroidRuntime(885): at java.lang.reflect.Method.invokeNative(Native Method)rn11-14 03:48:30.463: E/AndroidRuntime(885): at java.lang.reflect.Method.invoke(Method.java:515)rn11-14 03:48:30.463: E/AndroidRuntime(885): at android.view.View$1.onClick(View.java:3809)rn11-14 03:48:30.463: E/AndroidRuntime(885): ... 11 morern11-14 03:48:30.463: E/AndroidRuntime(885): Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObjectrn11-14 03:48:30.463: E/AndroidRuntime(885): at com.example.helloworld.MainActivity.getRequest(MainActivity.java:73)rn11-14 03:48:30.463: E/AndroidRuntime(885): at com.example.helloworld.MainActivity.onClick_Event(MainActivity.java:46)rn11-14 03:48:30.463: E/AndroidRuntime(885): ... 14 morern
webservice数据解析
compile ‘com.squareup.okhttp:okhttp:2.4.0’ compile ‘com.zhy:okhttputils:2.6.2’ compile ‘com.google.code.gson:gson:2.7’ import android.os.Handler; import android.os.Looper; import android.
android webservice SoapObject Object 类型转换
写了一个简单的webservice遇到一个纠结的问题,大家帮帮忙。rn主要就是不理解envelope.getResponse()方法返回到Object对象为什么转换成SoapObject 就会出现这个报错。rnjava.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitivernrn网上很多这样的代码都是可以通过的啊!rn注:已配置网络访问权限。rnimport org.ksoap2.SoapEnvelope;rnimport org.ksoap2.serialization.SoapObject;rnimport org.ksoap2.serialization.SoapSerializationEnvelope;rnimport org.ksoap2.transport.AndroidHttpTransport;rnimport android.app.Activity;rnimport android.os.Bundle;rnimport android.util.Log;rnimport android.view.View;rnimport android.widget.Button;rnimport android.widget.TextView;rnpublic class Main extends Activity rnrn public static final String TAG = "Main";rn rn Button btnSearch = null;rn TextView tvResult = null;rn rn String serviceUrl = "http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl";rn String namespace = "http://WebXml.com.cn/";rn String methodName = "getMobileCodeInfo";rn @Overridern public void onCreate(Bundle savedInstanceState)rn rn Log.i(TAG, "开始布局");rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main);rn Log.i(TAG, "布局空间");rn tvResult = (TextView) this.findViewById(R.id.tvResult);rn btnSearch = (Button) this.findViewById(R.id.btnSearch);rn btnSearch.setOnClickListener(listener);rn Log.i(TAG, "布局结束");rnrn rn rn Button.OnClickListener listener = new Button.OnClickListener()rn rnrn @Overridern public void onClick(View v) rn Log.i(TAG, "进入Button");rn SoapObject request = new SoapObject(namespace, methodName);rn request.addProperty("mobileCode", "15868752458");rn request.addProperty("userID", null);rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rn envelope.dotNet=true;rnrn //envelope.bodyOut = request;rn envelope.setOutputSoapObject(request);rn AndroidHttpTransport ht=new AndroidHttpTransport(serviceUrl);rn Log.i(TAG, "开始try");rn tryrn rn Log.i(TAG, "进入try");rn ht.call(namespace + methodName, envelope);rn Log.i(TAG, "开始if" + envelope.getResponse());rn if (envelope.getResponse() != null)rn rn Log.i(TAG, "进入if");rn SoapObject soapObject = (SoapObject) envelope.getResponse();rn String result = soapObject.toString();rn Log.i(TAG, result);rn tvResult.setText(result);rn rn [color=#FF0000]// 使用Object就没有问题了,可以获取到数据rn //Object object = envelope.getResponse();rn //Log.i(TAG, object.toString());rn //tvResult.setText(object.toString());[/color]rn rn else rn Log.i(TAG, "进入else");rn tvResult.setText("没有获得响应.");rn Log.i(TAG, "没有获得响应");rn rn rn catch (Exception e)rn rn tvResult.setText(e.toString());rn Log.i(TAG, e.toString());rn rn ;rn
关于android调用webservice服务出错。
在线等大神帮忙,我是android新手在做手机app 服务器端调用.Net开发的WebService。用自己的电脑当服务器,通过iis发布webservice。在调用的时候一开始没问题的,用网页本地调用也没问题,用手机来调用后一开始没问题的,过了一会服务器就出错了,用本地浏览器进行调用都出问题了,打开调用界面没问题,填好参数,点击调用的时候就报错了。rn 报下面的错误。rn 此错误(HTTP 500 内部服务器错误)意味着你正在访问的网站出现了服务器问题,此问题阻止了该网页的显示。
关于android WebService
最近正在研究android WebService 想做一个火车票查询的小软件 ,可发现WebSerVice返回来的数据类型是DataSet,如图:[img=http://hi.csdn.net/attachment/201007/15/168485_1279181702O490.gif][/img]rn后来我再网上找了一下,找到一此相关的资料,一个是用axis框架来取得数据,http://www.javaeye.com/topic/39025 求大侠们给支个招!
安卓webservice数据解析
安卓webservice数据解析服务返回的数据
怎么解析webservice返回的SoapObject数据
[code=java]rnpackage com.example.demo;rnrnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.OutputStream;rnimport java.net.HttpURLConnection;rnimport java.net.URL;rnimport java.util.ArrayList;rnrnimport org.ksoap2.SoapEnvelope; rnimport org.ksoap2.serialization.SoapObject; rnimport org.ksoap2.serialization.SoapSerializationEnvelope; rnimport org.ksoap2.transport.AndroidHttpTransport; rnimport org.ksoap2.transport.HttpTransportSE;rnimport org.xmlpull.v1.XmlPullParserException;rnpublic class SoapUlti rnrn public ArrayList GetWebServre(String methodName) rn ArrayList Values = new ArrayList();rn String ServerUrl = "http://192.168.140.1:80/Service1.asmx";rn String namespace="http://tempuri.org/";rn SoapObject request=new SoapObject(namespace, methodName);rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); rn envelope.bodyOut = request;rn HttpTransportSE ht = new HttpTransportSE(ServerUrl);rn ht.call(null, envelope);rn SoapObject soapObject = (SoapObject) envelope.getResponse();rn Values=//??????rn return Values;rn rnrn[/code]rn以上是我连接webservice的代码,安卓端我用的ListView来显示数据,所以用的arraylist类型,现在就是不知道怎么把soapobject解析成arraylistrn
急!新手求助!关于Android调用webservice出错!!
我是完全根据这个教程复制的代码:rn[url=http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/][/url]rnrn然后把mysql的用户密码什么的都改成我自己的了。但还是出现了错误。rnrn下面是其中一个出错的activity的代码:rn[code=java]rnpackage com.example.androidhive;rn rnimport org.json.JSONException;rnimport org.json.JSONObject;rn rnimport com.example.androidhive.library.DatabaseHandler;rnimport com.example.androidhive.library.UserFunctions;rn rnimport android.app.Activity;rnimport android.content.Intent;rnimport android.os.Bundle;rnimport android.util.Log;rnimport android.view.View;rnimport android.widget.Button;rnimport android.widget.EditText;rnimport android.widget.TextView;rn rnpublic class RegisterActivity extends Activity rn Button btnRegister;rn Button btnLinkToLogin;rn EditText inputFullName;rn EditText inputEmail;rn EditText inputPassword;rn TextView registerErrorMsg;rn rn // JSON Response node namesrn private static String KEY_SUCCESS = "success";rn private static String KEY_ERROR = "error";rn private static String KEY_ERROR_MSG = "error_msg";rn private static String KEY_UID = "uid";rn private static String KEY_NAME = "name";rn private static String KEY_EMAIL = "email";rn private static String KEY_CREATED_AT = "created_at";rn rn @Overridern public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.register);rn rn // Importing all assets like buttons, text fieldsrn inputFullName = (EditText) findViewById(R.id.registerName);rn inputEmail = (EditText) findViewById(R.id.registerEmail);rn inputPassword = (EditText) findViewById(R.id.registerPassword);rn btnRegister = (Button) findViewById(R.id.btnRegister);rn btnLinkToLogin = (Button) findViewById(R.id.btnLinkToLoginScreen);rn registerErrorMsg = (TextView) findViewById(R.id.register_error);rn rn // Register Button Click eventrn btnRegister.setOnClickListener(new View.OnClickListener() rn public void onClick(View view) rn String name = inputFullName.getText().toString();rn String email = inputEmail.getText().toString();rn String password = inputPassword.getText().toString();rn UserFunctions userFunction = new UserFunctions();rn JSONObject json = userFunction.registerUser(name, email, password);rn rn // check for login responsern try rn if (json.getString(KEY_SUCCESS) != null && json.getString(KEY_SUCCESS)!="") rn registerErrorMsg.setText("");rn String res = json.getString(KEY_SUCCESS); rn if(Integer.parseInt(res) == 1)rn // user successfully registredrn // Store user details in SQLite Databasern DatabaseHandler db = new DatabaseHandler(getApplicationContext());rn JSONObject json_user = json.getJSONObject("user");rn rn // Clear all previous data in databasern userFunction.logoutUser(getApplicationContext());rn db.addUser(json_user.getString(KEY_NAME), json_user.getString(KEY_EMAIL), json.getString(KEY_UID), json_user.getString(KEY_CREATED_AT)); rn // Launch Dashboard Screenrn Intent dashboard = new Intent(getApplicationContext(), DashboardActivity.class);rn // Close all views before launching Dashboardrn dashboard.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);rn startActivity(dashboard);rn // Close Registration Screenrn finish();rn elsern // Error in registrationrn registerErrorMsg.setText("Error occured in registration");rn rn rn catch (JSONException e) rn e.printStackTrace();rn rn rn );rn rn // Link to Login Screenrn btnLinkToLogin.setOnClickListener(new View.OnClickListener() rn rn public void onClick(View view) rn Intent i = new Intent(getApplicationContext(),rn LoginActivity.class);rn startActivity(i);rn // Close Registration Viewrn finish();rn rn );rn rnrn[/code]rnrn然后下面是logcat:rn[code=text]rn07-08 12:50:08.025: E/JSON(655): nn 404 Not Foundnn Not Foundn The requested URL /ah_login_api/ was not found on this server.nnrn07-08 12:50:08.025: E/JSON Parser(655): Error parsing data org.json.JSONException: Value
关于android,ksoap方面的webservice调用的一些问题
首先,关于参数这块在这个文章里面写的请清楚,什么是名字空间,方法名等等. http://www.2cto.com/kf/201605/504915.html。按这里的参数填就不会错了。
SoapObject 运行错误!
rnrn @SuppressWarnings("deprecation")rn public void AddInfo(String sId, String sSuppliers, String sFoodTypes,rn String sFoodSituation) throws IOException, XmlPullParserException rnrn // 指定WebService的命名空间和函数名rn SoapObject request = new SoapObject("http://Food", "Add");rn // 设置调用方法参数的值rn request.addProperty("sId", sId);rn request.addProperty("sFoodTypes", sFoodTypes);rnrnrn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rnrn envelope.setOutputSoapObject(request);rn AndroidHttpTransport aht = new AndroidHttpTransport(rn "http://192.168.0.254:8888/Service1.asmx");rn aht.call(null, envelope);rn rnrn一旦运行到SoapObject request = new SoapObject("http://Food", "Add"); 就报错!rnrn怀疑是ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar部署错误,但是第一次开发android,因此不知道如何处理!rnrn以前一直是.NET开发的!rnrnrn 已经添加rnrnrnrn
关于android mediaplay的调用问题
相信大家窦已经知道经典的mediaplayer的例子, 比如这里就有一个:http://www.iteye.com/topic/568547rnrn用service调用的时候,我有一个问题:rnrn当你点击“播放”, 音乐开始响起, 一会你再点击“播放”一下, 这时音乐会再起一次, 也就是这时背景音乐是两个不同时间的音乐同时在唱; 这时,你点击“停止”, 只有同时播放的两个音乐的其中一个声音停下来了, 另一个仍然继续在唱, 你再继续点“停止”也不会有效果了。rnrn请问,如何解决这个问题?
WebService之Soap协议数据解析篇
还是老规矩先上效果图! 相信大家很多人应该知道Web service是一种服务导向架构的技术,通过标准的Web协议提供服务,目的是保证不同平台的应用服务可以互操作。根据W3C的定义,Web服务(Web service)应当是一个软件系统,用以支持网络间不同机器的互动操作。网络服务通常是许多应用程序接口(API)所组成的,它们透过网络,例如Internet的远程服务器端,执行客户所提交服务的
webService与Spring整合后调用步骤
1.打开eclipse-》file》》new》》other》》web service client》》                                                                                                                                           发布的地址
关于android调用系统相册的奇葩问题
是这么一个情况 我其他 avtivity调用 是没任何问题 偏偏这一个 打开相册 ,然后点击图片 就闪退回到那个发起的activity,问问偏偏是 开始也还是可以的,就是后来这个activity代码多了之后 不知道从哪个时候起 只要调用相册 点击 然后就闪退出相册。。nnnIntent intent = new Intent(Intent.ACTION_PICK);n intent.setType("image/*");n startActivityForResult(intent, PHOTO_REQUEST_HEADER);
关于Android用移动2G网络访问WebService的问题
写的是一个天气预报查询和一个火车票查询的一个Android小应用。rn天气预报的WebService是:http://www.webxml.com.cn/WebServices/WeatherWebService.asmxrn火车票的WebService是:http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmxrn用的是Android模拟器测试的时候都是正常的。rn但是在真机上用移动2G的网络就获取数据,但是联通3G可以获取数据。rnrnrn求解。。。
关于android 通过webservice连接服务器的问题?
手持端是通过webservice连接服务器的。现在遇到一个问题是:手持端怎么样发布webservice服务?请高手指点下。
关于Android解析Webservice数据乱码的问题
小弟在做一个项目,项目用的是.net编写的WebService服务器,然后对数据进行Gzip加密才处理,我这边用Ksoap2组件进行WebService解析,然后下载数据使用。但是由于WebService服务器端用的是Unicode编码进行压缩,所以我这边接收后出现了乱码,我把文字编码分别设置为"utf-8","utf-16","GBK","gb2312","ISO8895-1"等等吧,都试过,都不行。解析后乱码如下:rn<��?��x��m��l�� ��v��e��r��s��i��o��n��=��"��1��.��0��"�� ��e��n��c��o��d��i��n��g��=��"��u��t��f��-��1��6��"��?��>��rn��rn我们这边服务器端用.net进行字符编码,我把源代码贴出来大家分析一下:rn#region 对字符串的压缩和解压缩函数rn public static string Compress(string uncompressedString)rn rn byte[] bytData = System.Text.Encoding.Unicode.GetBytes(uncompressedString);rn MemoryStream ms = new MemoryStream();rn using (Stream s = new ICSharpCode.SharpZipLib.BZip2.BZip2OutputStream(ms))rn rn s.Write(bytData, 0, bytData.Length);rn s.Close();rn rn byte[] compressedData = (byte[])ms.ToArray();rn ms.Close();rn return System.Convert.ToBase64String(compressedData, 0, compressedData.Length);rn rn我这边使用的Ksoap2进行数据接收、使用unGzip2进行解压,然后转码,但是当我查看打印后的解码字符串,却发现是乱码,我的Android代码如下:rn------省略前面的Ksoap2链接代码:rnif (envelope.getResponse() != null) rn SoapObject result = (SoapObject) envelope.getResponse();rn int count = result.getPropertyCount();rn if (count == 2) rn String schemezip = result.getProperty(0).toString();rn String datazip = result.getProperty(1).toString();rn byte[] buff01 = ZipUtils.unBZip2(Base64.decode(schemeziprn .getBytes()));rn String dtScheme = new String(buff01, "utf-8");rn byte[] buff02 = ZipUtils.unBZip2(Base64.decode(dataziprn .getBytes()));rn String dtScheme2 = new String(new String(buff02, "utf-8"));rn这里我发现dtScheme和dtSchem2两个字符串变量都是乱码,请问大家我该怎么办??
关于android中接受webservice转化json对象的问题~
小弟第一次用接触webservice和json,现在有这么一个问题~,不知道这么处理对不对,webservice中,我是读取了数据库中的内容然后包装成json对象,然后返回到android中,不过android中调用接收的是soapobject对象,那我怎么把它变成JSON对象呢~rn代码如下:rn服务器端:rnrnrnpackage com.snake.list;rnrnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.util.ArrayList;rnimport java.util.List;rnrnimport org.json.simple.JSONObject;rnrnpublic class testList rnrn rn public JSONObject test(String response)rn List list = new ArrayList();rn JSONObject obj = new JSONObject();rn Connection conn;rn String user = "sa";rn String pass = "123456";rn try rn Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");rn System.out.println("驱动成功");rn catch (ClassNotFoundException e) rn e.printStackTrace();rn System.out.println("类未找到错误");rn rnrn try rn conn = DriverManagerrn .getConnection(rn "jdbc:microsoft:sqlserver://192.168.16.223:1433;DatabaseName=" + response,rn user, pass);rn System.out.println("连接成功");rn Statement stmt = conn.createStatement();rn ResultSet rs = stmt.executeQuery("SELECT TOP 10 * FROM recipe ORDER BY NEWID()");rn rn while (rs.next()) rn obj.put(rs.getString("id"), rs.getString("name"));rn rn System.out.println(obj);rn System.out.println("读取完毕");rn rn rs.close();rn stmt.close();rn conn.close();rn System.out.println("OK,连接成功");rn catch (SQLException e) rn e.printStackTrace();rn System.out.println("SQL错误");rn rn rn rn return obj;rn rn rnrnrn客户端:rnrnpackage snake.android.test;rnrnimport java.io.IOException;rnimport java.util.ArrayList;rnimport java.util.List;rnrnimport org.json.JSONObject;rnimport org.ksoap2.SoapEnvelope;rnimport org.ksoap2.SoapFault;rnimport org.ksoap2.serialization.SoapObject;rnimport org.ksoap2.serialization.SoapSerializationEnvelope;rnimport org.ksoap2.transport.HttpTransportSE;rnimport org.ksoap2.transport.HttpsTransportSE;rnimport org.xmlpull.v1.XmlPullParserException;rnrnimport android.app.Activity;rnimport android.os.Bundle;rnimport android.widget.TextView;rnrnpublic class TestActivity extends Activity rn /** Called when the activity is first created. */rn private TextView test = null;rn private SoapObject soapObject;rnrn @Overridern public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main);rnrn test = (TextView) findViewById(R.id.test_textview);rnrn // 指定webService命名空间和调用的方法,可以从WSDL的文档中找到rn SoapObject request = new SoapObject("http://list.snake.com/", "test");rn // 设置调用方法的参数值,第一个参数是键值对的键,第二个是键值对的值rn request.addProperty("arg0", "caiguan");rn // 生成调用WebService方法的soap请求信息,该信息由SoapSerializationEnvelop对象描述rnrn /**rn * 1.创建SoapSerializationEnvelope对象时,需要用它的构造方法设置SOAP协议的版本号,rn * 该版本号需要根据WebService端的版本号设置。rn * 2.创建好SoapSerializationEnvelope后,要设置它的bodyOut属性rn * ,属性的值,就是前面创造的SoapObject对象rn */rnrn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(rn SoapEnvelope.VER11);rn envelope.bodyOut = request;rn envelope.dotNet = false;rn // 创建HttpTransportsSE对象,通过这个对象的构造方法,可以指定WebService的WSDL文档中的URLrn HttpTransportSE httpTran = new HttpTransportSE(rn "http://192.168.16.223:8080/TestListWebService/testListPort?wsdl");rn httpTran.debug = true;rn // 使用Call方法调用WebService方法。rn try rn // httpTran.call("http://192.168.16.223:8080/sayHello",envelope);rn httpTran.call(null, envelope);rnrn catch (IOException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn catch (XmlPullParserException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn // 使用getResponse方法获得WebService方法的返回结果rn rnrn // 使用bodyin方法获得返回结果rn// SoapObject result = (SoapObject) envelope.bodyIn;rn SoapObject result;rn try rn result = (SoapObject) envelope.getResponse();rn rn JSONObject obj = new JSONObject();rn obj.quote(result.toString());rn System.out.println("result = " + result.toString());rn System.out.println("obj = " + obj);rn catch (SoapFault e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn// rnrn rnrnrn求大侠帮忙~~
怎么解析android访问webservice返回的SoapObject数据
我的数据如下:rnmingdanResponsemingdanResult=anyTypeschema=anyTypeelement=anyTypecomplexType=anyTypechoice=anyTypeelement=anyTypecomplexType=anyTypesequence=anyTypeelement=anyType; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyType; element=anyType; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyType; element=anyType; element=anyTypesimpleType=anyTyperestriction=anyTypemaxLength=anyType; ; ; ; element=anyType; ; ; ; ; ; unique=anyTypeselector=anyType; field=anyType; ; ; ; diffgram=anyTypeDocumentElement=anyTypexyWaiFang=anyTypeid=33; ajbh=EGVGQCIUA0278; Shuoming=垃圾堆里发生率 ; wfAdd=河南省郑州市郑东新区商务内环路2号中油新澳大厦706A郑州东方三力; FromYwy=sdws003; ToYwy=admin; Addtime=2012-07-31T16:38:21.597+08:00; Lasttime=2013-01-23T17:07:46.04+08:00; wfState=Fresh; addID=2602; ajid=2630; xm=张永明; dqsj=2012-09-21T00:00:00+08:00; ; xyWaiFang=anyTypeid=35; ajbh=EGVGQCIUA0248; Shuoming=anyType; wfAdd=山东省济南市历城区汇科旺园小区3号楼2单元1702号; FromYwy=admin; ToYwy=admin; Addtime=2012-12-17T15:44:17.14+08:00; Lasttime=2013-02-21T14:14:08.1+08:00; wfState=Fresh; addID=2509; ajid=2600; xm=亓卫国; dqsj=2012-09-21T00:00:00+08:00; ; ; ; ; rnrn不知道为什么,前面多了很多看不懂的代码。然后我用的网上的方法解析:rnSoapObject result = (SoapObject)envelope.getResponse();rnfor (int i = 0; i < result.getPropertyCount(); i++)rnSoapObject soap = (SoapObject) result.getProperty(i);//到这一行数据好像没动,下面的xm也没取到rnString xm =soap.getProperty("xm").toString();rn
数据解析问题
[img=https://img-bbs.csdn.net/upload/201612/25/1482648100_16307.png][/img]rn给你一个TXE文件,格式如图,然后分析数据并得到结果rn暂时没有太好的思路,用list一行一行存储读取,如果A列一样,则比较B,如果B大于原有数据则删除上一条数据rn如果A不一样则是下一种数据,以此类推rn感觉还得去空格提取字符换,转换为int,比较麻烦,谁有比较好的思路吗,O(∩_∩)O谢谢
weblogic8.1发布webservice调用一次后再调用出错的问题
项目需要发布webservice,weblogic上跑的,马上做了个简单例子,一运行就成功,开心啊,再运行,出错???,于是重启服务,运行,又成功,再运行,报错!!!!多次试验,发现只有第一次运行成功。rn情况如下:rnweb.xml的修改:rnrn Apache-Axis Servletrn AxisServletrn org.apache.axis.transport.http.AxisServletrn rn rn AxisServletrn /servlet/AxisServletrn rn rn AxisServletrn *.jwsrn rn rn AxisServletrn /services/*rn rn在src根目录下建立Test.java 有一个public String getName(String id);方法,rn把Test.java拷贝到webroot根目录下,改名为Test.jwsrn启动服务,访问http://localhost:7001/axistest/Test.jws?wsdl成功rn客户端代码:rn String str_url="http://localhost:7001/axistest/Test.jws";rn org.apache.axis.client.Service service = new org.apache.axis.client.Service(); rn java.net.URL url = new java.net.URL(str_url);rn System.out.println("Start invoking....");rn Call call = (Call) service.createCall();rn call.setTargetEndpointAddress( new java.net.URL(str_url) );rn call.setOperationName(new QName("http://localhost:7001/axistest/Test.jws","getName"));rn String ret =(String)call.invoke( new Object[] "1" );rn System.out.println(ret);rn System.out.println("Finished the invoking.");rn第一次调用成功rn第二次调用失败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:SZ11PI0314rnrnjava.lang.NullPointerExceptionrn 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 org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)rn at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)rn at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)rn at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)rn at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)rn at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)rn at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)rn at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)rn at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)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.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)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 TestObject.main(TestObject.java:53)rnrnTestObject.main(TestObject.java:53)这一行正是代码String ret =(String)call.invoke( new Object[] "1" );rnrn调试几次,不知道这个NullPointerException是为何而来,还请高手帮忙解答,谢谢rn
求助 webservice调用问题
我在本地和局域网测试都是可以的,可是远程就不行,错误 org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messagesrn可能是SETSOAPACTION错误,我不知道该社为什么东西rn请求高手指点rnrnimport org.apache.axis.client.Call;rnimport org.apache.axis.client.Service;rnpublic class caClient rnrn public static void main(String[] args)rn rn try rn rnrn String endpoint ="http://59.208.244.6:6888/frk/FrkQueryAndCompareDM.jws?wsdl";rn Service service = new Service();rn Call call = (Call) service.createCall();rn call.setTargetEndpointAddress(endpoint);rn call.setOperationName("Compare");rn /***********设定19个参数********************************************/ rn call.addParameter("jgdm", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jgmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jglxmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("fddbr", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jgdz", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("zjhm", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jyfw", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT); rn call.addParameter("zcqr", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("pzjgdm", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("yzbm", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("njrq", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("zfrq", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("bzjgmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("pzjgmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("xzqhmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("zch", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jjhymc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("jjlxmc", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rn call.addParameter("memo", org.apache.axis.encoding.XMLType.XSD_DATE,rn javax.xml.rpc.ParameterMode.INOUT);rnrn /*********************************************************************/rn call.setReturnType(org.apache.axis.encoding.XMLType.XSD_BOOLEAN);rn //call.setUseSOAPAction(true);rn //call.setSOAPActionURI("http://www.my.com/Rpc");rn Object[] number = "000881573","中国人民财产保险股份有限公司阳新支公司","","","","","","","","","","","","","","","","","";rn rn Boolean result = (Boolean)call.invoke("Compare",number);rn System.out.println(result);rnrn // System.out.println("test"+bln);rn rn catch (Exception e)rn e.printStackTrace();rn System.err.println(e.toString());rn rn rnrn
关于WebService调用的问题
我的一个WebService在本地编译成功,但在其他项目中调用后,却出错,提示:System.Data.SqlClient.SqlException:在第一行:‘’附近有语法错误。并将错误指向了以下代码中的:SqlDataReader sdrConfig = cmd.ExecuteReader();rnrn以下是WebService中的方法:rnrn[code=C#]rn[WebMethod(Description = "服务器端调用该方法向客户端发送邮件,传输登录网关配置信息,发送成功则返回true,否则返回错误信息")]rn public string sendEMailForConfig(string emailServer, string sendAddress, string eUserName, string ePwd, string CompanyID)rn rn string[] config = new string[6];//存储配置信息rn string receiver = "";//收件人地址rnrn string conStr = System.Configuration.ConfigurationManager.ConnectionStrings["conGZMServerDB"].ConnectionString;//连接字符串rn SqlConnection conn = new SqlConnection(conStr);rn SqlCommand cmd = new SqlCommand();rn cmd.CommandText = "Select CompanyID,ClientCode,LoginID,LoginPassword,GatewayIP,NotePort,EMail From Company Where CompanyID =" + CompanyID;rn cmd.CommandType = CommandType.Text;rn cmd.Connection = conn;rn rn tryrn rn conn.Open();rn rn SqlDataReader sdrConfig = cmd.ExecuteReader();rn if (sdrConfig.Read())rn rn int i=0;rn for ( ; i < sdrConfig.FieldCount-1; i++)rn rn config[i] = sdrConfig[i].ToString();//将配置信息存储在数组中rn rn receiver = sdrConfig[i].ToString();//收件人邮箱地址rn rn if (receiver.Replace(" ", "").Equals(""))rn rn return "收件人邮箱地址不能为空。";rn rn rn sdrConfig.Close(); rnrn createConfigIni(config);//写配置文件 rn sendEmail(emailServer, sendAddress, eUserName, ePwd, receiver, path);//发邮件rn return "发送成功";rnrn rn catch (Exception ex)rn rn return ex.ToString();rn rn finallyrn rn conn.Dispose();rn cmd.Dispose();rn rnrn rn[/code]rnrn请高手指教,谢谢!
关于调用webservice的问题
我在调用一个webservice的时候,这个webservice给我提供两个方法Get3gpFiles和GetGifFiles用来分别获取3gp文件和gif文件。我在调用是发现。当我在GetGifFiles的时候我不用call.setOperation("GetGifFiles");方法,能正常调用GetGifFiles方法;而在Ger3gpFiles时,如果使用call.setOperation("Get3gpFiles");方法的话。就会报错。我在axis的文档中看了call.setOperation()方法的源代码,并没发现call.setOperation(),有什么特殊的。想请教各位大大,这个call.setOperation()的作用,以及为什么出现我上面的情况?(可以排除是webservice的问题)
Delph7 调用WebService的问题
这是delphi调用cxf写的webservice,自动生成的接口文件rn getListOfMedInfo = class(TRemotable)rn privatern Ftitle: WideString;rn FNo: WideString;rn FstartDate: WideString;rn FendDate: WideString;rn publicrn constructor Create; override;rn publishedrn property title: WideString read Ftitle write Ftitle;rn property No: WideString read FcarNo write FcarNo;rn property startDate: WideString read FstartDate write FstartDate;rn property endDate: WideString read FendDate write FendDate;rn end;rnrn getListOfMedInfoResponse = class(TRemotable)rn privatern Freturn: return;rn publicrn constructor Create; override;rn destructor Destroy; override;rn function GetMedInfoArray(Index: Integer): MedInfo;rn function GetMedInfoArrayLength: Integer;rn property MedInfoArray[Index: Integer]: MedInfo read GetMedInfoArray; default;rn property Len: Integer read GetMedInfoArrayLength;rn publishedrn property return: return read Freturn write Freturn;rn end;rnrnrn IMedService = interface(IInvokable)rn ['9F95E565-B557-9F0B-09D7-38B9B31FEB25']rn function getListOfMedInfo(const parameters: getListOfMedInfo): getListOfMedInfoResponse; stdcall;rn end;rnrnrn这是调用代码rnvarrnws:IMedService;rngi:getListOfMedInfo;rngir:getListOfMedInfoResponse;rnrnbeginrnws:=HTTPRIO1 as IMedService;rngi:=getListOfMedInfo.Create;rngi.Title:='vc';rngi.No:='256';rngi.startDate:='20130101';rngi.endDate:='20130110';rngir:=ws.getListOfMedInfo(gi);rnrn上面都正常,执行到下面这几句就出错,请教各位要怎么写rnshowmessage(inttostr(gir.Len));rnshowmessage(gir.MedInfoArray[0].price);rn
VB调用webservice问题
VB制作的程序如何通过webservice来操作oracle数据库表rn没有用过webservice,不知道如何来操作实现rn最好有相关源码提供,因为都是需要查询表及插入表用
php调用webservice问题
我已经写好webservice,主要是做加密解密的,web服务是用c#写的。rn用php调用的结果为什么和c#调用的结果不一样呢?
webservice调用外汇的问题
[code=java]private final static String NAMESPACE = "http://WebXml.com.cn/";rn private final static String URL = "http://webservice.webxml.com.cn/webservices/WeatherWS.asmx";rn private final static String METHOD_NAME = "getRegionCountry";rn private final static String SOAP_ACTION = "http://WebXml.com.cn/getRegionCountry";[/code][code=java]tryrn SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);rn rn SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);rn envelope.bodyOut = rpc;rn envelope.dotNet = true;rn envelope.setOutputSoapObject(rpc);rn rn HttpTransportSE ht = new HttpTransportSE(URL);rn ht.debug = true;rn rn ht.call(SOAP_ACTION, envelope);rn rn mDetail = (Object)envelope.getResponse();rn// mDetail = (SoapObject) envelope.getResponse();rn Log.i(TAG, ""+mDetail.toString());rn rn catch(Exception e)rn e.printStackTrace();rn [/code]我用这种方法调用其他服务是没问题的,但调用这个外汇就有问题(因为没有参数,所以rpc.addProperty();就没有)下面是log:rn[img=https://img-bbs.csdn.net/upload/201307/30/1375177456_264958.jpg][/img]
webservice调用问题
在另一台机器上后台(非ajax调用)调用服务端webservice,一定要生成一个客户端webservice项目吗?还是直接在原有的项目中写调用的代码就行?
webservice调用线程问题
[code=C#]rn [XmlInclude(typeof(string))]rn [WebMethod]rn public string ConvertFile(string userID, string docID)rn rn object missing = Type.Missing; ;rn CSSmart.Utility.Utils.Log("0", @"\\10.103.66.6\moafiles");rn Thread td = new System.Threading.Thread(new System.Threading.ThreadStart(() =>rn rn CSSmart.Utility.Utils.Log("1", @"\\10.103.66.6\moafiles");rn Word.ApplicationClass word = new Word.ApplicationClass();rn CSSmart.Utility.Utils.Log("2", @"\\10.103.66.6\moafiles");rn word.Quit(ref missing, ref missing, ref missing);rn ));rn td.Start();rn return "aa";rn rn[/code]rnrn打日志,0可以显示,1、2打不出来,线程内的方法没有执行,返回结果aarnrn请问这是为什么?
有关WebService的调用问题
客户端在调用服务器端的WebService时进入了异常/rn异常内容说是可能是SOAP版本不一致造成的rnrn客户端是通过服务器提供的Servicern的ServiceURL和WSDL生成的接口文件来调用服务里面的一些服务和方法的,rnrn服务器端是一个虚拟机环境下装了一个软件,这个软件就是我的客户端要调用的Servicern想请问一下我的服务器端是不是必须要装.Net或者IIS啊?rnrn希望高手指教
C#调用WebService问题
两台服务器:rn http://test1/test.asmxrn http://test2/test.asmxrn 里面都有相同的Webservice:test --> 作用是把输入的值再返回回来.rnrn用C#写的一个程序调用(引用名称: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
Java调用webservice问题
我用Java调用webservice接口,此方法返回的数据的类型是DataTable,我该如何接受和遍历呢?希望大哥大姐赐教!!
调用webservice的问题
[code="java"] public static void main(String[] args) rn tryrn //标识WebService的具体路径 rn String endpoint = "http://project.test.gov.cn/api/test.asmx?wsdl"; rn //创建Service实例 rn Service service = new Service(); rn //通过Service实例创建Call实例 rn Call call = (Call)service.createCall(); rn //将WebService的服务路径加入到Call实例中,并为Call设置服务的位置 rn URL url = new URL(endpoint); rn call.setTargetEndpointAddress(url); rn //调用WebService方法 rn //call.setOperationName("AddInfo"); rn call.setOperationName(new QName("http://www.test.net/api/","AddInfo")); rn rn //由于需要认证,故需要设置调用的用户名和密码。 rn call.getMessageContext().setUsername("aaa");// 设置用户名。 rn call.getMessageContext().setPassword("bbb");// 设置密码 rnrn //调用WebService传入参数 rn String res = (String)call.invoke(new Object[] getXml()); rn System.out.println(res); rn catch(Exception e)rn e.printStackTrace();rn rn [/code]
JS调用WebService问题
rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn
win2000下调用webservice的问题
调用webservice服务,将soap在xp下打的包,按顺序注册的dll为:MSSOAP30.DLL,MSSOAPR3.DLL,WISC30.dllrnmsxml4r.dll,msxml4.dll。这样打的包在xp机器上运行没有问题,但是拿到2000下安装后调用webservice服务时就会出异常!不知道打包的时候还需要什么dll,请高手指点!
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件