Sample Java Code

The following simple Java example makes a processtrxn call and prints the status code and status message.

import java.lang.*;
import java.net.*;
import java.io.*;
	class wiretest
	{
		public static void main(String[] args)
			throws Exception
		{
			URL wire_url = new 
	URL("http://test.foo.com/Apps/DES/wire?lpurl=http%3a%2f%2f
test.foo.com%2fApps%2fDES%2fmcp%3fq=ST100tTEjyc_t8&externid=test2&returntype=3
&Email=x@a.com&useDefaultValue=1");
			URLConnection yc = wire_url.openConnection();
			System.out.println("WireStatusCode: " +
			yc.getHeaderField("WireStatusCode"));
			System.out.println("WireStatusMsg: " +
			yc.getHeaderField("WireStatusMsg"));
		}
}