System.out.println("******************************************************");
HeaderFactoryImpl himpl = new HeaderFactoryImpl();
AddressFactory addfact = new AddressFactoryImpl();
try {
PServedUserHeader psuh = himpl.createPServedUserHeader(addfact.createAddress(addfact.createSipURI("aayush", "rancore.com")));
psuh.setSessionCase("orig");
psuh.setRegistrationState("reg");
System.out.println("The encoded header is---> "+psuh.toString());
System.out.println("The sescase is---> "+psuh.getSessionCase());
System.out.println("The Regs state is--->"+psuh.getRegistrationState());
} catch (ParseException e) {
e.printStackTrace();
}