Invoking a Siebel Web Service from an External Application

As illustrated in the following figure, the following steps are executed to invoke a Siebel Web service from an external application:

  1. The WSDL document for an active Web service is published in the Siebel Inbound Web Services view. To allow processing of the Web service requests, the developer has to make sure:

    1. The Web Server and the Siebel Server are up and running.

    2. The appropriate setup is done in the Siebel Server.

  2. In the external application, the WSDL document is imported to create a proxy that can be used to invoke the Siebel Web service from Step 1.

  3. The external application sends the SOAP request into the Siebel application.

  4. The Web Service Inbound Dispatcher converts the SOAP request to a property set. Depending on the inbound Web service configuration, the property set is passed to a business service or a business process.

  5. The property set is returned from the business service or business process to the Web Service Inbound Dispatcher.

  6. Response is converted to a SOAP message and sent back to the invoking external application.

Invoking a Siebel Web Service. This image is described in surrounding text.

The following is an example of invoking a Siebel-published Web service using .NET.

// Removed using declaration
namespace sieOppClnt {
public class sieOppClnt : System.Web.Services.WebService {
public siebOptyClnt() {
InitializeComponent();
}
// WEB SERVICE CLIENT EXAMPLE
/* The optyQBE returns a list of opty based upon the required input params. Because 
the input to the Siebelopty.QueryByExample method uses an Input/Output param, 
ListOfInterOptyIntfaceTopElmt will be passed by ref to Siebel. To add the Siebel 
Opportunity Web Service definition to the project, the wsdl.exe utility was run 
to generate the necessary helper C# class for the service definition. */
[WebMethod]
public ListOfInterOptyIntfaceTopElmt optyQBE(string acctName, string acctLoc, 
string salesStage) {
	Siebelopty svc = new Siebelopty();
	ListOfInterOptyIntfaceTopElmt siebelMessage = new 
	ListOfInterOptyIntfaceTopElmt();
	ListOfInteroptyInterface optyList = new ListOfInteroptyInterface();
	opty[] opty = new opty[1];
	opty[0] = new opty();
	opty[0].Account = acctName;
	opty[0].AccountLocation = acctLoc;
	opty[0].SalesStage = salesStage;
	
	/* Assemble input to be provided to the Siebel Web service. For the sake of 
	simplicity the client will query on the Account Name, Location, and Sales 
	Stage. Ideally, also check to make sure that correct data is entered. */
	
	optyList.opty = opty;
	siebelMessage.ListOfInteroptyInterface = optyList;
	
	// Invoke the QBE method of the Siebel Opportunity business service
	svc.SiebeloptyQBE(ref siebelMessage);
	
	/* Return the raw XML of the result set returned by Siebel. Additional 
	processing could be done to parse the response. */
	
	return siebelMessage;
		}
	}
}