Tutorials to .com

Tutorials to .com » Jsp » Xml » JWSDP completed using the Web Service entry in java (a)

JWSDP completed using the Web Service entry in java (a)

Print View , by: iSee ,Total views: 13 ,Word Count: 1130 ,Date: Mon, 20 Apr 2009 Time: 3:10 AM


Web Service in the java field of, AXIS its easy to use, many projects have used it for the Sun to provide the Web Service technology, is not much use, is to update the version and re-use of what Sun provided JWSDP, and wrote this Getting Started articles. for those who need a reference.

A Sun's Web Service

Web services are web based on the use of open standards-based Enterprise application xml is and calls the client to exchange data transfer protocol, java technology and WEB services are organized into these sub-categories:

Java Web Services Developer Pack (Java WSDP)

Java API for XML-Based RPC (JAX-RPC)

Java API for xml Registries (JAXR)

Java API for xml Processing (JAXP)

Java architecture for XML Binding (JAXB)

SOAP with Attachments API for Java (SAAJ)

XML and Web Services Security

On behalf of JAX-RPC remote procedure call based on the xml the java API, is a use of RPC and XML to build the Web service and client technology, the CS used in the distributed model, it is a mechanism to enable the RPC client the implementation process of other systems.

In JAX-RPC, an XML-based RPC protocol from SOAP, such as that of the SOAP specification defines an envelope structure, encoding rules, as well as long-distance call and response on behalf of the agreement. To respond to these calls and HTTP as a SOAP message transmission.

Despite the complexity of SOAP messages, but JAX-RPC API to application developers to hide the complexity. The server side, developers specify the course of the call through the java language with the definition of the interface methods, developers must encode one or more months to achieve these types of methods. client code is also easy: a client creates a proxy (a local object on behalf of service), and then a simple proxy in that the method call. the use of JAX-RPC, developers do not have to generate or Analysis of SOAP message, which is JAX-RPC run-time system to do: it is from the API call and response to the conversion between SOAP message.

The use of JAX-RPC, clients and web services are a huge benefit: java programming language, platform independence. In addition, JAX-RPC there is no restriction: a JAX-RPC client access to a java platform does not run on web services, and vice versa. This flexibility is possible that the use of JAX-RPC defined by the W3C technologies: HTTP, SOAP, WSDL. WSDL for a service described in the message endpoint for a set of operating an XML format specified.

SUN II WEB services provided by j2ee to build tools and provides the APIs to create, publish and interoperable WS client tools, including JAX-RPC (SI) standard to achieve wscompile and wsdeploy provides tools that enable you to develop, publish, called Web Service :

1 wscompile two acceptable input: WSDL and Service Endpoint Interface, output for portable products, and model documents.

2 wsdeploy only one input: the input and output, including wscompile In addition, a deployment descriptor file, the output is released on a specific platform web service.

These tools, together with the Java WSDP package available, java web services development kit is a free integrated toolkit, use it to build, test, publish XML applications, web services and web services with the latest technologies and standards to achieve the web application.

(A) wscompile tool to generate a tool to introduce it by the JAX-RPC run-time needs of the client-side products and services for the development, deployment, call a Web service. The use of this tool, there are two forms: a batch and Ant build script.

wscompile-gen-classpath lib / foo.jar; lib / bar.jar-d generated config.xml

wscompile-gen-f: infix: Name-d generated config.xml

wscompile-define-f: nodatabinding-f: novalidation config.xml

wscompile-import-f: explicitcontext config.xml

Ant script used in the Ant task before this definition:

<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">

<classpath path="${classpath}"/>

</ taskdef>

The classpath to point to the following archives:

jaxrpc-api.jar

jaxrpc-impl.jar

jaxrpc-spi.jar

saaj-api.jar

saaj-impl.jar

jaxp-api.jar

dom.jar

sax.jar

xalan.jar

xercesImpl.jar

activation.jar

mail.jar

jax-qname.jar

namespace.jar

xsdlib.jar

relaxngDatatype.jar

Examples:

<wscompile gen="true" base="${build}" features="explicitcontext" classpath="xyz.jar" debug="true" config="config.xml">

<wscompile import = "true" keep = "true" sourceBase = "$ (source.dir)" base = "$ (build)" model = "model.xml.gz" PrintStackTrace = "true" config = "config.xml ">

<classpath refid="compile.classpath"/>

</ wscompile>

<wscompile fork="true" define="true" nonClassDir="${wsdl.dir}" features="documentliteral, useonewayoperations" config="config.xml"/>


Java and XML Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.