Q: Can't consume webservice from Java I created the webservice stubs using axis2-1.5's wsdl2java.bat. This created a src folder with the following structure in it:
src/net/mycompany/www/services/SessionIntegrationStub.java

The package of the SessionIntegration.java file is: package net.mycompany.www.services;
Now, I am trying to use this stub in my java code. I placed my java file in the same services folder. I set the same package. Here is my entire class:
package net.mycompany.www.services;
import net.mycompany.www.services;

public class DynamicProxy 
{
  public static void main(String[] args) 
  {
    try 
    {
      SessionIntegrationStub stub = new SessionIntegrationStub();
      System.out.println(stub.getSessionIntegration("test"));
    }
    catch (Exception e) 
    {
      System.out.println(e);
    } 
  } 
}

Then I tried to compile this code with the following cmd:
javac DynamicProxy.java

However I keep getting this error message:
C:\data\net\mycompany\www\services>javac DynamicProxy.java
DynamicProxy.java:9: cannot find symbol
symbol  : class SessionIntegrationStub
location: package net.mycompany.www.services
import net.mycompany.www.services.SessionIntegrationStub;
                                       ^
DynamicProxy.java:17: cannot find symbol
symbol  : class SessionIntegrationStub
location: class net.mycompany.www.services.DynamicProxy
                        SessionIntegrationStub stub = new SessionIntegrationStub();
                        ^
DynamicProxy.java:17: cannot find symbol
symbol  : class SessionIntegrationStub
location: class net.mycompany.www.services.DynamicProxy
                        SessionIntegrationStub stub = new SessionIntegrationStub();
                                                          ^
3 errors

Any idea what I am missing here?
Update 1:
I compiled the stubs (thanks to the answers below) and I got rid of the first error. I changed the import to this import net.americanapparel.www.services.*; however I still get an error for the SessionIntegrationStub: cannot find symbol. I also tried this import: net.americanapparel.www.services.SessionIntegrationStub, but that did not help either. Is there anything else I am missing?

A: You have to compile your stub first or both together, since wsdl2java only creates a .java file, not the .class file. The compiler error clearly  says it don't know the SessionIntegrationStub.
The other answer is right too: you have to 
import net.mycompany.www.services.*;

not
import net.mycompany.www.services;


A: You don't seem to import it.
import net.mycompany.www.services.SessionIntegrationStub;

should do the trick.
and then:
shell$ javac my/package/*.java

which should enable javac to find or compile all the files it needs.
