Siebel Object Interfaces Reference > Programming > Getting Started with the Siebel Object Interfaces >

Accessing the Siebel Mobile Web Client Automation Server


The Siebel Mobile Web Client Automation Server accesses the server object instantiated by the Siebel Business Application. Once you have this object, you can obtain other Siebel objects and execute Siebel object interface methods through those objects. Calls made to the Siebel Mobile Web Client Automation Server are out of process. If you create a DLL that is run in process with the Siebel application, the calls made from the DLL to the Siebel Mobile Web Client Automation Server are still out of process.

The mechanism for instantiating COM servers depends on the programming tool or language being used.

If you use Microsoft Visual Basic 5.0 or later, the required support file must be in the same directory as the CFG file you are using for your Siebel application, or the Mobile Web Client Automation Server does not work. Take the following steps to make sure that you are referring to the correct library.

To set up Microsoft Visual Basic to access the Siebel Mobile Web Client Automation Server

  1. Start Microsoft Visual Basic.
  2. Select Standard EXE.
  3. Choose Project > References.
  4. In the list box, highlight (check) Siebel Mobile Web Client Automation Server. Near the bottom of the dialog box, note the directory in which the file Siebel.exe resides.

The following examples show how to use Microsoft Visual Basic 6.0 to interface with Siebel Mobile Web Client Automation Server.

The following is sample code for the Siebel Mobile Web Client Automation Server:

Private Sub Command1_Click()
'Siebel Application Object
Dim siebApp As SiebelWebApplication
Dim siebBusObj As SiebelBusObject
Dim siebBusComp As SiebelBusComp
Dim siebSvcs As SiebelService
Dim siebPropSet As SiebelPropertySet
Dim bool As Boolean
Dim errCode As Integer
Dim errText As String
Dim connStr As String
Dim lng As String
'Create The Siebel WebApplication Object
Set siebWebApp = CreateObject("TWSiebel.SiebelWebApplication.1")

If Not siebWebApp Is Nothing Then


'Create A Business Object
Set siebBusObj = siebWebApp.GetBusObject("Contact")
If Not siebBusObj Is Nothing Then
   'Create a Business Component
   Set siebBusComp = siebBusObj.GetBusComp("Contact")

Else
   errCode = siebWebApp.GetLastErrCode
   errText = siebWebApp.GetLastErrText
   TheApplication().RaiseErrorText("Business Object Creation failed: " & errCode & "::" & errText);

End If

'Create A New Property Set
Set siebPropSet = siebWebApp.NewPropertySet
If Not siebPropSet Is Nothing Then
   Set siebPropSet = Nothing

Else

      errCode = siebWebApp.GetLastErrCode
      errText = siebWebApp.GetLastErrText
      TheApplication().RaiseErrorText("Property Set Creation failed: " & errCode & "::" & errText);
End If

'Get A Siebel Service
Set siebSvcs = siebWebApp.GetService("Workflow Process Manager")
If Not siebSvcs Is Nothing Then
   Set siebSvcs = Nothing
Else
   errCode = siebWebApp.GetLastErrCode
   errText = siebWebApp.GetLastErrText
   TheApplication().RaiseErrorText("Could not Get Siebel Service: " & errCode & "::" & errText);
End If

If Not siebBusComp Is Nothing Then
   Set siebBusComp = Nothing
End If

If Not siebBusObj Is Nothing Then
   Set siebBusObj = Nothing
End If

   Set siebWebApp = Nothing
End If

End Sub

Siebel Object Interfaces Reference