mikeobrien.net Curriculum Vitae Blog Labs
Tuesday, April 21, 2009

The following steps outline installing NetBeans 6.5.1 on Ubuntu 8.10:

1) Download and install the GNU Standard C++ library v3.

2) Download and install the Java EE 5 SDK Update 7. Run ./java_ee_sdk-5_07-linux.bin in a terminal window. If you are not running as admin run chmod 755 java_ee_sdk-5_07-linux.bin.

3) Download and install NetBeans 6.5.1. Run bash netbeans-6.5.1-ml-linux.sh.

Tuesday, April 21, 2009 6:42:05 PM (GMT Daylight Time, UTC+01:00)  #   |  Comments [0]  |  Trackback
Friday, April 17, 2009

I have been struggling all week trying to get a client created with the NetBeans 6.5.1 IDE to communicate with a WCF service using the wsHttpBinding. The symptoms were that it would connect and just hang when I made the soap call. I took a look at the message that was being sent across the wire and I noticed that JAX-WS was not sending the WS-Addressing headers. So after much searching and hitting the Metro message board and gave up and moved onto something else. While I was working on that something else I happened to look at the "port" factory method on the proxy that's generated by wsimport and noticed that you could pass multiple "WebServiceFeature"s, one of which was one for WS-Addressing! Passed that in and voila, it worked! Here is an example:

try { // Call Web Service Operation
    yada.SystemService service = new yada.SystemService();
    yada.Sys port = service.getYadaSystem(new AddressingFeature(true, true));
    // TODO process result here
    yada.VersionInfo result = port.getVersion();
    System.out.println("Result = "+result);
} catch (Exception ex) {
    System.out.println(ex.getMessage());
}

You can read more about this class here. I have no idea why wsimport doesent just bake this into the proxy as the policy in the WSDL clearly states that it uses WS-Addressing by way of the UsingAddressing element. Strange...

Friday, April 17, 2009 10:45:16 PM (GMT Daylight Time, UTC+01:00)  #   |  Comments [0]  |  Trackback
Creative Commons License