Exposing Components as Web services

This section describes how to expose a component as a Web service.

StepsUsing the Expose wizard to expose a Web service

  1. From the Sybase Web Services view, highlight the component that you are exposing.

  2. Right-click the file and select Expose As Web Service.

  3. The Expose as a Web Service wizard displays. Table 4-6 describes the Expose as a Web Service properties. Complete the information and click next to move to the next window and Finish when done.

    Error messages are logged in the server’s log file and server’s servlet log file. Check these files for any error conditions. For example, if you see a non-unique context path error, verify that the exposed component does not share the same Web collection name and Web service name as another exposed component, and re-expose the Web service.

Table 4-6: Exposing and Deploying Web service wizard options and properties

Property

Description

Collection Name

Name of the Web service collection to which this Web service is exposed.

Make sure the Web collection name and Web service name combination are unique when exposing the component as a Web service.

Context path

Location of the Web service.

Endpoint address URI

A valid Uniform Resource Identifier (URI) for the location where the WSDL document is published. The target namespace should not include the file name; WST appends the appropriate file name when the WSDL document is generated. The target namespace can be a Uniform Resource Name (URN), which is a globally unique and persistent URI.

http://www.com.sybase.webservices is an example of a valid URI.

urn:simpleJavaClass.test is an example of a valid URN.

Binding Style

The SOAP binding style:

  • Document – indicates that the SOAP body contains an XML document.

  • RPC (remote procedure call) – indicates that the SOAP body contains an XML representation of a method/operation call.

  • Wrapped – a document literal variation, that wraps parameters as children of the root element.

Use

Specify the use (LITERAL or ENCODED) of items in the generated WSDL binding when exposing a Web service.