In this post I will explain what a property set is, how it looks and how to build a property set using eScript.
Property set is a set of data containing Type, Property and Value. It is stored in a form of XML. For example, when you write a business service a script under Service_PreInvokeMethod and Inputs to this is a property set and it could something like this.
<Inputs status=”Active” Type=”Credit Request”/>
Where Inputs is a Type, status=”Active” is a property name-value pair and so is Type=”Credit Request”. This propertyset has no value.
Lets see another property set.
<UsernameToken xmlns=”http://siebel.com/webservices”>SADMIN</UsernameToken>
Here UsernameToken is a property type, xmlns=”http://siebel.com/webservices” is property name-value pair and SADMIN is a property value.
Using eScript we can build propertyset. Lets try to build a property set that looks something like this.
<SOAP-ENV:Header>
<UsernameToken xmlns=”http://siebel.com/webservices”>SADMIN</UsernameToken>
<PasswordText xmlns=”http://siebel.com/webservices”>SADMIN</PasswordText>
<SessionType xmlns=”http://siebel.com/webservices”>Stateless</SessionType>
</SOAP-ENV:Header>
The above XML code is a SOAP header normally used with webservices. The above whole code is one single property set having three child propertysets UsernameToken, PasswordText and SessionType.
The script to build this whole propertyset is here below.
//Initialize a propertyset
var soapHeader = TheApplication().NewPropertySet();
//This sets the type-Builds line 1 and 5
soapHeader.SetType(”SOAP-ENV:Header”);
var UsernameToken = TheApplication().NewPropertySet();
var PasswordText = TheApplication().NewPropertySet();
var SessionType = TheApplication().NewPropertySet();
//This builds line 2
UsernameToken.SetType(”UsernameToken”);
UsernameToken.SetProperty(”xmlns”,”http://siebel.com/webservices”);
UsernameToken.SetValue(”SADMIN”);
//This builds line3
PasswordText.SetType(”PasswordText”);
PasswordText.SetProperty(”xmlns”,”http://siebel.com/webservices”);
PasswordText.SetValue(”SIEB2008″);
//This builds line4
SessionType.SetType(”SessionType”);
SessionType.SetProperty(”xmlns”,”http://siebel.com/webservices”);
SessionType.SetValue(”Stateless”);
//Add lines 2,3 and 4 as child of line 1
soapHeader.AddChild(UsernameToken);
soapHeader.AddChild(PasswordText);
soapHeader.AddChild(SessionType);
Hope this helps in understanding the representation of propertysets and how it is stored. Leave your comments.
Related posts(Auto Generated):





September 19th, 2008 at 2:46 pm
wonderful scripting suggestions to newbies!!!
November 4th, 2008 at 12:59 pm
It was really helpul..
March 23rd, 2009 at 12:11 am
Hey Sridhar,
Its one of the most simplets way to undesrstand property sets.
Thanks,
Varun
May 1st, 2009 at 3:53 am
Shridhar,
This is very helpful and explains clearly even to a beginer like me.thanks a lot!!!
May 1st, 2009 at 6:05 pm
you are welcome.
October 16th, 2009 at 5:00 pm
Thanks Sridhar, this is very helpful to understand property set’s representation. Nice explanation!!
January 19th, 2010 at 8:29 am
Hey,
Thats really nice approach to make things easy.Thanks a lot!
February 28th, 2010 at 11:52 am
Very Excellent yaar.
i didnt know the basic concept of this though i am writing the script for years. Blindly we used to set the property or AddChild etc. to the propery set variable.
Thanks alot for elucidating th concept.
Best Regards
Mahesh
May 21st, 2010 at 9:06 am
really nice
bookshelf should be something like this man instead all it does is to complicate stuff in my head
October 25th, 2010 at 6:44 pm
Hi Sridhar,
I am trying to travese through the output property set generated by using EAI Siebel Adaptor BS using method “Query” and read attribute values for some computation.
I am not able to traverse thru the XA by using GetChild method as in the output property set, the xa are not coming as child of Line Item though in the IO(SIS OM Order) they are defined as such.
I am able to use GetChild Method to traverse through all Line Items in an Order but am not bale to travserse thru all XA for each line item.
I tried to read the value of a property for XA directly using static GetChild but still i am able to reach the tag List Of XA but not the XA records.
Please advise.
Thanks and Regards,
Amitabh Misro
October 26th, 2010 at 5:15 pm
Hi Amitabh,
I would suggest that you write the output of EAI Siebel Adapter to a file just to make sure that you indeed have the child property set you are looking for.
Let me know if this helps. Thanks.
December 20th, 2010 at 4:00 pm
Excellent explenation! Thank you very much!
December 21st, 2010 at 12:49 pm
Hello, can you please explain how can I create this element using Property Sets?
July 26th, 2011 at 6:53 am
This s really good and it helps me understanding what the property set is really. But i have a doubt. What will happen when we use var variable_name = TheApplication.NewPropertySet(). I don’t understand this still.
December 26th, 2011 at 12:11 pm
Hey..
really, i used to do this but was not able to find he reason why… got it… Thanks…
May Your package doubles every year…
January 13th, 2012 at 12:05 pm
Simple and awesome example
January 26th, 2012 at 11:57 pm
Thank u very much. I am thankful to u for this valuable information.