Thursday, November 26, 2009

Regular Expression - Nice guide

Check the link, found this article really nice

Thursday, October 22, 2009

Remedy Integration - Common Operations

This section want to give create ticket operation / step

CREATE TICKET

Will let you create a ticket on a particular form of the Remedy Server with the fields you has populated.

// creates entry
Entry entry = (Entry)entryFactory.newInstance();

// populates context into the entry - from last posting (Create Context)
entry.setContext( context );

// set the name of the form name
entry.setSchemaID( new NameID( ARS_FORMNAME ) );

// This is an array of EntryItem, which contains the number of
// fields to store to Remedy. Assume there are only two fields.
EntryItem[] entryItems=new EntryItem[2];

// assumes the field ID is 100 for this field.
entryItems[0] = new EntryItem(new FieldID(100), new Value (“some value”));

// assumes the field ID is 2 for this field.
entryItems[1] = new EntryItem(new FieldID(2), new Value(“test value”));

// set the entry items to the entry.
entry.setEntryItems( entryItems );

// creates the ticket in remedy
entry.create();

// releases memory used by this entry.
entryFactory.releaseInstance( entry );

I hope this serves like a beginners remedy integration tutorial, next post will be on update and retreive tickets.

Monday, October 19, 2009

Remedy Integration - Common Operations

You can call it step 1 of remedy integration with your application (using Java API, C, .NET API's are also avaiable)

CREATING CONTEXT

This operation / step is to set a context which consists of server ip, port number, user name, password and so on. Fill in the details accordingly

// Remedy Server IP
public static String ARS_SERVER = "";

// Remedy Port Number
public static int ARS_PORT = "";

// Remedy RPC number, usually 0
public statis int ARS_RPC = "";

// Remedy Language, usually blank
public static String ARS_LANGUAGE = “”;

// Remedy Form Name
public static String ARS_FORMNAME =”SAMPLE_JOE_FORM”;

// Remedy User ID
public static String ARS_USER = “joelj”;

// Remedy User Password
public static String ARS_PASSWORD = “mypass”;

ARServer context = new ARServerUser(ARS_USER, ARS_PASSWORD, ARS_LANGUAGE, ARS_SERVER);

Util.ARSetServerPort(context, new NameID(context.getServer()), ARS_PORT, ARS_RPC);

Following posts will talk about Creating, Updating and Retreiving remedy tickets.

Make sure you create a sample form in your (dev) remedy server to play around.

Tuesday, October 13, 2009

Remedy Integration - Common errors and issues

MessageNum: 90
Message not in catalog; Message number = 90
RPC: Rpcbind failure - RPC: Timed out

If you are getting errors above while integrating your app with Remedy then you should
continue reading.

Default, Remedy API calls underneath C API which uses RPC to communicate to the Remedy server.
It would not cause any problem if our software and Remedy server are loaded in the same machine or
there is no firewall or any kind of device that blocks the RPC communication between our software
and the Remedy server. Let just take a moment to look at how RPC works.
Each host that contains remote program runs a port-mapping server that listens on a well-known port (111).
The client contacts the port-mapper on its dedicated port, and sends the remote program number
and version number. The port mapper starts the remote program on a free port and sends that port number
to the client. The client then contacts the remote program on the specified port.

Because of how RPC works, clients would not know the free port that the server will use until run-time,
and clients would potentially receive a different port from the port-mapper every time.
This has raised a red alert in a network which has firewall because firewall administrator has
to open pretty much very single port to get the RPC work.

So if there is a firewall between our software and the remedy server, you will only get timeout errors as above.

Whats the workaround for this?

Specify the port number the Remedy server is listening on as follows prior to pass the ARServerUser object to Remedy.

Util.ARSetServerPort(ARServerUser context, NameID server, int port, int progNum)

Saturday, July 18, 2009

Scripts to manage Active Directory Users

Recently i worked on a requirement to manage AD from our app, and thought of sharing/posting few details


1. Simple User Authentication
Get LDAP object (oDSObj) and bind to an ADSI object using credentials as shown below
oDSObj.OpenDSObject("LDAP://" & _
StrNamingContext, "Domain\username", _
"password", ADS_SECURE_AUTHENTICATION)

if this throws error, credentials are invalid.

2. Change Password, Reset Password

objUser.ChangePassword OldPword,NewPword
objUser.SetPassword "gU1d0*!"

3. Unlock Account

objUser.put "lockoutTime",0

Tuesday, January 27, 2009

Date in yyyy-mm-dd format in SSIS

You might face few issues in SSIS package date format as few functions like convert wont work in this enviornment instead you have to use DT_STR,DT_WSTR, check this link for your date format requirements.

Sunday, January 11, 2009

Here's one more to crowdsourcing.....Fixya Raises $6 Million B Round for Crowdsourced Tech-Support

Companies hate providing good tech support for their products because it is expensive. And consumers hate calling up tech support when they can’t get a gadget to work properly because they usually get the run-around. The idea for Fixya is quite simple: Let consumers help fix each other’s gadgets.

Monday, January 5, 2009

MSDN SQL 2005 Setup Failure - Fixes

Fixes to couple of issues i faced while re-installing SQL 2005 on my dev box

If you get 'the system administrator has set policies to prevent this installation' issue then

1. Open regedit.exe
2. Find the registry path 'HKEY_CLASSES_ROOT\Installer\Products\'
3. Delete all the subkeys that are empty
4. Run msxml6.msi again

If you get 'higher version of MSXML6' issue then

1. Open regedit.exe
2. Find a folder similar to Hkey_local_machine\software\classes\installer\products\ check the keys inside it to confirm it is the MSXML6 parser key
3. Delete this key
4. Run msxml6.msi again