Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

STP Service Creation User Guide

Revision as of 05:39, 19 December 2007 by Bryan.peng.iona.com (Talk | contribs) (Concepts)

Installation

Install from update site

This kind of installation downloads STP plugins, and plugins required from other Eclipse projects automatically.

Download from STP website

The latest STP 0.7.0 build can be downloaded from here

Plugins required from other Eclipse projects

*emf-sdo-xsd-SDK-2.3.0
*GEF-ALL-3.3 
*JEM-SDK-1.2.3_jem
*wtp-sdk-S-2.0
*GMF-sdk-2.0
*mdt-ocl-SDK-1.1
*emf-validation-SDK-1.1
*emf-query-SDK-1.1
*emf-transaction-SDK-1.1
*javax.wsdl 1.5.1

Install to eclipse

Extract all required plugins to the STP Installation directory

Install runtime

Select one of the following as Pre-requisite SOA runtime:

Setup Tomcat shared lib

In order to deploy JAX-WS service to Tomcat container, please copy all jars under ${apache_cxf_install}/libs and ${apache_cxf_install}/modules into ${tomcat_install}/shared/lib

Example

Create service component

Create JAX-WS component

Concepts

  • JAX-WS

The Java API for XML Web Services (JAX-WS) specification defines a set of APIs and annotations for developing Web services. It makes extensive use of the annotations introduced in Java 5.0. These annotations make it easier to map a Java object to a service and map a WSDL contract to a Java object.

Related information

JAX-WS Project home page

  • Annotations

Annotations are a way of adding metadata to Java source code that is available to the programmer at runtime.

They play a critical role in JAX-WS, where they are used to map Java to WSDL and XML Schema, and to control how the JAX-WS runtime processes and responds to web service invocations.

When you create a JAX-WS Java First project, you need to add JAX-WS annotations to your starting point code, in order to have Eclipse automatically generate the required WSDL and stub code for your web service.

You can add annotations to types, methods, and parameters. Each method that is public within the Java class must include a @WebRequest annotation, while each types requires a @WebService annotation.

You can add annotations to your Java code using the JAX-WS menu and further refine your annotations in the Annotation Properties view.

When you create a WSDL First project, annotated code is generated for you automatically.

Related information

JAX-WS Annotations specification

  • Annotation Properties view

The Annotation Properties view allows you to edit the JAX-WS annotations in your Java code.

To open the Annotation Properties view, select Window > Show View > Other ... > STP > Annotation Properties.

As you move through the types, methods, and parameters in your Java code in either the Editor view or the Package Explorer, the Annotation Properties view changes to display the annotations that are possible for a particular element.

To add an annotation, select true in the Value column.

Click the + icon next to the annotation to display the attributes associated with it.

  • Supported annotations

The following annotations are supported in the Eclipse STP Annotation Properties editor:

JSR 181

javax.jws.WebService

javax.jws.WebMethod

javax.jws.Oneway

javax.jws.WebParam

javax.jws.WebResult

javax.jws.HandlerChain

javax.jws.soap.SOAPBinding

javax.jws.soap.SOAPMessageHandlers


JAX-WS 2.0

javax.xml.ws.ServiceMode

javax.xml.ws.WebFault

javax.xml.ws.RequestWrapper

javax.xml.ws.ResponseWrapper

javax.xml.ws.WebServiceClient

javax.xml.ws.WebEndpoint

javax.xml.ws.WebServiceProvider

javax.xml.ws.BindingType

javax.xml.ws.WebServiceRef

javax.xml.ws.WebServiceRefs


SCA 0.95

org.osoa.sca.annotations.AnnotationSupport

org.osoa.sca.annotations.Callback

org.osoa.sca.annotations.ComponentName

org.osoa.sca.annotations.Constructor

org.osoa.sca.annotations.Context

org.osoa.sca.annotations.Destroy

org.osoa.sca.annotations.Init

org.osoa.sca.annotations.OneWay

org.osoa.sca.annotations.Property

org.osoa.sca.annotations.Reference

org.osoa.sca.annotations.Remotable

org.osoa.sca.annotations.Scope

org.osoa.sca.annotations.Service

org.osoa.sca.annotations.Session

org.osoa.sca.annotations.SessionID


Apache Tuscany 1.0

org.apache.tuscany.api.annotation.DataType

org.apache.tuscany.api.annotation.DataContext

org.apache.tuscany.api.annotation.LogLevel

org.apache.tuscany.api.annotation.Monitor

Tasks

  • Edit the wsdl document

Double click a wsdl file from the navigator tree, you will open wsdl editor. Switch to Design Tab, you can right click to add operation or message part or Fault to wsdl file, or edit name/message part by double-clicking. In outline view, you can navigate the wsdl document tree and add/delete elements.

  • Create service component from java interface
  • Create service component from wsdl
  • Create service component from scratch
  • Add JAX-WS handler
  • Use the annotation property view
  • Add JAX-WS functions to existing eclipse project
  • Generate code from wsdl file
  • Annotation validation
  • Create simple frontend for Apache CXF

Create RESTful service (TBD)

Create JBI component (TBD)

Create SCA component (TBD)

Package and deploy service component

Add a server

Create deployable package

Deploy component

Undeploy component

Test and debug your component

Create a test client

Use REST test client (TBD)

Debug your application

Report bug/Get help

Where to report STP bug

open new bugs.

Where to get help

Maillist

There are two maillists:

stp-user maillist for stp users.

stp-dev maillist for stp developers.

For detail information on how to subscribe, please refer to stp-user, stp-dev

Newsgroup

STP newsgroup is used by end users to ask questions.

server: news.eclipse.org

For detail information on how to register, please refer to here

Back to the top