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();

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) .

Wenn man den Browser dazu zwingen möchte ein Java Applet neu zu laden hilft es nichts den Browser Cache zu löschen, die JVM hat einen eigenen Cache. Wo der Cache liegt wird über die Systemsteuerung festgelegt. Dort gibt es Einstellungen zu Java. Der Pfad zum JAR-Cache kann meistens angegeben werden. Der Cache ist aber nicht immer im selben Pfad, der ist abhängig von der Version und dem Hersteller der JVM.

Unter Windows: (englisches Betriebssystem)

C:\Documents and Settings\[username]\Local Settings\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\jar

oder unter deutschem Windows XP

C:\Dokumente und Einstellungen\[username]\Anwendungsdaten\Sun\Java\Deployment\cache\javapi\v1.0\jar

Wenn man dann den dortigen Inhalt löscht, werden Java Applets nachgeladen.

jarcache.JPG