问题描述
publicstaticStringgetService(){URLurl=null;try{url=newURL("http://XXX.XXX.XXX.XXX/aaa/services/MailCsService");}catch(MalformedURLExceptionmue){returnmue.getMessage();}//ThisisthemainSOAPobjectCallsoapCall=newCall();soapCall.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);soapCall.setTargetObjectURI("MailCsService");soapCall.setMethodName("getMails");VectorsoapParams=newVector();ParameterisbnParam1=newParameter("in0",String.class,"0",null);ParameterisbnParam2=newParameter("in1",String.class,"aaa",null);ParameterisbnParam3=newParameter("in2",String.class,"bbbb",null);soapParams.addElement(isbnParam1);soapParams.addElement(isbnParam2);soapParams.addElement(isbnParam3);soapCall.setParams(soapParams);System.out.println(1);try{//InvoketheremotemethodontheobjectSystem.out.println(2);ResponsesoapResponse=null;soapResponse=soapCall.invoke(url,"getMails");System.out.println(3);//Checktoseeifthereisanerror,return"N/A"if(soapResponse.generatedFault()){Faultfault=soapResponse.getFault();System.err.println("Generatedfault:");System.out.println("FaultCode="+fault.getFaultCode());System.out.println("FaultString="+fault.getFaultString());Stringf=fault.getFaultString();System.out.println("qqq");returnf;}else{//readresultSystem.out.println("2qqq");ParametersoapResult=soapResponse.getReturnValue();//getastringfromtheresultreturnsoapResult.getValue().toString();}}catch(SOAPExceptionse){System.out.println("3qqq");returnse.getMessage();}}publicstaticvoidmain(String[]args)throwsException{System.out.println(getService());}
老是显示NoDeserializerfoundtodeserializea'http://。。。。。。。。。。。。。。。。。