WebServices

From Wiki RB4

Basics[edit]

A Web service is a service offered by an electronic device to another electronic device, communicating with each other via the World wide web. In a web service, web technology such as the HTTP, originally designed for human-to-machine communication, is utilized for machine-to-machine communication, more specifically for transferring machine readable file formats such as XML and JSON. The W3C defines a Web service generally as a software system designed to support interoperable machine-to-machine interaction over a network. Web services use SOAP over HTTP protocol, so you can use your existing low-cost internet for implementing web services. This solution is much less costly compared to proprietary solutions like EDI/B2B. Besides SOAP over HTTP, web services can also be implemented on other reliable transport mechanisms like FTP. In a 2004 document, the W3C extended the definition. We can identify two major classes of Web services:

  • REST-compliant Web services, in which the primary purpose of the service is to manipulate representations of Web resources using a uniform set of stateless operations.
  • Arbitrary Web services, in which the service may expose an arbitrary set of operations.

The term "Web services" describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL, JSON and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI lists what services are available.

Development[edit]

  1. via AXIS
  2. via JAX-RS (javax.ws.rs.*) (see REST#Implementing_a_Restful_Service_with_JAX-RS)

Both models are implemented in the Uwe Heuer application (see package server.webservices or server.rest)

obsolete[edit]

The info below is probably obsolete:

via .jws[edit]

public class <CLASSNAME> mit Extension .jws in <TOMCAT_DIR>\webapps\axis\ kopieren und per <TOMCAT_URL>/axis/<CLASSNAME>.jws aufrufen. WSDL mit Anhang ?wsdl generieren. Beispiel ist MeineWebServiceKlasse1.jws oder CryptDataInfoWebService.jws. Die Class-Files werden nach <TOMCAT_DIR>\webapps\<WEBAPP_DIR>\WEB-INF\jwsClasses compiliert.

via WSDD[edit]

WSDD-File (Web Service Deployment Descriptor) manuell erstellen (e.g. Project 'uweheuer' /src/WEB-INF/deploy.wsdd) und *.java bzw. *.class und per Axis installieren.

Sources[edit]

see here