SOAP调用webservice 出现无法连接服务器的错误

SalesOrder_HCBNSales_SOService 是一个类。
通过调用该类下面的方法: SalesOrder_HCBNSales_SO(参数)调用webservice传送数据。

但是在调用这个方法时报错:无法连接服务器!
请教各位大神解惑,对这中使用webservice的方式不熟悉。
下面是使用该类的方法的调用截图:
图片说明
下面是该方法的具体内容:
图片说明

1个回答

这要看你最后一个图的网站,地址还有你倒数第二个图的用户名密码

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android调用WebService的时候出现问题
我按照网上代码写出来的调用WebService的程序,总是返回'服务器无法处理请求。-->未将对象应用设置到对象实例' 我的代码如下: public void other() { // 命名空间 String nameSpace = " www.webxml.com.cn/"; // 调用的方法名称 String methodName = "getSupportCity"; // EndPoint String endPoint = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"; // SOAP Action String soapAction = "http://WebXml.com.cn/getSupportCity"; HttpTransportSE transport = new HttpTransportSE(endPoint); // 指定WebService的命名空间和调用的方法名 SoapObject rpc = new SoapObject(nameSpace, methodName); rpc.addProperty("byProvinceName", "重庆"); // 生成调用WebService方法的SOAP请求信息,并指定SOAP的版本 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10); // 设置是否调用的是dotNet开发的WebService envelope.dotNet = true; transport.debug = true; // 等价于envelope.bodyOut = rpc; envelope.setOutputSoapObject(rpc); try { // 调用WebService transport.call(soapAction, envelope); } catch (Exception e) { e.printStackTrace(); } // 获取返回的数据 Object object = envelope.bodyIn; if(object==null){ Log.i(TAG, "return object is null!"); return; } if(object instanceof SoapFault){ Log.i(TAG, "SoapFault refult is :"+ object.toString()); return; }else if(object instanceof SoapObject){ // 获取返回的结果 Log.i(TAG, "SoapObject refult is :"+ object.toString()); } } ---------------------------------------------------- 返回的logcat打印如下: 01-22 16:43:34.966: I/MainActivity(1898): SoapFault refult is :SoapFault - faultcode: 'soap:Server' faultstring: '服务器无法处理请求。 ---> 未将对象引用设置到对象的实例。' faultactor: 'null' detail: org.kxml2.kdom.Node@4228be08 ---------------------------------------------- 我调用了很多webservice接口,结果都是返回这个,应该不是服务器的问题,大神求指教!!
axis调用webservice报参数为空的问题
axis调用无参数的接口可以,但是一但有参数就出错 错误信息大致是:参数为空,但是我传的值打印出来是有值的。下面附上代码,大佬帮忙看看!谢谢 PS:大致的错误我明白了,这个链接需要两个参数一个data 一个GUID 但是wsdl文件里只有一个data参数!!所以这个GUID只能拼接上去,axis可以拼接吗?在哪个地方拼接 public static String MethodsGeneral(String url,String methods, Map<String, Object> params,String str) { String GUID="7b33dd14-b183-4d1e-8c96-04baf421498f"; String result=""; try{ String namespace ="http://tempuri.org/"; String soapActionUI = "http://tempuri.org/"+methods; String endpoint = url; Service service = new Service(); Call call = (Call)service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setUseSOAPAction(true); call.setSOAPActionURI(soapActionUI); call.setOperationName(new QName(namespace,methods)); call.addParameter(new QName(namespace,"data"),org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.addParameter(new QName(namespace,"GUID"),org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); JSONObject jsonObject = new JSONObject(params); HashMap<String, String> allParam = new HashMap(); String beforeEnc = jsonObject.toString(); String cipherInfo = null; try { cipherInfo = AESUtil.encrypt(beforeEnc); } catch (Exception e) { e.printStackTrace(); } // 把加密后的字符串转化为16进制 String temp = StringUtil.str2HexStr(cipherInfo); //访问的方法名 System.out.println(temp); System.out.println(GUID); result = (String)call.invoke(new Object[]{temp,GUID}); }catch(Exception e){ e.printStackTrace(); System.out.println("调用webservice失败!"); } //將result字符串解析成要用的字符串 return result; } 以下是错误信息:AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---&gt; System.NullReferenceException: 未将对象引用设置到对象的实例。 在 Fuli.WebService.BaseWebService.AESEncrypt(String toEncrypt) 位置 D:\花汇购项目\Backend\Fuli.WebService\BaseWebService.cs:行号 426 在 Fuli.WebService.BaseWebService.GetExceptionReturnInfo(String exMessage) 位置 D:\花汇购项目\Backend\Fuli.WebService\BaseWebService.cs:行号 311 在 Fuli.WebService.UserWebService.GetAddresslistByUsername(String data) 位置 D:\花汇购项目\Backend\Fuli.WebService\UserWebService.asmx.cs:行号 689 --- 内部异常堆栈跟踪的结尾 --- faultActor: faultNode: faultDetail:
IOS 调用C#写的Webservice ,传递的参数到Webservice取出的值为NULL
问题描述:IOS 调用C#写的Webservice ,传递的参数到Webservice取出的值为NULL,传递前在IOS里测试能取到值,麻烦用过这块的帮我看一下,已困扰我两天 啦~~哈哈 代码: NSMutableString *tps=[NSMutableString stringWithString:@""]; //存储参数名称 NSMutableString *vps=[NSMutableString stringWithFormat:@""];//存储参数值 NSMutableString *ts=[NSMutableString stringWithFormat:@""];//组合字符串变量 NSMutableString *mreakString=[NSMutableString stringWithFormat:@""];//组合字符串变量 [mreakString appendString:@"<"]; [mreakString appendString:MethodName]; //方法名 [mreakString appendString:@" xmlns=\"http://tempuri.org/\">"]; //[ParametersKey count] for (int i = 0; i <[ParametersKey count]; i++) { tps = [ParametersKey objectAtIndex:i]; vps = [ParametersValue objectAtIndex:i]; [ts appendString:@"<"]; [ts appendString:@"cnono"];//参数名 [ts appendString:@">"]; [ts appendString:@"17"]; //参数值 (--- 17 传递到webservice为NULL值 ----) [ts appendString:@"</"]; [ts appendString:@"cnono"]; [ts appendString:@">"]; [mreakString appendString:ts]; } [mreakString appendString:@"</"]; [mreakString appendString:MethodName]; [mreakString appendString:@">"]; NSMutableString *soapMessage2=[NSMutableString stringWithFormat:@""];; [soapMessage2 appendString:@"</soap:Envelope>"]; 生成的协议字符串为: requestData-----><?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> <soap:Body > <getSelectData xmlns="http://tempuri.org/";/> </soap:Body> </soap:Envelope> <deleteCargoInfo xmlns="http://tempuri.org/";> <cnono>17</cnono> </deleteCargoInfo> </soap:Envelope> 服务器返回的串为: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soap:Body><deleteCargoInfoResponse xmlns="http://tempuri.org/";><deleteCargoInfoResult>1:webservicer return:Sql=delete from C where Cno=,param=</deleteCargoInfoResult></deleteCargoInfoResponse></soap:Body></soap:Envelope>
android调用webservice的传至问题
webservice端(地址:http://qingfeng-bbs.oicp.net:61/TCLYWebService.asmx) ================================================== using System; using System.Collections.Generic; using System.Web; using System.Web.Services; using TCLYWebService.Bean; using TCLYWebService.DB; using System.Web.Services.Protocols; namespace TCLYWebService { /// <summary> /// TCLYWebService 的摘要说明 /// </summary> [WebService(Namespace = "http://qingfeng-bbs.oicp.net:61/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class TCLYWebService : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public string InsertJd(string guojia, string shengji, string shiji, string xianji, string jdindex, string jdName, string locationX, string locationY) { DB.DB d = new DB.DB(); //JD jd = new JD(); //jd.Guojia = guojia; //jd.Shengji = shengji; //jd.Shiji = shiji; //jd.Xianji = xianji; //jd.Jdindex = jdindex; //jd.JdName = jdName; //jd.LocationX = Double.Parse(locationX); //jd.LocationY = Double.Parse(locationY); //string sql = string.Format("insert jd values('{0}','{1}','{2}','{3}','{4}','{5}',{6},{7})", jd.Guojia, jd.Shengji, jd.Shiji, jd.Xianji, jd.Jdindex, jd.JdName, jd.LocationX, jd.LocationY); string sql = string.Format("insert jd values('{0}','{1}','{2}','{3}','{4}','{5}',{6},{7})", guojia, shengji, shiji, xianji, jdindex, jdName, locationX, locationY); return d.inupdelData(sql); } } } ``` ``` android端传参数调用 ================================================== private void initBtnListener() { // TODO Auto-generated method stub btninsertjd.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub // 执行webservice后返回的结果 final Handler handler = new Handler() { @Override public void handleMessage(Message msg) { // TODO Auto-generated method stub if (msg.what == msg_suc) { SoapObject result = (SoapObject) msg.obj; // JSONObject obj=new // JSONObject(result.getProperty(0).toString()); new AlertDialog.Builder(MainActivity.this).setTitle("提示") .setMessage(result.getProperty(0).toString()).setPositiveButton("OK", null).show(); } } }; // 执行webService new Thread(new Runnable() { public void run() { // 命名空间 String nameSpace = "http://qingfeng-bbs.oicp.net:61"; // 调用的方法名称 // String methodName = "InsertJd"; String methodName = "HelloWord"; // EndPoint String endPoint = "http://qingfeng-bbs.oicp.net:61/TCLYWebService.asmx"; // SOAP Action // String soapAction = "http://qingfeng-bbs.oicp.net:61/InsertJd"; String soapAction = "http://qingfeng-bbs.oicp.net:61/HelloWord"; // 实例化SoapObject对象 SoapObject soapObject = new SoapObject(nameSpace, methodName); // soapObject.addAttribute("guojia", "中国"); // soapObject.addAttribute("shengji", "云南"); // soapObject.addAttribute("shiji", "保山"); // soapObject.addAttribute("xianji", "腾冲"); // soapObject.addAttribute("jdindex", "银杏村"); // soapObject.addAttribute("jdName", "银杏"); // soapObject.addAttribute("locationX", "45.12331"); // soapObject.addAttribute("locationY", "564.122313"); // soapObject.addProperty("guojia", "中国"); // soapObject.addProperty("shengji", "云南"); // soapObject.addProperty("shiji", "保山"); // soapObject.addProperty("xianji", "腾冲"); // soapObject.addProperty("jdindex", "银杏村"); // soapObject.addProperty("jdName", "银杏"); // soapObject.addProperty("locationX", "45.12331"); // soapObject.addProperty("locationY", "564.122313"); // JSONObject req = new JSONObject(); // try { // req.accumulate("guojia", "中国"); // req.accumulate("shengji", "云南"); // req.accumulate("shiji", "保山"); // req.accumulate("xianji", "腾冲"); // req.accumulate("jdindex", "银杏"); // req.accumulate("jdName", "银杏村"); // req.accumulate("locationX", "45.12331"); // req.accumulate("locationY", "564.122313"); // } catch (JSONException e1) { // // TODO Auto-generated catch block // e1.printStackTrace(); // } // soapObject.addProperty("parameters", req.toString()); // 使用soap1.1协议创建Envelop对象 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12); envelope.bodyOut = soapObject; envelope.dotNet = true; // 等价于envelope.bodyOut = soapObject; // envelope.setOutputSoapObject(soapObject); HttpTransportSE ht = new HttpTransportSE(endPoint); try { ht.call(soapAction, envelope); if (envelope.getResponse() != null) { // 获取服务器响应返回的soap消息 SoapObject result = (SoapObject) envelope.bodyIn; Message msg = new Message(); msg.obj = result; msg.what = msg_suc; handler.sendMessage(msg); } } catch (Exception e) { e.printStackTrace(); } } }).start(); // new AlertDialog.Builder(MainActivity.this) // .setTitle("提示") // .setMessage("执行了") // .setPositiveButton("OK", null) // .show(); } }); } ``` ```
android ksoap2调用webservice android端代码应该怎么写 跪求!
这是我在别人那里拔下来的代码 可以连接webservice 我想修改成可以返回数据库数据的 webservice已经可以实现查询数据库 只是在这我不会改 求求你们帮帮我 在线等 如果可以我发红包感谢 谢谢大家了 package com.bang.testwebservicecall; import java.io.IOException; import java.util.Dictionary; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.ksoap2.SoapEnvelope; import org.ksoap2.SoapFault; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpResponseException; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.XmlPullParserException; import android.os.AsyncTask; import android.os.Bundle; import android.app.Activity; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import android.support.v4.app.NavUtils; public class MainActivity extends Activity { TextView tvMessage; final String METHOD_HELLO_WORLD = "HelloWorld"; final String METHOD_ECHO_MESSAGE = "selectAllCargoInfor"; //服务器链接 final String WEB_SERVICE_URL = "http://192.168.2.160:8080/Service1.asmx?WSDL"; final String Namespace = "http://192.168.2.160/";//命名空间 @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initBtn();// 初始化按钮 initTv(); } private void initTv() { tvMessage = (TextView) this.findViewById(R.id.tvMessage); } private void initBtn() { View btnHelloWorld = this.findViewById(R.id.btnHelloWorld); btnHelloWorld.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Map<String, String> values = new HashMap<String, String>(); values.put("selectAllCargoInforResule", ""); Request(METHOD_HELLO_WORLD); } }); View btnEchoMessage = this.findViewById(R.id.btnEchoMessage); btnEchoMessage.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Map<String, String> values = new HashMap<String, String>(); values.put("msg", "这是Android手机发出的信息"); Request(METHOD_ECHO_MESSAGE, values); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } /** * 调用WebService * * @return WebService的返回值 * */ public String CallWebService(String MethodName, Map<String, String> Params) { // 1、指定webservice的命名空间和调用的方法名 SoapObject request = new SoapObject(Namespace, MethodName); // 2、设置调用方法的参数值,如果没有参数,可以省略, if (Params != null) { Iterator iter = Params.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); request.addProperty((String) entry.getKey(), (String) entry.getValue()); } } // 3、生成调用Webservice方法的SOAP请求信息。该信息由SoapSerializationEnvelope对象描述 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER12); envelope.bodyOut = request; // c#写的应用程序必须加上这句 envelope.dotNet = true; HttpTransportSE ht = new HttpTransportSE(WEB_SERVICE_URL); // 使用call方法调用WebService方法 try { ht.call(null, envelope); } catch (HttpResponseException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (XmlPullParserException e) { e.printStackTrace(); } try { final SoapPrimitive result = (SoapPrimitive) envelope.getResponse(); if (result != null) { Log.d("----收到的回复----", result.toString()); return result.toString(); } } catch (SoapFault e) { Log.e("----发生错误---", e.getMessage()); e.printStackTrace(); } return null; } /** * 执行异步任务 * * @param params * 方法名+参数列表(哈希表形式) */ public void Request(Object... params) { new AsyncTask<Object, Object, String>() { @Override protected String doInBackground(Object... params) { if (params != null && params.length == 2) { return CallWebService((String) params[0], (Map<String, String>) params[1]); } else if (params != null && params.length == 1) { return CallWebService((String) params[0], null); } else { return null; } } protected void onPostExecute(String result) { if (result != null) { tvMessage.setText("服务器回复的信息 : " + result); } }; }.execute(params); } }
C++ webservice的开发
这个月我刚进公司 领导就让我写C++ http服务器,http服务器我听都没有听说我,老大还让我自己研究,没办法,经过我俩个星期的百度,加上csdn的技术问答,终于弄出C++http服务器与java客户端的通信,之后又让我在程序上写webservice,我又百度搜了一个星期,大概有一点眉目了, ----- WebService通过HTTP协议发送请求和接收结果时,发送的请求内容和结果内容都采用XML格式封装,并增加了一些特定的HTTP消息头,以说明HTTP消息的内容格式,这些特定的HTTP消息头和XML内容格式就是SOAP协议。SOAP提供了标准的RPC方法来调用Web Service。-- 不知道对不对,我想问的就是,如果上面是对的话,我写的是发送请求呢还是接收结果呢? 还有最重要的,C++怎么解析soap请求和封装soap啊,万能的csdn啊 在帮我一次吧!
webservice服务器返回值为null
用myeclipse的jax-ws做的服务器,按照如下教程做的。 http://blog.csdn.net/flightme/article/details/6977191 服务器挂的tomcat7,用wsdl2objc转换为xcode的代码,在xcode中调用,以下是xcode的教程。 http://www.devdiv.com/iOS_iPhone-_wsdl_objc_web_service_soap_sample-thread-36521-1-1.html 现在的问题是,苹果的客户端发送数据成功,但是jax-ws的服务器端接收到的是null,但是客户端能够收到服务器端的返回值。 求大神帮忙~小弟先在此谢过。
android调用wsdl参数值取不到
用安卓调用 javawebservice,以wsdl的形式,但是服务器端取不到传递的参数,具体代码如下,请高手帮忙!多谢 public static void getRemoteInfo(String phoneSec) { // 命名空间 // 调用的方法名称 String methodName = "login"; // EndPoint // SOAP Action String soapAction = nameSpace+methodName; // 指定WebService的命名空间和调用的方法名 SoapObject rpc = new SoapObject(nameSpace, methodName); // 设置需调用WebService接口需要传入的两个参数mobileCode、userId rpc.addProperty("userId", "lcq"); --这里的两个参数 rpc.addProperty("passWord", "123123123"); --这里的两个参数 // 生成调用WebService方法的SOAP请求信息,并指定SOAP的版本 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10); envelope.bodyOut = rpc; // 设置是否调用的是dotNet开发的WebService envelope.dotNet = true; // 等价于envelope.bodyOut = rpc; envelope.setOutputSoapObject(rpc); HttpTransportSE transport = new HttpTransportSE(endPoint); try { // 调用WebService transport.call(soapAction, envelope); } catch (Exception e) { e.printStackTrace(); } // 获取返回的数据 SoapObject object = (SoapObject) envelope.bodyIn; // 获取返回的结果 String result = object.getProperty(0).toString(); // 将WebService返回的结果显示在TextView中 //resultView.setText(result); }
如何解决java axis 调用webservice服务器操作异常
Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507) at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980) at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055) at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145) at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478) at org.apache.axis.message.MessageElement.output(MessageElement.java:1208) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269) at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530) at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554) at org.apache.axis.Message.getContentType(Message.java:486) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.jsp.sendms_jsp._jspService(sendms_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) {http://xml.apache.org/axis/}hostname:89501e4cc6db46e java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269) at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530) at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554) at org.apache.axis.Message.getContentType(Message.java:486) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.jsp.sendms_jsp._jspService(sendms_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507) at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980) at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055) at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145) at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478) at org.apache.axis.message.MessageElement.output(MessageElement.java:1208) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315) ... 46 more
ThinkPHP中怎么调用nusoap?
项目中需要使用webservice,我们选了nusoap,但是一直无法将ThinkPHP与nusoap这两者结合起来用,求大神帮助。 服务器端: <?php class ServerAction extends Action { public function _initialize() { Vendor('Ns.nusoap'); // 初始化服务对象 , 这个对象是类 soap_server 的一个实例 $soap = new soap_server (); // 调用服务对象的 register 方法注册需要被客户端访问的程序。 // 只有注册过的程序,才能被远程客户端访问到。 $soap->register ( 'hello' ); // 最后一步,把客户端通过 post 方式提交的数据,传递给服务对象的 service 方法。 // service 方法处理输入的数据,调用相应的函数或方法,并且生成正确的反馈,传回给客户端。 $soap->service ( $HTTP_RAW_POST_DATA ); } // 定义服务程序 function hello() { return 'Hello World!'; } } ?> 客户端: <?php class ClientAction extends Action { public function test() { Vendor('Ns.nusoap'); // 初始化客户端对象,这个对象是类 soapclient 的一个实例, // 把服务程序的 URL 地址传递给soapclient类的构造函数。 $client = new soapclient ( 'http://127.0.0.1/nusoap/Server/' ); // 利用客户端对象的 call 方法调用 WEB 服务的程序 $str = $client->call ( 'hello' ); // 客户端对象的 getError() 方法可以用来检查调用过程是否出现错误。 // 如果没有错误, getError() 方法返回 false ;如果有错误, getError()方法返回错误信息。 if (! $err = $client->getError ()) { echo " 程序返回 :", htmlentities ( $str, ENT_QUOTES ); } else { echo " 错误 :", htmlentities ( $err, ENT_QUOTES ); } } } ?> nusoap类库放在ThinkPHP/Extend/Vendor/Ns/下面。 运行客户端报错:错误 :XML error parsing SOAP payload on line 1: Reserved XML Name 如果将服务器端代码直接写成一个php文件,不用ThinkPHP就没有问题,如下: <?php require_once ("../../ns/nusoap.php"); // 初始化服务对象 , 这个对象是类 soap_server 的一个实例 $soap = new soap_server (); // 调用服务对象的 register 方法注册需要被客户端访问的程序。 // 只有注册过的程序,才能被远程客户端访问到。 $soap->register ( 'hello' ); // 最后一步,把客户端通过 post 方式提交的数据,传递给服务对象的 service 方法。 // service 方法处理输入的数据,调用相应的函数或方法,并且生成正确的反馈,传回给客户端。 $soap->service ( $HTTP_RAW_POST_DATA ); // 定义服务程序 function hello() { return 'Hello World!'; } ?>
Android studio使用HttpurlConnection无法连接的问题。
背景:Android studio编写获取webservice soap xml 我在eclipse中用java编写的个测试例子, 用的是HttpurlConnection可以成功读取数据,但是我搬到Android studio中,无法连接,会跳转到catch。我也按照网上说的方法加了线程,以及httpclient不能使用情况下载build中加入相关uselibary等等方法,都无法连接成功。请问我应该怎么解决,有懂的朋友帮帮忙,谢谢。 以下是代码: confirm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v){ new Thread(new Runnable() { @Override public void run() { String id= edit.getText().toString(); httpClient(id); } }).start(); //这段代码在主线程中调用,开启一个线程 // String id= edit.getText().toString(); // httpClient(id); } }); } private void httpClient(String id) { //以SOAP1.1的格式发送 String httpBody = XMLDom.requestSOAP1(id); myXMLPost(httpBody); } private void myXMLPost(final String httpBody) { Map<String, String> map1 = new HashMap<String, String>(); try {//创建post对象 HttpURLConnection connection = (HttpURLConnection) new URL("http://119.10.51.138:86/erp.asmx").openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "text/xml; charset=utf-8"); connection.setRequestProperty("SOAPAction", "http://tempuri.org/GetPROC_ORDER_Detail"); connection.connect();//连接服务器 OutputStream os = (OutputStream) connection.getOutputStream(); os.write(httpBody.getBytes()); os.flush(); os.close(); InputStream is = (InputStream) connection.getInputStream();//获取数据,真正的请求从此处开始 byte[] bts = new byte[is.available()]; is.read(bts); String detailResult = new String(bts); map1 = XMLDom.getLoginResult(detailResult); String s = map1.get("sl"); result.setText(s); } catch (Exception e) { e.printStackTrace(); result.setText("连接错误"); } }
怎么使用javascript或者ajax去调用C++通过gsoap建立的服务器中的C++接口?
网上的资料基本都是C++通过gsoap建立服务端,然后通过客户端的方式去访问服务端中的C++接口。 我现在按照网上的一些教程,用C++通过gsoap建立了一个服务器,也生成了相关的wsdl文件。然后我用 C++再通过gsoap建立一个客户端,去调用我服务端的接口,这样的方式是可以调用的。那么问题来了: 我现在不通过建立客户端的方式去调用服务端的接口,我想通过打开网页的方式,在前端中用js(javascript)或者ajax的方式去调用,该怎么调用?我没接触前端,头痛啊,大神求教,SOS急! 这是参考网友的例子生成的wsdl文件: ``` <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:HTTP="http://schemas.xmlsoap.org/wsdl/http/" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns="http://tempuri.org/ns.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://tempuri.org/ns.xsd/Service.wsdl" targetNamespace="http://tempuri.org/ns.xsd/Service.wsdl" name="Service"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://tempuri.org/ns.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" targetNamespace="http://tempuri.org/ns.xsd" attributeFormDefault="unqualified" elementFormDefault="unqualified"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <!-- operation request element --> <element name="helloword"> <complexType> <sequence> </sequence> </complexType> </element> <!-- operation response element --> <element name="hellowordResponse"> <complexType> <sequence> <element name="result" maxOccurs="1" minOccurs="0" type="h-string"/> <!-- ns__helloword::result --> </sequence> </complexType> </element> </schema> </types> <message name="hellowordRequest"> <part name="Body" element="ns:helloword"/> <!-- ns__helloword::ns__helloword --> </message> <message name="hellowordResponse"> <part name="Body" element="ns:hellowordResponse"/> </message> <portType name="ServicePortType"> <operation name="helloword"> <documentation>Service definition of function ns__helloword</documentation> <input message="tns:hellowordRequest"/> <output message="tns:hellowordResponse"/> </operation> </portType> <binding name="Service" type="tns:ServicePortType"> <SOAP:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="helloword"> <SOAP:operation soapAction=""/> <input> <SOAP:body use="literal" parts="Body"/> </input> <output> <SOAP:body use="literal" parts="Body"/> </output> </operation> </binding> <service name="Service"> <documentation>gSOAP 2.8.44 generated service definition</documentation> <port name="Service" binding="tns:Service"> <SOAP:address location="http://localhost:80"/> </port> </service> </definitions> 下面是C++服务器中接口: int ns__helloword(struct soap*, char **result) { (*result) = "hello world!"; return SOAP_OK; } 目的很简单就是想在网页html中调用这个接口。没接触过前端也没接触过java和ajax,js知道一点点,大神们请指点一二啊。 ```
webservice问题 Server.userException
先说下情况,两台调用服务的服务器都是LINUX,本机都是win,本机调用服务正常,但是服务器上调用服务报错,同样代码,但是服务器调用另外一个服务器的测试服务又是可以的,只有在调用这个服务的时候报以下错误: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Bad envelope tag: script faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Bad envelope tag: script at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:71) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:614) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3135) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:880) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:642) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:326) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at cn.com.weaver.services.webservices.WorkflowServiceHttpBindingStub.doCreateWorkflowRequest(WorkflowServiceHttpBindingStub.java:1182) at cn.com.weaver.services.webservices.WorkflowServicePortTypeProxy.doCreateWorkflowRequest(WorkflowServicePortTypeProxy.java:139) at com.cloudstore.webservice.WorkflowWebservice.createRequest(WorkflowWebservice.java:132) at com.cloudstore.webservice.WorkflowWebservice.TestSend(WorkflowWebservice.java:78) at com.cloudstore.webservice.WorkflowWebservice.&lt;init&gt;(WorkflowWebservice.java:28)
请问用ajax怎么调用php写的webservice啊
客户端程序: $("#szr").click(function(){ $.ajax({ type: "POST", contentType:"application/json; charset=utf-8", url:"http://192.168.31.228:807/serviceServer.php/hello", data:"{}", dataType:"json", success:function(result){ alert(result.username); }, error:function(ms){ alert("异常"+ms.responseText); } }); }); 服务器端程序: <?php $wbServer= new SoapServer(null, array('uri'=>'textphpwebservice','soap_version'=>SOAP_1_2)); $wbServer->addFunction('sayhello'); $wbServer->addFunction('mymin'); $wbServer->addFunction('hello'); $wbServer->handle(); $json_arr = array("username"=>"szr","age"=>11,"job"=>"sad"); $json_obj = json_encode($json_arr); //echo $json_obj; function sayhello($name){ return "hello ".$name."you are great!"; } function mymin($a,$b){ return $a>$b?$b:$a; } function hello(){ return $json_obj; } exit(); ?> 报错:500 (Internal Server Error) 哪位大神知道是怎么回事啊??
客户端用axis调用xfire服务器端webservice出错。。
用浏览器可以链接到。。。 2010 03 12 16:51:32 DEBUG axis.SOAPPart (SOAPPart.java:374) - Setting current message form to: FORM_OPTIMIZED (currentMessage is now org.apache.axis.utils.ByteArray) 2010 03 12 16:51:32 DEBUG axis.SOAPPart (SOAPPart.java:537) - Exit: SOAPPart::saveChanges(): org.apache.axis.utils.ByteArray@1a2bfe6 2010 03 12 16:51:53 DEBUG http.HTTPSender (HTTPSender.java:146) - java.lang.reflect.InvocationTargetException 2010 03 12 16:51:54 DEBUG axis.SOAPPart (SOAPPart.java:182) - Enter: SOAPPart ctor(FORM_FAULT) 2010 03 12 16:51:54 DEBUG i18n.ProjectResourceBundle (ProjectResourceBundle.java:72) - org.apache.axis.i18n.resource::handleGetObject(setMsgForm) 2010 03 12 16:51:54 DEBUG axis.SOAPPart (SOAPPart.java:374) - Setting current message form to: FORM_FAULT (currentMessage is now org.apache.axis.AxisFault) 2010 03 12 16:51:54 DEBUG axis.SOAPPart (SOAPPart.java:188) - Exit: SOAPPart ctor() 2010 03 12 16:51:54 DEBUG i18n.ProjectResourceBundle (ProjectResourceBundle.java:72) - org.apache.axis.i18n.resource::handleGetObject(toAxisFault00) 2010 03 12 16:51:54 DEBUG axis.enterprise ( Call.java:2445) - Mapping Exception to AxisFault AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection timed out: connect faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153) at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.ctfo.rtm.service.personelUpload.PersonelUploadServiceImpl.queryListAddPersonelUpload(PersonelUploadServiceImpl.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy16.queryListAddPersonelUpload(Unknown Source) at com.ctfo.rtm.action.webservice.WebserviceAction.personelUpload(WebserviceAction.java:142) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:399) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:262) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:213) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.TimerInterceptor.invokeUnderTiming(TimerInterceptor.java:125) at com.opensymphony.xwork2.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:112) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.ctfo.rtm.action.base.SystemDefaultInterceptor.intercept(SystemDefaultInterceptor.java:52) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) {http://xml.apache.org/axis/}hostname:WWW-E32AE5E6DB3 java.net.ConnectException: Connection timed out: connect at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.ctfo.rtm.service.personelUpload.PersonelUploadServiceImpl.queryListAddPersonelUpload(PersonelUploadServiceImpl.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy16.queryListAddPersonelUpload(Unknown Source) at com.ctfo.rtm.action.webservice.WebserviceAction.personelUpload(WebserviceAction.java:142) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:399) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:262) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:213) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.opensymphony.xwork2.interceptor.TimerInterceptor.invokeUnderTiming(TimerInterceptor.java:125) at com.opensymphony.xwork2.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:112) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at com.ctfo.rtm.action.base.SystemDefaultInterceptor.intercept(SystemDefaultInterceptor.java:52) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153) at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) ... 149 more
Android通过webservice向oracle存储读取图片
最近老大让我们做一个向数据库上传读取图片的功能,我使用oracle服务器,通过调用webservice,我已经实现图片保存到手手机本地,可以把存到手机的图片路径上传,但是图片上传依然没解决,可是纠结了好久还是不知道入何上传读取,(菜鸟一枚,希望得到详细指导,最好有demo 下面是客户端部分代码//跳转到拍照功能 private void picture(){ imageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { startActivityForResult(new Intent(AddActivity.this, PicCutActivity.class), 100); } }); } //获得图片地址显示 protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub if (resultCode == 100) { result = data.getExtras().getString("result"); Log.i("TAG",result+"result"); custumeruils.setPhoto_path(result); imageView.setImageBitmap(BitmapFactory.decodeFile(result)); } super.onActivityResult(requestCode, resultCode, data); } public void setAdapter(){ ArrayAdapter<emp> adapter= new ArrayAdapter<emp>(this, android.R.layout.simple_list_item_1,use ); //adapter.notifyDataSetChanged(); listView.setAdapter(adapter); } private void setListener() { adduserButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { new Thread(){ public void run() { id=Integer.parseInt(useridEdit.getText().toString()); username=usernameEdit.getText().toString().trim(); address=useraddressEdit.getText().toString().trim(); insertUser(); }; }.start(); } }); } private List<emp> parseArray(JSONArray ary) throws JSONException { List<emp> emps=new ArrayList<emp>(); for(int i=0; i<ary.length(); i++){ JSONObject empObj=ary.getJSONObject(i); emp emps1=new emp(empObj.getInt("useid"), empObj.getString("name"), empObj.getString("address") ); emps.add(emps1); } Log.i("TAG",emps.toString()); return emps; } public String insertUser() { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("id", id); request.addProperty("username", username); request.addProperty("hobby", address); //传送图片路径 request.addProperty("result",result); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.bodyOut = request; // envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE ht = new HttpTransportSE(URL); try { ht.call(SOAP_ACTION, envelope); //ht.call(null, envelope); Object object = envelope.getResponse(); result = object.toString(); Log.i("tag", result); } catch (Exception e) { e.printStackTrace(); } Log.i("TAG","result"+result); return result; }。
axis客户端调用.net时报:未能加载文件或程序集或它的某一个依赖项。系统找不到指定的文件。
我用的是axis,不是axis2,调用一个由.net发布的Webservice接口。可程序报“未能加载文件或程序集或它的某一个依赖项。系统找不到指定的文件。”的错误,一时查不到资料,请各位tx帮忙解决。 Init方法返回的是boolean型,ValidEncryptPassword返回的是String型的xml内容。 代码在后面,先把报错贴出来 报错如下: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: 服务器无法处理请求。 ---&gt; 未能加载文件或程序集“Interop.MSXML2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:服务器无法处理请求。 ---&gt; 未能加载文件或程序集“Interop.MSXML2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) .... 调用代码如下: [code="java"] Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(this.urlPoint)); call.setUseSOAPAction(true); call.setSOAPActionURI("WebService/ValidEncryptPassword"); call.setOperationName(new QName("WebService", "ValidEncryptPassword")); call.addParameter(new QName("WebService", "CardNo"), XMLType.XSD_STRING, ParameterMode.IN); call.addParameter(new QName("WebService", "EncryptPassword"), XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); String ret = (String) call.invoke(new Object[] { cardNo, encryptPassword }); [/code] wsdl文件如下 [code="java"] <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="WebService" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="WebService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="WebService"> <s:element name="Init"> <s:complexType /> </s:element> <s:element name="InitResponse"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="InitResult" type="s:boolean" /> </s:sequence> </s:complexType> </s:element> <s:element name="ValidEncryptPassword"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="CardNo" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EncryptPassword" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="ValidEncryptPasswordResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ValidEncryptPasswordResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="InitSoapIn"> <wsdl:part name="parameters" element="tns:Init" /> </wsdl:message> <wsdl:message name="InitSoapOut"> <wsdl:part name="parameters" element="tns:InitResponse" /> </wsdl:message> <wsdl:message name="ValidEncryptPasswordSoapIn"> <wsdl:part name="parameters" element="tns:ValidEncryptPassword" /> </wsdl:message> <wsdl:message name="ValidEncryptPasswordSoapOut"> <wsdl:part name="parameters" element="tns:ValidEncryptPasswordResponse" /> </wsdl:message> <wsdl:portType name="ServiceSoap"> <wsdl:operation name="Init"> <wsdl:input message="tns:InitSoapIn" /> <wsdl:output message="tns:InitSoapOut" /> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <wsdl:input message="tns:ValidEncryptPasswordSoapIn" /> <wsdl:output message="tns:ValidEncryptPasswordSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Init"> <soap:operation soapAction="WebService/Init" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <soap:operation soapAction="WebService/ValidEncryptPassword" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Init"> <soap12:operation soapAction="WebService/Init" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <soap12:operation soapAction="WebService/ValidEncryptPassword" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Service"> <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> <soap:address location="http://192.1.1.2/Service.asmx" /> </wsdl:port> <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> <soap12:address location="http://192.1.1.2/Service.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> [/code] [b]问题补充:[/b] 我看了其他公司的调用,是用xfire作的,也是直接有wsdl文件生成的,可以返回结果啊,我的程序是不是写的有问题呢?
EJB3 编写 WebService 的返回列表的问题.
服务端的 EJB 代码如下: <br /> <br /> <br /><pre name="code" class="java">@WebService(name = "TravelAgent", serviceName = "TravelAgentService") @Stateless public class TravelAgentBean implements TravelAgentRemote { ...... @WebMethod @WebResult(name = "List") public List test(@WebParam(name = "name") String name) { System.out.println("name : ");System.out.println(name); Query query = manager.createQuery("from Cabin c"); List list = query.getResultList(); return list; } ...... } </pre> <br /> <br />客户端的 PHP 代码如下: <br /><pre name="code" class="php">$client = new SoapClient($wsdl_url); $username = $client-&gt;test(array('name'=&gt;'asdfhasldfjl')); var_dump($username); </pre> <br />如果服务端是 @Stateless . 使用 Java 客户端调用是没有问题的, <br /> <br />服务端是 @WebService 时, 使用 new ArrayList 实现返回也是没有问题. 唯有 query.getResultList(); 返回时, 出现 WebServiceException 异常. <br />那位高手有空, 请指点下小弟. 小弟是新手. 3 个月前刚买了几本 java 的书看看. <br /> <br />QQ : 280016524 <br />Email : degui.chen@qq.com <br /> <br />如下是服务器端抛出的异常: <br />22:44:45,127 INFO  [EJB3Deployer] Deployed: file:/C:/jboss-4.2.3.GA/server/defau <br />lt/deploy/WebServicesDemo.jar/ <br />22:44:45,228 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=WebServi <br />cesDemo,endpoint=TravelAgentBean <br />22:44:51,086 INFO  [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G <br />A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService55191.wsdl <br />22:44:51,396 INFO  [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=... <br />/tmp/deploy/WebServicesDemo.jar55190.war/ <br />22:44:53,570 INFO  [STDOUT] name : <br />22:44:53,570 INFO  [STDOUT] asdfhasldfjl <br />22:44:54,691 INFO  [STDOUT] list : <br />22:44:54,691 INFO  [STDOUT] [chen.degui.domain.Cabin@1681460] <br />22:44:54,711 ERROR [RequestHandlerImpl] Error processing web service request <br />org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh <br />alException <br /> - with linked exception: <br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe <br />r class is known to this context.] <br />        at org.jboss.ws.WSException.rethrow(WSException.java:68) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand <br />lerImpl.java:325) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl <br />.java:201) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request <br />HandlerImpl.java:134) <br />        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java <br />:84) <br />        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) <br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl <br />icationFilterChain.java:290) <br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF <br />ilterChain.java:206) <br />        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi <br />lter.java:96) <br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl <br />icationFilterChain.java:235) <br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF <br />ilterChain.java:206) <br />        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV <br />alve.java:230) <br />        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV <br />alve.java:175) <br />        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit <br />yAssociationValve.java:182) <br />        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv <br />e.java:84) <br />        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j <br />ava:127) <br />        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j <br />ava:102) <br />        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC <br />onnectionValve.java:157) <br />        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal <br />ve.java:109) <br />        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav <br />a:262) <br />        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java <br />:844) <br />        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce <br />ss(Http11Protocol.java:583) <br />        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 <br />6) <br />        at java.lang.Thread.run(Thread.java:619) <br />Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException <br /> - with linked exception: <br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe <br />r class is known to this context.] <br />        at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe <br />rializer.java:124) <br />        at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java: <br />87) <br />        at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo <br />rt.java:57) <br />        at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon <br />tent.java:159) <br />        at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java: <br />72) <br />        at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle <br />ment.java:141) <br />        at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen <br />tDoc.java:85) <br />        at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle <br />ment.java:547) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen <br />tImpl.java:840) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j <br />ava:825) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen <br />tImpl.java:840) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j <br />ava:825) <br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle <br />mentWriter.java:149) <br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit <br />er.java:130) <br />        at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3 <br />25) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl <br />erImpl.java:392) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand <br />lerImpl.java:321) <br />        ... 22 more <br />Caused by: javax.xml.bind.MarshalException <br /> - with linked exception: <br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe <br />r class is known to this context.] <br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java: <br />320) <br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav <br />a:246) <br />        at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java: <br />81) <br />        ... 37 more <br />Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o <br />f its super class is known to this context. <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j <br />ava:240) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.j <br />ava:255) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize <br />r.java:647) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali <br />zeItem(ArrayElementNodeProperty.java:65) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi <br />stBody(ArrayElementProperty.java:168) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar <br />rayERProperty.java:152) <br />        at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean <br />InfoImpl.java:322) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize <br />r.java:679) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme <br />ntBeanInfoImpl.java:151) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme <br />ntBeanInfoImpl.java:185) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element <br />BeanInfoImpl.java:305) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element <br />BeanInfoImpl.java:312) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element <br />BeanInfoImpl.java:71) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j <br />ava:488) <br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java: <br />317) <br />        ... 39 more <br />Caused by: javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any o <br />f its super class is known to this context. <br />        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm <br />pl.java:556) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize <br />r.java:642) <br />        ... 51 more <br />22:44:54,861 ERROR [[TravelAgentBean]] Servlet.service() for servlet TravelAgent <br />Bean threw exception <br />javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its super <br /> class is known to this context. <br />        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextIm <br />pl.java:556) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize <br />r.java:642) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.seriali <br />zeItem(ArrayElementNodeProperty.java:65) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeLi <br />stBody(ArrayElementProperty.java:168) <br />        at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Ar <br />rayERProperty.java:152) <br />        at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBean <br />InfoImpl.java:322) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerialize <br />r.java:679) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme <br />ntBeanInfoImpl.java:151) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Eleme <br />ntBeanInfoImpl.java:185) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Element <br />BeanInfoImpl.java:305) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element <br />BeanInfoImpl.java:312) <br />        at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Element <br />BeanInfoImpl.java:71) <br />        at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.j <br />ava:488) <br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java: <br />317) <br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav <br />a:246) <br />        at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java: <br />81) <br />        at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo <br />rt.java:57) <br />        at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon <br />tent.java:159) <br />        at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java: <br />72) <br />        at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle <br />ment.java:141) <br />        at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen <br />tDoc.java:85) <br />        at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle <br />ment.java:547) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen <br />tImpl.java:840) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j <br />ava:825) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen <br />tImpl.java:840) <br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j <br />ava:825) <br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle <br />mentWriter.java:149) <br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit <br />er.java:130) <br />        at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3 <br />25) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl <br />erImpl.java:392) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand <br />lerImpl.java:321) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl <br />.java:201) <br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request <br />HandlerImpl.java:134) <br />        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java <br />:84) <br />        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) <br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl <br />icationFilterChain.java:290) <br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF <br />ilterChain.java:206) <br />        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi <br />lter.java:96) <br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl <br />icationFilterChain.java:235) <br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF <br />ilterChain.java:206) <br />        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV <br />alve.java:230) <br />        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV <br />alve.java:175) <br />        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit <br />yAssociationValve.java:182) <br />        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv <br />e.java:84) <br />        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j <br />ava:127) <br />        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j <br />ava:102) <br />        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC <br />onnectionValve.java:157) <br />        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal <br />ve.java:109) <br />        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav <br />a:262) <br />        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java <br />:844) <br />        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce <br />ss(Http11Protocol.java:583) <br />        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 <br />6) <br />        at java.lang.Thread.run(Thread.java:619) <br /><br /><strong>问题补充</strong><br />多谢 Anatorian 的建议. :<br />下面是我添加的修改后的结果:<br /><br /><pre name="code" class="java">@Entity @XmlRootElement public class Cabin implements java.io.Serializable { private int id; private String name; private int deckLevel; private int shipId; private int bedCount; @Id @Column(name = "CABIN_ID") public int getId() { ............... </pre><br /><br />异常为:<br />23:59:14,985 INFO  [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.2.3.G<br />A/server/default/data/wsdl/WebServicesDemo.jar/TravelAgentService64072.wsdl<br />23:59:15,496 INFO  [TomcatDeployer] deploy, ctxPath=/WebServicesDemo, warUrl=...<br />/tmp/deploy/WebServicesDemo.jar64071.war/<br />23:59:43,506 INFO  [STDOUT] name :<br />23:59:43,506 INFO  [STDOUT] asdfhasldfjl<br />23:59:45,689 INFO  [STDOUT] list :<br />23:59:45,689 INFO  [STDOUT] [chen.degui.domain.Cabin@175beef]<br />23:59:45,729 ERROR [RequestHandlerImpl] Error processing web service request<br />org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.Marsh<br />alException<br /> - with linked exception:<br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe<br />r class is known to this context.]<br />        at org.jboss.ws.WSException.rethrow(WSException.java:68)<br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand<br />lerImpl.java:325)<br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl<br />.java:201)<br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request<br />HandlerImpl.java:134)<br />        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java<br />:84)<br />        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl<br />icationFilterChain.java:290)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF<br />ilterChain.java:206)<br />        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi<br />lter.java:96)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl<br />icationFilterChain.java:235)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF<br />ilterChain.java:206)<br />        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV<br />alve.java:230)<br />        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV<br />alve.java:175)<br />        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit<br />yAssociationValve.java:182)<br />        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv<br />e.java:84)<br />        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j<br />ava:127)<br />        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j<br />ava:102)<br />        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC<br />onnectionValve.java:157)<br />        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal<br />ve.java:109)<br />        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav<br />a:262)<br />        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java<br />:844)<br />        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce<br />ss(Http11Protocol.java:583)<br />        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44<br />6)<br />        at java.lang.Thread.run(Thread.java:619)<br />Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException<br /> - with linked exception:<br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe<br />r class is known to this context.]<br />        at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSe<br />rializer.java:124)<br />        at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:<br />87)<br />        at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSuppo<br />rt.java:57)<br />        at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectCon<br />tent.java:159)<br />        at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:<br />72)<br />        at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentEle<br />ment.java:141)<br />        at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElemen<br />tDoc.java:85)<br />        at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentEle<br />ment.java:547)<br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen<br />tImpl.java:840)<br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j<br />ava:825)<br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElemen<br />tImpl.java:840)<br />        at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.j<br />ava:825)<br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPEle<br />mentWriter.java:149)<br />        at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWrit<br />er.java:130)<br />        at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:3<br />25)<br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandl<br />erImpl.java:392)<br />        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHand<br />lerImpl.java:321)<br />        ... 22 more<br />Caused by: javax.xml.bind.MarshalException<br /> - with linked exception:<br />[javax.xml.bind.JAXBException: class chen.degui.domain.Cabin nor any of its supe<br />r class is known to this context.]<br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:<br />320)<br />        at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.jav<br />a:246)<br />        at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:<br />81)<br /><br /><strong>问题补充</strong><br />没有高手有空?
CAS的数字证书认证
我现在有一个需求,要实现基于数字证书的CAS单点登录认证,看了CAS X509数字证书认证,但是就是不起作用,原因是服务器端获取不到浏览器的证书信息,可能是导入证书的问题吧,request里面javax.servlet.request.X509Certificate参数信息为null 还有就是系统要实现服务器端生成证书,大家有没有数字证书认证这方面的经验,指导一下。 不知道大家用过amazon webService的帐户管理没?就是要实现和它一样的功能,输入私钥就可以自动生成数字证书,然后下载,用SOAP with WS-Security时要使用这个证书。 [b]问题补充:[/b] 这个我当然配了,现在问题不在这了,在于怎么实现服务器端生成证书。 [b]问题补充:[/b] 怎么用java生成呢?有没有具体的例子啊?还有就是SOAP with WS-Security时怎么使用呢?不好意思,对安全这快完全不懂。 [b]问题补充:[/b] 我的开发环境是java,我使用java调用openssl命令生成私钥和证书文件,都是pem格式的,但是我怎么用户java来解析文件获得私钥和公钥呢?或者是有java调用什么命令来实现也是可以的。
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
深深的码丨Java HashMap 透析
HashMap 相关概念 HashTab、HashMap、TreeMap 均以键值对像是存储或操作数据元素。HashTab继承自Dictionary,HashMap、TreeMap继承自AbstractMap,三者均实现Map接口 **HashTab:**同步哈希表,不支持null键或值,因为同步导致性能影响,很少被使用 **HashMap:**应用较多的非同步哈希表,支持null键或值,是键值对...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问