1

I am facing a problem while using annotations in Websphere7 and RSA 7.5 for implementing a JAX-WS service. Please have a look at this link explaining the exact problem I have:

Exception java.util.zip.ZipFile.ensureOpenOrZipException with WAS 7

Since I cant change the application module from 2.5 to 2.4 since I need the webservices.xml file, hence I need to find some way to implement the SOAPHandler without using annotations.

Please let me know if this is possible.

Regards,

Community
  • 1
  • 1
user182944
  • 7,897
  • 33
  • 108
  • 174

1 Answers1

0

I found this page (It's for FileNet, but I think the example code could be made to work elsewhere) with this code snippet:

ProcessEngineServiceProxy pewsServiceProxy = new ProcessEngineServiceProxy();
pewsServiceProxy._getDescriptor().setEndpoint(url);

// install the handler chain
BindingProvider bp = (BindingProvider) pewsServiceProxy._getDescriptor().getProxy();
Binding pewsBinding = bp.getBinding();
List<Handler> handlerChain = new java.util.ArrayList<Handler>();
PEWSClientHeaderHandler wsSecurity = new PEWSClientHeaderHandler();
handlerChain.add(wsSecurity);
pewsBinding.setHandlerChain(handlerChain);

Also, there's this answer which is for Metro, but a similar trick may work for WebSphere as well: https://stackoverflow.com/a/7849613/192801 And this answer also shows how to register the handler programmatically: https://stackoverflow.com/a/1806477/192801

Community
  • 1
  • 1
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202