First, WebService:
Call a given location WebService's client code:
1 import org.apache.axis.client.call;
2 import org.apache.axis.client.service;
3 Import javax.xml.namespace.qname;
4
5 public class testclient {
6 public static void main (string [] args) {
7 try {
8 string endpoint =
9 "http://nagoya.apache.org:5049/AXIS/Services/echo";
10
11 Service Service = New Service ();
12 call call = (call) service.createcall ();
13
14 Call.SettargetendPointd ADRESS (New Java.Net.URL (Endpoint));
15 Call.SetoperationName (New Qname ("http://soapinterop.org/", "echostring");
16
17 string ret = (string) Call.invoke (new object [] {"Hello!"});
18
19 System.out.println ("Sent 'Hello!', GOT '" RET "'");
20} catch (exception e) {
21 System.err.Println (E.TOString ());
twenty two }
twenty three }
twenty four }
SOAP REQUEST content:
XML Version = "1.0" encoding = "UTF-8"?>
XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/" XMLns: xsi = "http://www.w3.org/2001/xmlschema-instance"> ns1: echostring> Soap-env: body> Soap-env: envelope> Release WebService: 1, JWS file 2, deploy the Application Server to the Application Server class through the Adminoclient class Second, AXIS TOMCAT 1. Prepare the AXIS configuration for testing WebService: Complete WSDL from the Java class file, the corresponding command is as follows: Java -classpath.;% AXISCLASSPATH%; org.apache.axis.wsdl.java2wsdl -o testservice.wsdl -l "http://172.16.87.18:8000/AXIS/Services/ testservice" -n "http: //172.16 .87.18: 8000 / axis / services / testservice "-p" com.zzxy.test. TestService "" http://172.16.87.18:8000/axis/services/testservice "com.zzxy.test. TestService) Generate WSDL files Run WSDL2JAVA Generate new interfaces, service, servicelocate, stub, skeleton, etc., including deployment (uninstall) file deploy.wsdd undeploy.wsdd. The corresponding command is as follows: Java-ClassPath.;% AXISCLASSPATH% org.apache.axis.wsdl.wsdl2java -o ../src -d session -s -s true -n http://172.16.87.18:8000/AXIS/Services/service COM. ZZXy.TestService TestService.wsdl Compile the generated Java file: deploy: Java -cp% AXISCLASSPATH% org.apache.axis.client.adminClient -LHttp: // 172.16.87.18:8000/AXIS/Services/adminservice deploy.wsdd Ant example of dynamic report XML Version = "1.0" encoding = "GBK"?> Namespace = "$ {targetnamespace}" classname = "com.xinyuan.dtbb.xybb"> axis-java2wsdl> target> Deployscope = "session"> AXIS-WSDL2JAVA> target> claspath> target> servletPath = "/ axis / servlet / axisservlet" debug = "true" xmlfile = "$ {local.wsdl}" /> target> provject> Second, OC4J You need to use the OC4J-specific function to configure according to certain requirements. Deploy EJB to WebService profile . . description> stateless-session-ejb-service> Web-Service> Deployed ANT script: XML Version = "1.0" encoding = "GBK"?> target> java> target> java> target> java> target> provject> Third, JBoss JBoss-net.sar is required, in the configuration of the ALL, the standard AXIS deployment error.