I already tried an older version, and I got the same exception!
I supose that the problem is in my code :(

What can be the problem?

This is my code:

////////////////////////////////////////////////////////////////////////////////////////////////////////
public class Webservices {

    static Logger logger = Logger.getLogger(Webservices.class);
    private int key = 333;
   
    public int Authentication(String username, String password){
       
        // Make a service
        AcessoPortalLocator service = new WS_AcessoPortalLocator();
       
        try {
            // Stub
            AcessoPortalSoapStub stub = (AcessoPortalSoapStub) service.getPort(AcessoPortalSoap.class);
           
            // Authentication object
            Authentication a
uthentication = new Authentication();
           
            // Define the fields for the verificaAutenticacao object
           
authentication.setUser(username);
           
authentication.setPass(password);
           
authentication.setKey(key);
           
            // make the webservice call
            AuthenticationResponse resp = (AuthenticationResponse) stub.Authentication(
authentication);
           
            //return response
            return resp.getAuthenticationResult();
           
        } catch (Exception e) {
            System.err.println(e.getMessage());
        }
}
////////////////////////////////////////////////////////////////////////////////////////////////////////


Thanks...

---
Bruno Vg
--- Begin Message ---
I have an ClassCastException when I call a function on my stubs, for example:
HelloWorldResponse resp = (HelloWorldResponse) stub.helloWorld(helloWorld);


When debuging i find that the problem is in this section:

file: WSDDTargetedChain.java
    pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance();  <=== ClassCastException

I'm using
Axis 1.2 RC3.
This is any bug?
humm.. maybe I will try a older version!

---
Bruno Vg

--- End Message ---

Reply via email to