Friday, June 28, 2013

Adding New Xml Encoding Alias to Xerces

Recently I developed an xmlrpc application that failed on testing from an existing client (the stupid one). That client set its request encoding in xml header as "UTF8" (the standard IANA is "UTF-8"). It result in rejecting the request immediately in xmlroc server (I deployed in Jboss EAP 6.1) by following exception.

Invalid encoding name "UTF8"

So after searching I found the EncodingMap class of xerces that allow add new alias for encoding names. So first add xercesImpl dependency in maven file, an then statically add the desired encoding name as follow:

EncodingMap.putIANA2JavaMapping( "UTF8", "UTF8" );

EncodingMap.putJava2IANAMapping( "UTF8", "UTF8" );


Saturday, June 8, 2013

Create Solaris 10 IPMP

Requirement:
2 connected interface
3 IP addresses (1 for active, 2 for interface tests)

It is probe based IPMP (testing destination IP)

Update /etc/hosts
10.132.174.144    hostaddress

10.132.174.146    host-testaddr0
10.132.174.146    host-testaddr1

ifconfig intf0 host-testaddr0 deprecated -failover netmask + broadcast + group host_g0 up
ifconfig intf0 addif hostaddress netmask + broadcast + up

ifconfig intf1 host-testaddr1 deprecated -failover netmask + broadcast + group host_g0 up

Make it permanent by /etc/hostname.intfx