Search This Blog

Sunday, December 12, 2010

Outbound Web Services

An outbound Web Service definition acts as a proxy to a Web Service published by an external application. The outbound Web Service can be based on one of the following:

  • External Web Service definition (WSDL) file
  • Outbound Application Service Interface (ASI)

Outbound Web Services Based on an External WSDL File

The following procedure describes how to use the WSDL Import Wizard to read an external WSDL document.

To read an external WSDL document

  1. Start Siebel Tools.
  1. Create a new project and lock the project, or lock an existing project in which you want to create your integration object.
  1. Choose File > New Object... to display the New Object Wizards.
  1. Select the EAI tab, select the Web Service icon, and click OK.

The WSDL Import Wizard appears.

  1. Select the Project where you want the objects to be held after they are created from the WSDL document.
  1. Specify the WSDL document that contains the Web Service or Web Services definition that you want to import.
  1. Specify the file where you want to store the run-time data extracted from the WSDL document.
  1. Specify the log file where you want errors, warnings, and other information related to the import process to be logged.
  1. Click Next to view and verify a summary of your import information.
  1. Click Finish to complete the process of importing the business service into the Siebel repository.

This procedure generates three objects in Siebel repository.

  • An outbound proxy business service of CSSWSOutboundDisptacher class.

NOTE: For RPC services, the order of input arguments is important. You can set the order through the Preferred Sequence property of the business service method argument in Siebel Tools. By specifying this parameter, the outbound dispatcher makes sure that the sequence parameters for an operation are in the correct order. The Preferred Sequence property is only supported with outbound services.

  • One or more integration objects representing input and output parameters of the service methods.
  • An XML document containing the run-time parameters that should be imported into the Siebel client. For details, see To import run-time data about external Web Service.

Outbound Web Services Administration

The WSDL Import Wizard exports the data to a file that you must import to the run-time database (the Web Services address) using the Outbound Web Services screen.

To import run-time data about external Web Service

  1. Restart the Siebel Server (or Mobile Web Client) with a recompiled version of the .srf file that includes the new objects created by the Web Services Import Wizard.

NOTE: You do not need to update your .srf file at design time. However, the service definition must exist in the .srf file during run time.

  1. From the application-level menu, choose View > Site Map > Web Services Administration> Outbound Web Services view.
  1. In the Outbound Web Services list applet, click Import to bring up the EAI Web Service Import dialog box.
  1. Specify the export file created by the Web Services Import Wizard.
  1. Click Import to import the Web Service definition into the database.

WSDL does not provide native bindings for EAI MQSeries and EAI MSMQ transports. If your business requires you to pick up messages using these transports, you can manually create an outbound Web Service definition and update a corresponding business service in Siebel Tools to point to that Web Service. The following procedure describes this process.

To manually create a new outbound Web Service

  1. From the application-level menu, choose View > Site Map > Web Services Administration> Outbound Web Services view.
  1. In the Outbound Web Services list applet, create a new record.
    1. Enter the namespace of the Web Service in the Namespace column.
    1. Enter the name of the Web Service in the Name column.
    1. Select Active or Inactive in the Status field.
  1. Enter a description of the Web Service in the Comment column.

NOTE: When importing an external Web Service, you do not need to specify the proxy business service, integration objects, or the run-time parameters.

  1. In the Service Ports list applet, create a new outbound service ports record.
    1. Enter the name of the Web Service port in the Name column.
    1. Select a type of proxy for the Port Type column.
    1. Select a transport name for the protocol or queuing system for the Transport.
    1. Enter the address appropriate for the transport chosen.
      • For the Local Workflow or the Local Business Service transports, enter the name of a Business Process or Business Service that should be called.
      • For the Local Web Service transport, enter the name of the inbound port.
      • For the HTTP Transport, enter an HTTP address of the Web Service to be called—for example,http://mycompany.com/webserivice/orderservice.
      • For the EAI MQSeries AMI or EAI MSMQ Server transports, enter one of the following:

mq://send receive service point name@policy name

msmq://queue name@queue machine name

  1. Select whether the port uses SOAP document, SOAP RPC, or property set Binding.

NOTE: Property Set Binding should be used when the input Property Set to the proxy service is forwarded without changes to the destination address. This is intended primarily for use in combination with Local Workflow or Local Business Service transport to avoid overhead of processing XML.

  1. Enter a description of the Port in the Comment column.
  1. In the Operations Bindings applet, create a new Operations record.
    1. Enter the name of the Web Service in the Name column.
    1. Enter the name of the Binding Property in the Binding Property column; for example, SOAPAction.
    1. Enter the value of the Binding Property in the Binding Value column; for example, CreateOrder.
  1. Generate the WSDL file. For details, see To generate a WSDL file.

Once you have created your outbound Web Service, you need to update a corresponding outbound proxy business service in Siebel Tools to point to that Web Service. This associates the outbound proxy business service and the outbound Web Service. The following procedure outlines the steps you need to take to accomplish this task.

