Eclipse - Axis2 - Java Webservices Error

Discussion in 'Software' started by amanjsingh, Oct 9, 2007.

  1. amanjsingh

    amanjsingh

    Joined:
    Oct 9, 2007
    Messages:
    2
    Likes Received:
    0
    Hi, I have tried to implement a Java Web Service using Eclipse plugins and Apache products like Tomcat-Axis2. I am stuck at the last part where I am getting this error.

    I have all the Jar files in my lib folder under Projects directory. I have axis2.jar which contains the classes needed here. But I do not understand why am I getting this compile time error.

    Thanks for you help in advance.


    Code:
    Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	_serviceClient cannot be resolved
    	org.apache cannot be resolved to a type
    	_service cannot be resolved
    	_serviceClient cannot be resolved
    	_serviceClient cannot be resolved
    	org.apache cannot be resolved to a type
    	_serviceClient cannot be resolved
    	_serviceClient cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	The constructor TemperatureConverterStub(null, String) is undefined
    	org.apache cannot be resolved to a type
    	_serviceClient cannot be resolved
    	_operations cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	_serviceClient cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    	org.apache cannot be resolved to a type
    
    	at ws.example.TemperatureConverterStub.<init>(TemperatureConverterStub.java:17)
    	at ws.example.TemperatureConverterServiceClient.main(TemperatureConverterServiceClient.java:8)
    
    The TemperatureConverterServiceClient.java is -

    Code:
    package ws.example;
    
    public class TemperatureConverterServiceClient {
        public static void main(String[] args) {
            TemperatureConverterStub stub;
            try {
                double c_value = 32;
                stub = new TemperatureConverterStub
               ("http://localhost:8080/axis2/services/TemperatureConverter");
                TemperatureConverterStub.C2FConvertion c2f = new TemperatureConverterStub.C2FConvertion();
                c2f.setParam0(c_value); 
                TemperatureConverterStub.C2FConvertionResponse res = stub.c2FConvertion(c2f);  
                System.out.println("C Value : "+c_value+ "\tResult : " +res.get_return());
                TemperatureConverterStub.F2CConvertion f2c = new TemperatureConverterStub.F2CConvertion(); 
                f2c.setParam0(res.get_return());
    
                TemperatureConverterStub.F2CConvertionResponse res1 = stub.f2CConvertion(f2c);
                System.out.println("F Value : "+res.get_return()+ "\tResult : " +res1.get_return());
           } catch (Exception e) {
               e.printStackTrace();
           }
        }
    }
    and TemperatureConverterStub.java is (it is quite huge as it is generated by the eclipse plugin from WSDL file) -
     
    Last edited: Oct 9, 2007
    amanjsingh, Oct 9, 2007
    #1
    1. Advertisements

  2. amanjsingh

    amanjsingh

    Joined:
    Oct 9, 2007
    Messages:
    2
    Likes Received:
    0
    Attached is all the source code

    I ahve attached the source code. There are four Java files in it. I hope someone can help me with this.
    Thanks.
     

    Attached Files:

    amanjsingh, Oct 9, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.