Wednesday 27 July 2016

Working with Siebel Outbound Web Services

Hello All,

Recently i has some requirement wherein i had to work with siebel outbound webservices.
It was first time i was working with Outbound web services so i tried to first understand the working of outbound webservices, so to explain in brief
  • Outbound Web services requires a WSDL file provided by external System.
  • This WSDL file contains Methods that are understood by external system and URL's that will be requesting connection to external system
  • WSDL file is Imported in Siebel Tools and Path for XML and Log file is specified
From Tools new wizard select Web Service

Provide a WSDL file location and Directory for log and WSDL file XML generation (generally a writable directory i.e. c://siebel/tools/temp)

Import start and we have Option to auto deploy the IO and Business Service to client or we can manually do it by importing the WSDL XML file generated in previous step in Administration - Web Service > Outbound web service view

  • This Import of WSDL generates a Proxy Business Service in Siebel and Related IO (External IO)
Proxy BS based on class "CSSWSOutboundDispatcher" with methods defined in WSDL file

IO's created with type as XML(external IO)

  • The BS actually contains the Methods and Input/Output description that are understood by external system
  • Either the webservice can be deployed while Importing WSDL by selecting deploy as Web Service option or by imporitng the XML file that was generated from WSDL import in Administration - Web Service, Outbound web services view.
  • Verify the Newly imported Business Service and IO's created in the Tools, 
  • Compile the BS in the SRF and you are now ready to move to Next Step.
Important step now is to understand the format in which data has to be passed in the Web Service and when to call the web service. So some points that should be understood are 

  • How the data/Inputs needs to be passed to Web Service - We need to pass the inputs to proxy BS which was generated after WSDL Import, which in turn internally calls the outbound deployed Web Service.
  • What should be the data structure (Input Data Type), Since WSDL import generated IO (external) with XML base we have to pass data with XML as Structure. The exact Structure can be known from IO Structure, generally it's

  • How to use the Output, since the Output will also be in XML format we need to identify the Tags we require form the Output XML, we can use vanila siebel business services to get elements value from XML's. To get value of tag ICField1, we will have to traverse XML till the node and get it value general format in dot notation is
  • The Most important thing is when to call this whole Process, its important to decide the event when to send the outbound request it may be on a Record Write on database or on Button click. So for that we need to create RTE, or custom method on the particular events to call the Process  and pass the inputs.
In my next post i will take a Sample WSDL file and create a Process that will pass inputs to the web service and extract Output returned from external system.

Monday 18 July 2016

Deploying Siebel Busines Service as Web Service

Hi All,

While working with Integration with different systems, we need to expose Siebel process to external system.
We can use Workflows or Business Services as web services and can expose these to external system. So the process is like.

  • Siebel Workflow/Business Service Exposed as Web Service
  • WSDL for the Web Service is shared with external system
  • Communication happens over different Protocol (SOAP / REST)
In this post i would explain and describe how to expose Business Service as web service.

Suppose we have a scenario in which External system need to query Siebel Contacts and get the result.
We will first write a simple Business Service with the Describe logic and once BS is tested will deploy it as Web Service.
I assume that you have already a Business Service Ready ,we need to follow below Steps: 

1. Navigate to Administration Web Service - Inbound Web Services

2. Enter a new record with the following details

  • Namespace - Provide a valid name her this will be used as refernce by external system
  • Name - Name of web service for Siebel reference

3. In Below Applet Serivce Ports, define the required details

  • Click on New button, 
  • In Business Service Field open the Pick applet, it will show the List of available BS in system
  • click New button in the pick applet and choose your created BS, and give it a name
  • Choose Transport as HTTP, and define the Address, its of the form http://<webServer>/eai_<language>/start.swe

4. In the below Operation applet choose the Method described for the BS, it shows the method defined in the Business Service - Method

After this steps your Inbound Web Service is ready we can generate WSDL for this and can share it with external system.

note: before generating WSDL , click on Clear Cache button to load latest data also make sure popup is not blocked. The web service can be tested on any SOA based tool like SOAP UI, more detail like how to simulate web service using SOAP UI i will share a separate post for this.

Thursday 14 July 2016

Calculating Difference Between two dates in Siebel eScript

Hello All,

Very often we get to work with dates in Siebel, comparing two dates, Subtracting two dates. So how do actually date types field behave. In eScript we declares variable as var which is general format as eScript is not strongly typed language.
I had a very simple requirement to compare Today's date with created date calculate age of record.
Logic is very simple,

Today()-RecordDate, and it should give me the output but it didn't work. :(

Here comes the use of Date() object to actually compare, manipulate date variable.

so the expression is modified to ,

var Today = new Date();
var RecordDate = new Date(Rec_Date);

Difference = Today - RecordDate ;

Now it works as expected, the difference is in Milliseconds, that can be converted to Years or Days by dividing with factor.

To Days, Difference/(1000*60*60*24);
To Years, Difference/(1000*60*60*24*365);

Hope this was helpful.

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...