Chapter 8 Working with Web Services


Creating a Web service method

A Web service method is an operation with the Web Service Method property selected.

A web service method can call other methods that are not exposed as Web service methods. In this case, these internal methods are not generated in the WSDL.

Web service methods can belong to the component implementation class or to component interfaces.

Web service port types

Interfaces linked to a Web service component can be used to design different groups of methods representing different port types.

A component interface containing at least one operation with the Web Service Method property selected is considered as a port type.

Interface methods use the same extended attributes as classes methods for WSDL customization, as explained in section Defining Web service method extended attributes.

Three extended attributes are used to decide which Port Type should be generated: SOAPPortType, HttpGetPortType and HttpPostPortType. If a Web method is created in an interface, only the SOAPPortType attribute is set to True. This method is automatically added to the implementation class of the component.

JAXM

For JAXM Web Service component, the implementation of the Web Service must be done in the onMessage() method. To be able to generate the correct WSDL, you have to declare a Web Service method without implementation to define the input SOAP message and the output SOAP message.

For more information on method implementation see sections Implementing a Web service method in Java and Implementing a Web service method in .NET.

Steps To create a Web service method:

  1. 1 Open the property sheet of the Web Service class or interface.
  2. Click the Operation tab.
  3. Click the Insert a row tool to create a new operation.
  4. Click Apply and click the Properties tool to display the operation property sheet.
  5. Select the Web Service method check box in the General tab.
  6. Click OK.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.