They implemented it as an https: service with an unsigned certificate, so I have already had to go through some hoops to just get the non-authenticated methods working.

I shut off certificate checking with the line:
System.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");

Now according to the docs I have to pass "username" and "password" in the soap header for the other methods. The docs say that "This information should be passed to the URL".

So I am not 100% certian I need to use wss4j, but as the methods call.setUsername() and call.setPassword() aren't working, I don't know what else to do.

Jos� M. Selman wrote:

Yes, I guess so... It might be that the target service is expecting a UsernameToken inside a security header (this is where wss4j comes to play)... However it might be expecting just basic HTTP-based authentication in which case you could just use Axis by itself... Can't you get more information on what the target service is expecting?

Jos� M. Selman



Sean Shubin wrote:

Ok, thanks. I was trying to make a SOAP call to an https service like so,

private Object invoke(String operationName, Object... params) throws ServiceException, MalformedURLException, RemoteException {
       String endpoint = WEB_SERVICE_URL;
       Service service = new Service();
       Call call = (Call) service.createCall();
       call.setUsername(USERNAME);
       call.setPassword(PASSWORD);
       call.setTargetEndpointAddress(new URL(endpoint));
       call.setOperationName(operationName);
       Object ret = call.invoke(params);
       return ret;
   }

But I would still get the error "This service method requires user authentication. Username/password is required.". Do you know if wss4j has the solution? Or am I looking in the wrong place?


Jos� M. Selman wrote:

As far as I know there are no binaries available for download since there hasn't been an official release. You need to check out the source from CVS and build ir using either Ant or Maven.

Cheers,

Jos� M. Selman



Sean Shubin wrote:

I could not find a link anywhere on the home site:

http://ws.apache.org/ws-fx/wss4j/

Sean Shubin




No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 5/25/2005

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 5/25/2005

Reply via email to