调用时的代码片断如下String endpoint = "http://172.16.1.65/WebServiceForCRMLC/BuildingPrjIF.asmx?WSDL" ;
String strFunc = "BuildingPrjInfoSyn";
String tempuri = "http://tempuri.org/";
Service service = new Service();
org.apache.axis.client.Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName(tempuri, strFunc));
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/BuildingPrjInfoSyn");
call.addParameter(new QName(tempuri, "xmlContent"),
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
String xmlContent = getBuildingInfoXML(buildingMap,buildingId);
logger.debug("传过去的xml数据是:"+xmlContent);
String xmlResultString = call.invoke(new Object[]{xmlContent})+"";
logger.debug("调用webservice 后的结果是:"+xmlResultString);我的类路径下有必须的jar包axis.jar commons-discovery.jar saaj.jar wsdl4j-1.5.1.jar,
但是从错误上来看是这些jar包没有加载上,哪位都看出问题所在,万分感谢
[code] "SERVER.PROCESSING"
[description] "javax/wsdl/OperationType"
[details] "java.lang.NoClassDefFoundError: javax/wsdl/OperationType
at org.apache.axis.description.OperationDesc.<clinit>(OperationDesc.java:59)
at org.apache.axis.client.Call.addParameter(Call.java:968)
at org.apache.axis.client.Call.addParameter(Call.java:944)
String strFunc = "BuildingPrjInfoSyn";
String tempuri = "http://tempuri.org/";
Service service = new Service();
org.apache.axis.client.Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName(tempuri, strFunc));
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/BuildingPrjInfoSyn");
call.addParameter(new QName(tempuri, "xmlContent"),
org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
String xmlContent = getBuildingInfoXML(buildingMap,buildingId);
logger.debug("传过去的xml数据是:"+xmlContent);
String xmlResultString = call.invoke(new Object[]{xmlContent})+"";
logger.debug("调用webservice 后的结果是:"+xmlResultString);我的类路径下有必须的jar包axis.jar commons-discovery.jar saaj.jar wsdl4j-1.5.1.jar,
但是从错误上来看是这些jar包没有加载上,哪位都看出问题所在,万分感谢
[code] "SERVER.PROCESSING"
[description] "javax/wsdl/OperationType"
[details] "java.lang.NoClassDefFoundError: javax/wsdl/OperationType
at org.apache.axis.description.OperationDesc.<clinit>(OperationDesc.java:59)
at org.apache.axis.client.Call.addParameter(Call.java:968)
at org.apache.axis.client.Call.addParameter(Call.java:944)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货