axis2 webservice用戶端基本jar
axiom-api-1.2.20
axiom-impl-1.2.20
axis2-adb-1.7.7
axis2-kernel-1.7.7
axis2-transport-http-1.7.7
axis2-transport-local-1.7.7
commons-codec-1.2
commons-httpclient-3.1
commons-logging-1.1.1
httpcore-4.4.4
neethi-3.0.3
stax2-api-3.1.1
woden-core-1.0M10
woodstox-core-asl-4.2.0
wsdl4j-1.6.2
xmlschema-core-2.2.1
簡單執行個體
Stringurl="http://localhost:8080/axis2/services/MyWsdlServer?wsdl";
try {
RPCServiceClient serviceClient = new RPCServiceClient();
EndpointReference trag = new EndpointReference(url);
Options options=serviceClient.getOptions();
options.setTo(trag);
//options.setAction("urn:mytest2");
QName qName= newQName("http://ws.apache.org/axis2","mytestXml");
Object[] parameter = new Object[]{5};
Class[] resultClass= new Class[]{String.class};
Object[] object= serviceClient.invokeBlocking(qName,parameter,resultClass);
//OMElement object =serviceClient.invokeBlocking(qName,args);
System.out.println(object[0]);
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
各種類缺失對于的jar包:
java.lang.NoClassDefFoundError: org/apache/woden/WSDLException --->woden-core-1.0M10.jar
org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder -->axis2-spring-1.6.1.jar
org.apache.axis2.transport.http.AxisServlet -->axis2-transport-http-1.6.1.jar
javax.wsdl.xml.WSDLLocator -->wsdl4j-1.6.2.jar
org.apache.ws.commons.schema.resolver.URIResolver -->XmlSchema-1.4.7.jar
org.apache.axiom.om.OMNode -->axiom-api-1.2.12.jar
org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory -->axiom-impl-1.2.12.jar
org.apache.neethi.PolicyComponent -->neethi-3.0.1.jar
org.apache.axis2.transport.local.LocalTransportSender -->axis2-transport-local-1.6.1.jar
org.apache.commons.httpclient.HttpException -->commons-httpclient-3.1.jar
javax.mail.internet.ParseException -->mail-1.4.jar
org.apache.commons.fileupload.FileItemFactory -->commons-fileupload-1.2.jar
org.apache.woden.resolver.URIResolver -->woden-api-1.0M9.jar
org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher -->axis2-jaxws-1.6.1.jar
org.apache.commons.io.FileUtils -->commons-io-1.4.jar
org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver -->axis2-adb-1.6.1.jar
org.apache.axis2.rpc.client.RPCServiceClient -->axis2-adb-1.6.1.jar
org.apache.axis2.AxisFault -->axis2-kernel-1.6.1.jar
org.apache.axis2.addressing.EndpointReference -->axis2-kernel-1.6.1.jar
org.apache.axis2.client.Options -->axis2-kernel-1.6.1.jar
org.apache.commons.logging.LogFactory -->commons-logging-1.1.1.jar
org.apache.axis2.transport.http.CommonsHTTPTransportSender -->axis2-transport-http-1.6.1.jar
org.apache.http.HttpResponseFactory -->httpcore-4.0.jar
org.apache.commons.codec.DecoderException -->commons-codec-1.3.jar