-
1. Re: Password encode/decode in jboss
spyhunter99 Mar 6, 2012 9:41 AM (in response to its_me)Of course. your best bet is to roll your own encryption/decryption class using the built in jdk ciphers and then store the values in a properties file within your deployment.
A better solution:
download all of the wsdls and xsds needed for the remote service, edit the files to use only local references (not http references), and then place all of these files within the META-INF folder of the thing creating the web service proxy. Then you can pass a reference to the wsdl using something like this:
URL wsdl = Thread.currentThread().getContextClassLoader().getResource("META-INF/mywsdl.wsdl");
if (wsdl==null)
wsdl = Thread.currentThread().getContextClassLoader().getResource("/META-INF/mywsdl.wsdl");
//Note, this extra check is necessary in case your either in linux or you're using OpenJDK instead of Sun's JDK
MyService svc = new MyService(wsdl, qname);
MyPort port = svc.getMyPort();
BindingProvider bp = (BindingProvider)port;
Map<String, Object> context = bp.getRequestContext();
context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://someurl_to_the_service");
port.doSomething();
Personally, I think its absolutely stupid that jaxws requires the wsdl at runtime. It should be a build time only thing, as is the case with all microsoft soap stacks.
-
2. Re: Password encode/decode in jboss
its_me Mar 6, 2012 10:49 PM (in response to spyhunter99)Hello Spyhunter,
We do specify the end point address in the WSDL. But we have an issue where the service used by WSDL, internally requires a particular user name and password. So, we are back to square one where we need to encode/decode them.
It would be helpful if you can explain how to use the jdk ciphers with an example in our case.
Thanks and Regards,
Nid.................