Академический Документы
Профессиональный Документы
Культура Документы
2014-03-06
J2EE
.net
/
Skeleton
Stub java Skeleton
.net StubStub
Stub Skeleton Skeleton
EJBCORBAWeb Services
RMIIIOPRMI-IIOPSOAP
Java RMI
JAVA
IIOPInternet Inter-ORB Protocol()
CORBA 2.0 CORBA
Java CORBA IIOP
WEB
Web Services
SOAPWSDLUDDI
SOAP XML
HTTP HTTPS SMTP XMPP
WSDL XML
UDDI WEB
WEB
Web Service
Java
Java
delphiC#
1.
Axis axis-bin-1_4.zip webapps/axis tomcat
TOMCAT_HOME/webapps
TOMCAT_HOME/webapps/axis MyMath.jws
Tomcat, http://localhost:8080/axis/MyMath.jws,
Web Service
2.
Eclipse java Axis
package com.dc.core;
import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class MyMathClient {
private static final String endPoint = "http://localhost:8080/axis/MyMath.jws?wsdl";
public static void main(String[] args) {
Service service = new Service();
try {
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endPoint));
Integer result =(Integer)call.invoke("squared", new Object[]{10});
System.out.println(result);
} catch (ServiceException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}catch(RemoteException e){
e.printStackTrace();
}
}
}
3.3.
Tomcat
/server-config.wsdd
the squared of 10 is 100
eclipse
- Unable to find required classes (javax.activation.DataHandler and javax.mail.i
nternet.MimeMultipart). Attachment support is disabled.
100
Web Service
Stub
Web Service Stub
EJB Stub jar
Stub Stub
Stub
set AXIS_HOME=E:\apache-tomcat-6.0.36\webapps\axis\WEB-INF
set
CLASSPATH=.;%AXIS_HOME%\lib\axis.jar;%AXIS_HOME%\lib\axis-ant.jar;%AXIS_HOME%\lib\commons-discovery
-0.2.jar;%AXIS_HOME%\lib\commons-logging-1.0.4.jar;%AXIS_HOME%\lib\jaxrpc.jar;%AXIS_HOME%\lib\log4j-1.
2.8.jar;%AXIS_HOME%\lib\saaj.jar;%AXIS_HOME%\lib\wsdl4j-1.5.1.jar;
java org.apache.axis.wsdl.WSDL2Java
-p com.dc.core http://localhost:8080/axis/MyMath.jws?wsdl
src Stub