To update an outbound Web Service proxy business service to point to an outbound Web Service

  1. Open Siebel Tools.
  1. Select the outbound Web Service proxy business service you want to use to call your outbound Web Service.
  1. Add the following user properties for this business service and set their values based on the outbound service port of your Web Service.
    • siebel_port_name
    • siebel_web_service_name
    • siebel_web_service_namespace

Integration Objects as Input Arguments to an Outbound Web Service

The property set that is used as an input argument to the outbound Web Service should have the same name as the input argument's name of the outbound Web Service proxy.

You can do this using one of the following options:

  • Change the output from all your business services that provide the input to the outbound Web Service from SiebelMessage to the actual outbound Web Service argument name specified in Siebel Tools. You need to change the output from your business services in Siebel Tools, as well as the name of the property set child that contains integration object instance.
  • Change the property set name from SiebelMessage to the actual outbound Web Service argument name by using an eScript service before calling the outbound Web Service.

Inbound Web Services

The Inbound Web Service allows an external system to call a Siebel published Web Service. You can publish a business service or a business process as a Web Service and generate a Web Service Definition Language (WSDL) file that an external system can import. The Inbound Web Services can only be published from Siebel C using SOAP-RPC binding.

Publishing Inbound Web Services

You can create and publish an inbound Web Service using the Inbound Web Services view, as illustrated in the following procedure. You can then use the new Inbound Web Service when generating a WSDL document.

To create a new Inbound Web Service record

  1. From the application-level menu, choose View > Site Map > Web Services Administration> Inbound Web Services view.
  1. In the Inbound Web Services list applet, create a new Inbound Web Services record.
    1. Enter the namespace for your organization's Web Services in the Namespace column.
    1. Enter the name of the inbound Web Service in the Name column.
    1. Select Active or Inactive in the Status field.

NOTE: If the Web Service is inactive, then the external applications cannot invoke the Web Service. If the status is changed, the server component running the inbound transport, such as HTTP, requires a restart for the change to take effect.

  1. Enter a description of the Web Service in the Comment column.
  1. Create a new inbound service port record in the Service Ports list applet.
    1. Enter the name of the port in the Name column.
    1. Pick the type of object published.

If the required type is not available, add a new type following Step c through Step f; otherwise, move to Step g.

    1. Click New and select the implementation type (Business Service or Workflow).
    1. Select the implementation name (the business service or workflow that implements the port type).
    1. Enter a name for the new type in the Name field and click Save.
    1. Click Pick in the Inbound Web Services Pick Applet to complete the process of adding a new Type.
    1. Select the protocol or transport to publish the Web Service on.
    1. Enter the URL or queue to publish the Web Service on.

NOTE: When publishing over EAI MQSeries or EAI MSMQ, you cannot generate WSDL files.

      • The format to publish over EAI MQSeries or EAI MSMQ Server transports is:

mq://send receive service point name@policy name

msmq://queue name@queue machine name

    • The URL format to publish over HTTP is:

http://webserver/eai_lang/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=username&Password=password

Where:

lang is the default language of Object Manager to handle the request.

webserver is the machine name of the Siebel Web Server.

username is the Siebel user to execute the request.

password is the password of the Siebel user.

NOTE: The Siebel application supports only one type of binding, SOAP_RPC, for each Inbound Web Service.

  1. Enter a description of the Port in the Comment column.
  1. In the Operations list applet, create a new operation record for the new service port you created in Step 4 and want to publish.

NOTE: Only the operations created in this step will be published and usable by applications calling the Web Service. Other business service methods will not be available to external applications and can only be used for internal business service calls.

    • Enter the name of the Web Service operation.
    • Select the name of the business service method in the Business Service Method column to complete the process.

NOTE: The Business Service Method column defaults to RunProcess if you have chosen Workflow Process in Step 4 as the Type for your Service Port.

Generating a WSDL File

Once you have created a new Inbound Web Service record you can generate a WSDL document, as described in the following procedure.

To generate a WSDL file

  1. Choose the inbound Web Services you want to publish and click GenerateWSDL.

A WSDL file is generated that describes the Web Service.

  1. Save the generated file.
  1. Import the WSDL to the external system using one of the following utilities.
    • In VisualStudio.Net, use the wsdl.exe utility—for example, wsdl.exe /l:CS mywsdlfile.wsdl.
    • In Apache's AXIS, use the wsdl2java utility—for example, java org.apache.axis.wsdl.WSDL2Java mywsdlfile.wsdl.
    • In IBM's WSADIE, add the WSDL file to the Services perspective and run the Create Service Proxy wizard.

NOTE: These utilities only generate proxy classes. Developers are responsible for writing code that uses the proxy classes.

What is this blog about

This blog is for putting my gathered knowledge in one place to refer when needed. Content of this blog is gathered from different sources and my knowledge. The Sources, include other siebel blogs and support web and siebel bookshelf PDFs.

So, main purpose of the posts is to put all the things in readable manner.