Siebel DataControl Sample Code
Sample Code which uses Siebel data Control to connect to Siebel. Its
available where ever COM objects can be consumed (Java, PHP etc etc).
Change UID and PWD. Check Bookshelf for more documentation on other
properties of DataControl…
[Vbscript]
Dim errCode
Set SiebelApplication = CreateObject("SiebelDataControl.SiebelDataControl.1")
SiebelApplication.Login
"host=""siebel.TCPIP.NONE.NONE://APPSERVER:2321/siebel/eCommunicationsObjMgr_enu""",
"UID","*****"
errCode = SiebelApplication.GetLastErrCode()
If errCode <> 0 Then
ErrText = SiebelApplication.GetLastErrText
Msgbox ErrText
Else
msgbox "Connected"
End If
[Jscript]
var errCode;
SiebelApplication = new ActiveXObject("SiebelDataControl.SiebelDataControl.1");
var ConnStr="host=\"siebel.TCPIP.NONE.NONE://APPSERVER:2321/siebel/eCommunicationsObjMgr_enu\"";
var UID="ROY";
var PWD="*****";
WScript.Echo(ConnStr + UID + PWD);
SiebelApplication.Login(ConnStr, UID,PWD);
errCode = SiebelApplication.GetLastErrCode()
if (errCode != 0)
{
ErrText = SiebelApplication.GetLastErrText();
WScript.Echo(ErrText);
}
else
{
WScript.Echo("Connected");
}
3 Comments:
Depending on the siebel release the name of the COM object might be slightly differnet. Check your registry..
This comment has been removed by the author.
Although your application might have a public URL, the "APPSERVER:2321" referred in the sample code is actually the gateway ip. It is not likely that a company leaves it open and reachable from anywhere, making the COM data control solution usable only internally.
Post a Comment
<< Home