Sunday, February 22, 2009
Close Local DB Connection
Parameter:AutoStopDB
Set this parameter in tools.cfg to TRUE to close the database connection automatically after you exit the tools.Well that was easy right!!
Later..
Thursday, January 15, 2009
It's Frost bites time!!!
Our man AR rocks the western world now and every Indian should be proud of him. Saw the Slumdog millionaire and loved the screenplay. But I wish that the director has shown atleast one nice shot of Business Capital of India. I heard one of the audience in the theater commenting , “Now I understand why it’s easy to take Indian out of India”. Well some of the scenes were gross than Saw for sure. But screenplay of the movie stands tall. I wish AR wins Oscar for this sound track. I feel some of his scores in the nineties are much better than Slumdog soundtrack but the media was not big in the 90s as it is now.
Other than watching movie and talking to my friends my week has been pretty drab .Guess what spend the rest of time in Siebel trying to invoke .net web service from Siebel.It was interesting and good that it was not a smooth ride..Learnt a lot .So here is how I did it.
1.Wrote a program in C# and exposed it as web service.
Code:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
/*[WebMethod]
public string HelloWorld() {
return "Hello World";
}*/
[WebMethod]
public decimal AddNumbers(decimal lnNumber1, decimal lnNumber2) {
decimal AddNumbersResult;
AddNumbersResult = lnNumber1 + lnNumber2;
return AddNumbersResult;
}
}
2.Compiled and saved the WSDL. It’s easier to generate WSDL in .net .You just change the published web service from http://localhost:1569/WebSite1/Service.asmx?op=AddNumbers to
http://localhost:1569/WebSite1/Service.asmx?wsdl .
3.Imported the WSDL into Siebel
4.Siebel generates IO and Bus Srvc for the WSDL
5. Created a BusSrvc to build the hierarchy to send the numbers over to .net.Also, note in the program below how you define the variable type as number. This is new in Siebel and helps to improve the performance.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
var svc;
var psInputs;
var psOutputs;
var outputListOfNum;
var getNumbersResponse;
var outputAddNum ;
var num_result;
var Rev_1:Number;
var Rev_2:Number;
try
{
if(MethodName == 'Invoke WS')
{
svc = TheApplication().GetService("ServiceSoap_1");
psInputs = TheApplication().NewPropertySet();
psOutputs = TheApplication().NewPropertySet();
psInputs.SetType("AddNumbersSoapIn:parameters");
psInputs.SetProperty("MessageId","");
psInputs.SetProperty("MessageType","Integration Object");
psInputs.SetProperty("IntObjectName","AddNumbers");
psInputs.SetProperty("IntObjectFormat","Siebel Hierarchical");
var pchild = TheApplication().NewPropertySet();
var pchild1 = TheApplication().NewPropertySet();
Rev_1 =ToNumber(Inputs.GetProperty("Revenue I"));
Rev_2 =ToNumber(Inputs.GetProperty("Revenu II"));
pchild.SetType("ListOfAddNumbers");
pchild1.SetType("AddNumbers");
pchild1.SetProperty("lnNumber1",Rev_1);
pchild1.SetProperty("lnNumber2",Rev_2);
pchild.AddChild(pchild1);
psInputs.AddChild(pchild);
Outputs.AddChild(psInputs);
return(CancelOperation);
}// if(MethodName == 'Invoke WS')
else if (MethodName == 'ParseReturn')
{
if (Inputs.GetChildCount() > 0)
{
getNumbersResponse = Inputs.GetChild(0);
if (getNumbersResponse.GetType() == "AddNumbersSoapOut:parameters")
{
if (getNumbersResponse.GetChildCount() > 0)
{
outputListOfNum = getNumbersResponse.GetChild(0);
if (outputListOfNum.GetType() == "ListOfAddNumbersResponse")
{
if (outputListOfNum.GetChildCount() > 0)
{
outputAddNum = outputListOfNum.GetChild(0);
if (outputAddNum.GetType() == "AddNumbersResponse")
num_result = outputAddNum.GetProperty("AddNumbersResult");
Outputs.SetProperty("AddResponse",num_result);
}
}
}
}
}
return(CancelOperation);
}
else
return (ContinueOperation);
}//try
catch(e)
{
//calling a function to handle the error, with event name and error object as inputs
throw(e);
}
finally
{
}
}
6. Created a workflow to :
• Build Hirerachy
• Invoke Web Service
• Parse return from .net
• Update Siebel for the result from .net
It works perfect.So that’s all it is. I should say it was easy to integrate Siebel with .net than Java. More in next.
Tuesday, December 30, 2008
Secret of Success
Just to keep track of my knowledge progress in Siebel, I decided to post something related to Siebel in my blogs at least weekly this would hone my Siebel skill and probably be a knowledge base for others :-) . Here we go, Siebel thought for the day ( I hear the opening bell!!!).To make it easier to navigate I will categorize the Siebel tips
Refresh an applet:
I have seen lot of scripts written to refresh the applet once the record is created. This can be easily done with an OOTB
Business Service :SIS OM PMT Service and
Method: Refresh Business Component
This can be invoked from script or Workflow process.
That’s it for now. Probably this is my last post for the year, wishing you guys all a HAPPY NEW YEAR. I hope I keep up to my resolution(s).Later…
Thursday, October 16, 2008
Letz get it started in here!!
Finally Thursday is here and I have quite a few things to check off my list before I go to India for a short vacation.
We are three weeks away from the election and everyone will be looking up to the next President in the tanked economy. I’m eager too but I would be much happier if I get to vote. I don’t think I can vote in India either since I don’t have an ID card.
Well all pages in the news paper have something related to economy. I don’t complain but this is the only thing you hear when you tune to any channel or skim through any page in the news paper..One good news is oil price has plummeted and the big shots in oil industry are meeting next week to talk about this. What might they conclude, let’s reduce the oil supply to increase the price and put an end to one good news that media would report in the crumbling economy. I wish oil was not a commodity at first place.
All ramblings aside, I’m planning to go for the SOA suite training soon. Well this should be good, always I wanted to learn integration in Java and I hope that SOA will be a good start to head in that direction.
More in the next, till then good bye