Integration Platform Technologies: Siebel eBusiness Application Integration Volume II > Business Services > Business Scenario >

Code Sample


An example of the code you need to write to create the property set may look something like this:

x = TheApplication.InvokeMethod("WebForm", inputs, outputs);

var svc; // variable to contain the handle to the Service

var inputs; // variable to contain the XML input

var outputs; // variable to contain the output property set

svc = TheApplication().GetService("EAI XML Read from File");

   inputs = TheApplication().ReadEAIMsg("webform.xml");

   outputs = TheApplication().NewPropertySet();

svc.InvokeMethod("Read XML Hierarchy", inputs, outputs);

The following functions could be called from the preceding code. You attach the function to a business service in Siebel Tools:

NOTE:  You cannot pass a business object as an argument to a business service method.

Function Service_PreInvokeMethod(MethodName, inputs, outputs)

   {

   if (MethodName=="GetWebContact")

   {

      fname = inputs.GetProperty("<First Name>");

      lname = inputs.GetProperty("<Last Name>");

      outputs.SetProperty("First Name",fname);

      outputs.SetProperty("Last Name", lname);

   return(CancelOperation);

   }

return(ContinueOperation);

}

Function Service_PreCanInvokeMethod(MethodName, CanInvoke)

{

   if (MethodName=="GetWebContact")

   {

      CanInvoke ="TRUE";

      return (CancelOperation);

   }

   else

   {

   return (ContinueOperation);

   }

}


 Integration Platform Technologies: Siebel eBusiness Application Integration Volume II 
 Published: 18 July 2003