com.ibm.websphere.webservices.Constants.REQUEST_TRANSPORT_PROPERTIES contains this string: com.ibm.websphere.webservices.requestTransportProperties

This constant is available since Webpshere App Server 6.0.  It’s quite easy to add a HTTP transport header to a JAX-RPC-Client-Stub, look to this:

String endpoint = “http://localhost:8080/YOURAPP/services/YourService”;

java.net.URL endpoint = new URL(endpoint );

YourServiceLocator locator = new YourServiceLocator ();
YourService stub= locator.getYourService(endpointUrl);

java.util.HashMap sendTransportHeaders = new java.util.HashMap();
sendTransportHeaders.put(”Cookie”,”YourCookieName=YourCookieValue”);
// this is needed for basic authentication header:

((javax.xml.rpc.Stub) stub)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, “user”);
((javax.xml.rpc.Stub) stub)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, “password”);
((javax.xml.rpc.Stub) stub)._setProperty(Constants.REQUEST_TRANSPORT_PROPERTIES, sendTransportHeaders);

//now call your service

stub.anyMethod();

http://www.trackntrace.de bietet die Sendungsverfolgung von DHL Paketen an. Die Info sind unter anderem über einen Permalink oder als RSS Feed verfügbar. Eingebettet in meine iGoogle Seite sieht der RSS Feed dann so aus:

igoogle-paket.jpg

Eine gute Idee ist es die Standardeinstellung für den Feed so abzuändern, dass nicht nur die letzten drei Einträge aus dem Feed angezeigt werden.  Über die URL http://www.trackntrace.de/rest/paketnummer/plz steht auch ein REST Service zur Verfügung. Die angefragten Informationen werden gemäß dieser DTD zurückgeliefert.

Eine nette Sache somit kann ich einfach nebenbei den Verlauf eines Pakets im Auge haben, ohne dafür das entsprechende Formular auf der DHL Seite ausfüllen zu müssen.

I currently work with HATS ( Host Access Transformation Services ) . I created some webservices to access HOST applications with it.
HATS admin console is deployed under /[YOUR_HATS_APPLICATION]/hatsadmin/admin.

A WebService Client Call (IBM Implementation) fails with the following error: Invalid trust file name of null

Cause: The SSL context can’t be created because no java keystore is set. There is one possible solution: Place the following code into your client, before the client code ist called. This approach is independend from the IBM webservice client implementation of cause, any time you want to set the keystore programmatically use this code. Maybe if you have a WebService client created by the AXIS framework.

System.setProperty(”javax.net.ssl.trustStore”, “%JAVA_HOME%/jre/lib/security/cacerts”);
System.setProperty(”javax.net.ssl.trustStorePassword”, “changeit”);
System.setProperty(”javax.net.ssl.keyStore”, “%JAVA_HOME%/jre/lib/security/cacerts”);
System.setProperty(”javax.net.ssl.keyStorePassword”, “changeit”);

Be aware of the Java Runtime Environment you use, in a IBM Websphere environment standard keystore password is “WebAS” I think. “changeit” is the standard password for Java Runtime Environment.

If your WebService endpoint starts with https, you may need to import a certificate into your keystore. This is the case for test environments where self signed certificates are used quite often. To do this use java keytool or ikeyman (WebSphere Application Server based products) .