Steps:
- Log in to Siebel Tools and create a new custom business service.e.g: MyBS.
- Expand to Business Service Method and add a record:
Name = MyQuery - Expand to Business Service Method Arg and add 3 records:
- SiebelMessage, Type = Input, Data Type= Integration Object, Storage Type=Hierarchy , Integration Object = "EAI Account" (or your preferred IO)
- MyIO, Type = Output, Data Type= Integration Object, Storage Type = HIERARCHY, Integration Object = "EAI Account" (or your preferred IO)
- Error Message, Type = Output, Data Type = String, Storage Type = Property
Publishing Inbound Web Services
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName == "MyQuery" )
{
// get hold of EAI Siebel Adapter BS
var adpBS = TheApplication().GetService("EAI Siebel Adapter");
// Variable to hold EAI Siebel Adapter output
var psQueryOutput = TheApplication().NewPropertySet();
// Variable to hold MyIO output argument.
var MyIOOutput = TheApplication().NewPropertySet();
// receiving an IO as input to the web service
// it gets passed to "Inputs" variable.
// passing "Inputs" directly to EAI Siebel Adapter.
adpBS.InvokeMethod("Query",Inputs,psQueryOutput);
// (Doc ID 476560.1)
MyIOOutput.SetType("MyIO");
// goes down the propertyset till you find the IO you are looking for.
// hint: Doc ID 477881.1
MyIOOutput.AddChild(psQueryOutput.GetChild(0).GetChild(0));
// set the output of your custom BS
Outputs.AddChild(MyIOOutput);
Outputs.SetProperty("Error Message","Record Retrieved Successfully");
// dump the output structure here
DumpPropSet(Outputs);
adpBS = null;
psQueryOutput = null;
MyIOOutput = null ;
return (CancelOperation);
}
else
{
return(ContinueOperation);
}
}
- 4. Right click the business service name and select Edit Server Scripts.
5. Choose eScript as the programming language.( could be Siebel VB too but the code sample below is eScript). Add the code below, review and compile to the server SRF.
6. Publish the business service as an inbound web service the usual way.
The steps are descriped in Bookshelf: Integration Platform Technologies: Siebel Enterprise Application Integration > Web Services > Invoking Siebel Web Services Using an External System >
Notice during the publishing process, the BS will NOT be listed. You have to add a new record and type in the BS name as documented in bookshelf.
7. Test. You may want to use a test utility such as SOAPUI or any other tool.
You may as well use use a siebel dedicated client and sample database as seen in How To Test Siebel Inbound Web Services Using a Siebel Client (Doc ID 473838.1).
If testing with a Siebel dedicated client, the following document may be helpful too: How To Create Integration Object Instances Programmatically (Doc ID 556846.1)
The DumpPropSet(Outputs) below helps us understand both how to pass data as output as well as data for input scenarios.
The important here is the structure should have 4 levels :
1) Inputs (or Outputs) property. It does not have any type set.
2) Business service method argument level property. This is a child of (1) above and has type = business service method argument name (in the example below "MyIO")
3) Integration Object representation. This is a child of (2) above and has type =ListOf<IO_NAME>
(in the example below ListOfEAI Account)
4) root integration component level. Should have type = root IC name.
In this case type = Account
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 01 ---- Starting a new property set ----
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 01 Value is ........ : ""
Wed Mar 02 15:30:28 2011 : 01 Type is ........ : ""
Wed Mar 02 15:30:28 2011 : 01 Child count ..... : 1
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 01 Property 01 name : "Error Message"
Wed Mar 02 15:30:28 2011 : 01 Property 01 value : "Record Retrieved Successfully"
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 01 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:28 2011 : 01 This child is on level 1
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 02 ---- Starting a new property set ----
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 02 Value is ........ : ""
Wed Mar 02 15:30:28 2011 : 02 Type is ........ : "MyIO"
Wed Mar 02 15:30:28 2011 : 02 Child count ..... : 1
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 02 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:28 2011 : 02 This child is on level 2
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 03 ---- Starting a new property set ----
Wed Mar 02 15:30:28 2011 :
Wed Mar 02 15:30:28 2011 : 03 Value is ........ : ""
Wed Mar 02 15:30:28 2011 : 03 Type is ........ : "ListOfEAI Account"
Wed Mar 02 15:30:29 2011 : 03 Child count ..... : 1
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 03 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:29 2011 : 03 This child is on level 3
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 ---- Starting a new property set ----
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Value is ........ : ""
Wed Mar 02 15:30:29 2011 : 04 Type is ........ : "Account"
Wed Mar 02 15:30:29 2011 : 04 Child count ..... : 4
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 01 name : "Competitor"
Wed Mar 02 15:30:29 2011 : 04 Property 01 value : "N"
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 02 name : "EAI Sync Date"
Wed Mar 02 15:30:29 2011 : 04 Property 02 value : ""
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 03 name : "Division"
Wed Mar 02 15:30:29 2011 : 04 Property 03 value : ""
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 04 name : "Price List Integration Id"
Wed Mar 02 15:30:29 2011 : 04 Property 04 value : ""
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 05 name : "EAI Sync Status Code"
Wed Mar 02 15:30:29 2011 : 04 Property 05 value : ""
Wed Mar 02 15:30:29 2011 :
Wed Mar 02 15:30:29 2011 : 04 Property 06 name : "DUNS Number"
Wed Mar 02 15:30:29 2011 : 04 Property 06 value : ""
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 07 name : "Managers Review"
Wed Mar 02 15:30:30 2011 : 04 Property 07 value : ""
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 08 name : "Account Status"
Wed Mar 02 15:30:30 2011 : 04 Property 08 value : "Active"
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 09 name : "Main Phone Number"
Wed Mar 02 15:30:30 2011 : 04 Property 09 value : ""
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 10 name : "Language Code"
Wed Mar 02 15:30:30 2011 : 04 Property 10 value : "ENU"
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 11 name : "Currency Code"
Wed Mar 02 15:30:30 2011 : 04 Property 11 value : "USD"
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 12 name : "CSN"
Wed Mar 02 15:30:30 2011 : 04 Property 12 value : "1-1UWF"
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 13 name : "Partner Flag"
Wed Mar 02 15:30:30 2011 : 04 Property 13 value : "N"
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 14 name : "Integration Id"
Wed Mar 02 15:30:30 2011 : 04 Property 14 value : ""
Wed Mar 02 15:30:30 2011 :
Wed Mar 02 15:30:30 2011 : 04 Property 15 name : "Freight Terms Info"
Wed Mar 02 15:30:30 2011 : 04 Property 15 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 16 name : "Alias"
Wed Mar 02 15:30:31 2011 : 04 Property 16 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 17 name : "Type"
Wed Mar 02 15:30:31 2011 : 04 Property 17 value : "Customer"
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 18 name : "Prospect Flag"
Wed Mar 02 15:30:31 2011 : 04 Property 18 value : "N"
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 19 name : "Last Manager Review Date"
Wed Mar 02 15:30:31 2011 : 04 Property 19 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 20 name : "Home Page"
Wed Mar 02 15:30:31 2011 : 04 Property 20 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 21 name : "GSA Flag"
Wed Mar 02 15:30:31 2011 : 04 Property 21 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 22 name : "EAI Sync Error Text"
Wed Mar 02 15:30:31 2011 : 04 Property 22 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 23 name : "Main Fax Number"
Wed Mar 02 15:30:31 2011 : 04 Property 23 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 24 name : "Location"
Wed Mar 02 15:30:31 2011 : 04 Property 24 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 25 name : "Region"
Wed Mar 02 15:30:31 2011 : 04 Property 25 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 26 name : "Name"
Wed Mar 02 15:30:31 2011 : 04 Property 26 value : "ACR 437"
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 27 name : "Freight Terms"
Wed Mar 02 15:30:31 2011 : 04 Property 27 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 28 name : "Description"
Wed Mar 02 15:30:31 2011 : 04 Property 28 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 29 name : "Price List Id"
Wed Mar 02 15:30:31 2011 : 04 Property 29 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Property 30 name : "Price List"
Wed Mar 02 15:30:31 2011 : 04 Property 30 value : ""
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 04 Child Property Set 1 of 4 follows below.
Wed Mar 02 15:30:31 2011 : 04 This child is on level 4
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 05 ---- Starting a new property set ----
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 05 Value is ........ : ""
Wed Mar 02 15:30:31 2011 : 05 Type is ........ : "ListOfAccount_Business Address"
Wed Mar 02 15:30:31 2011 : 05 Child count ..... : 1
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 05 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:31 2011 : 05 This child is on level 5
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 06 ---- Starting a new property set ----
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:31 2011 : 06 Value is ........ : ""
Wed Mar 02 15:30:31 2011 : 06 Type is ........ : "Account_Business Address"
Wed Mar 02 15:30:31 2011 : 06 Child count ..... : 0
Wed Mar 02 15:30:31 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 01 name : "Street Address 2"
Wed Mar 02 15:30:32 2011 : 06 Property 01 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 02 name : "County"
Wed Mar 02 15:30:32 2011 : 06 Property 02 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 03 name : "Address Active Status"
Wed Mar 02 15:30:32 2011 : 06 Property 03 value : "Y"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 04 name : "Street Address"
Wed Mar 02 15:30:32 2011 : 06 Property 04 value : "1449 creekside"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 05 name : "City"
Wed Mar 02 15:30:32 2011 : 06 Property 05 value : "Walnut Creek"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 06 name : "Bill Address Flag"
Wed Mar 02 15:30:32 2011 : 06 Property 06 value : "N"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 07 name : "State"
Wed Mar 02 15:30:32 2011 : 06 Property 07 value : "CA"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 08 name : "Country"
Wed Mar 02 15:30:32 2011 : 06 Property 08 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 09 name : "Province"
Wed Mar 02 15:30:32 2011 : 06 Property 09 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 10 name : "Address Integration Id"
Wed Mar 02 15:30:32 2011 : 06 Property 10 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 11 name : "Ship Address Flag"
Wed Mar 02 15:30:32 2011 : 06 Property 11 value : "N"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 12 name : "Main Address Flag"
Wed Mar 02 15:30:32 2011 : 06 Property 12 value : "N"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 13 name : "Fax Number"
Wed Mar 02 15:30:32 2011 : 06 Property 13 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 14 name : "Email Address"
Wed Mar 02 15:30:32 2011 : 06 Property 14 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 15 name : "Phone Number"
Wed Mar 02 15:30:32 2011 : 06 Property 15 value : ""
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 Property 16 name : "Postal Code"
Wed Mar 02 15:30:32 2011 : 06 Property 16 value : "94596"
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 06 (No children exist below this property set.)
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 04 Child Property Set 2 of 4 follows below.
Wed Mar 02 15:30:32 2011 : 04 This child is on level 4
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 05 ---- Starting a new property set ----
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 05 Value is ........ : ""
Wed Mar 02 15:30:32 2011 : 05 Type is ........ : "ListOfAccount_Position"
Wed Mar 02 15:30:32 2011 : 05 Child count ..... : 1
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 : 05 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:32 2011 : 05 This child is on level 5
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:32 2011 :
Wed Mar 02 15:30:33 2011 : 06 ---- Starting a new property set ----
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Value is ........ : ""
Wed Mar 02 15:30:33 2011 : 06 Type is ........ : "Account_Position"
Wed Mar 02 15:30:33 2011 : 06 Child count ..... : 0
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Property 01 name : "Position"
Wed Mar 02 15:30:33 2011 : 06 Property 01 value : "Siebel Administrator"
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Property 02 name : "Position Integration Id"
Wed Mar 02 15:30:33 2011 : 06 Property 02 value : ""
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 (No children exist below this property set.)
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 04 Child Property Set 3 of 4 follows below.
Wed Mar 02 15:30:33 2011 : 04 This child is on level 4
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 ---- Starting a new property set ----
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 Value is ........ : ""
Wed Mar 02 15:30:33 2011 : 05 Type is ........ : "ListOfContact"
Wed Mar 02 15:30:33 2011 : 05 Child count ..... : 0
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 (No children exist below this property set.)
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 04 Child Property Set 4 of 4 follows below.
Wed Mar 02 15:30:33 2011 : 04 This child is on level 4
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 ---- Starting a new property set ----
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 Value is ........ : ""
Wed Mar 02 15:30:33 2011 : 05 Type is ........ : "ListOfAccount_Organization"
Wed Mar 02 15:30:33 2011 : 05 Child count ..... : 1
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 05 Child Property Set 1 of 1 follows below.
Wed Mar 02 15:30:33 2011 : 05 This child is on level 5
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 ---- Starting a new property set ----
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Value is ........ : ""
Wed Mar 02 15:30:33 2011 : 06 Type is ........ : "Account_Organization"
Wed Mar 02 15:30:33 2011 : 06 Child count ..... : 0
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Property 01 name : "Organization Id"
Wed Mar 02 15:30:33 2011 : 06 Property 01 value : "0-R9NH"
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Property 02 name : "Organization Integration Id"
Wed Mar 02 15:30:33 2011 : 06 Property 02 value : ""
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 Property 03 name : "Organization"
Wed Mar 02 15:30:33 2011 : 06 Property 03 value : "Default Organization"
Wed Mar 02 15:30:33 2011 :
Wed Mar 02 15:30:33 2011 : 06 (No children exist below this property set.)