|
All,
I almost have my web service deployed....I'm
following the tutorial at http://www.webservicescenter.com/frame_jws_linux.htm.
I'm on part I.
Anyway, let me say that I have a package named
groceryWebService1, and all the files I started with are in there. I made
the wsdl and also have the deploy.wsdd file. The two commands I ran to get
these are:
java org.apache.axis.wsdl.Java2WSDL -o gws1.wsdl -lhttp://mdf161.rh.psu.edu:8080/axis/services/gws1
-n urn:gws1 -p"groceryWebService1" urn:gws1
groceryWebService1.GroceryWebService
and
java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -p
groceryWebService1.ws gws1.wsdl
So, all that worked. Now, when I go into the
groceryWebService1/ws/ directory to alter the *SoapBindingImpl.java
file,
I simply make the necessary changes as
such:
package groceryWebService1.ws; import groceryWebService1.GroceryWebService;
public class Gws1SoapBindingImpl implements
groceryWebService1.ws.GroceryWebService{
GroceryWebService gws = new GroceryWebService();
public groceryWebService1.ws.ProductTree
getProductTree() throws java.rmi.RemoteException
{
return gws.getProductTree(); //return null; } public groceryWebService1.ws.Product
searchProductList(java.lang.String in0, java.lang.String in1) throws
java.rmi.RemoteException {
return gws.searchProductList(in0, in1); //return null; } public void refreshProducts() throws
java.rmi.RemoteException {
} public void populateTree() throws
java.rmi.RemoteException {
} }
Essentially, I instantiated a GroceryWebService (from the original package,
groceryWebService1 not groceryWebService1.ws. I then use this to make
returns instead of the return nulls, just as it says to do in the tutorial
listed above.
Finally, I go to compile everything in the ws dir, and jar it up.
When I try to javac *.java in the ws directory, I get the following
errors:
javac *.java
Gws1SoapBindingImpl.java:17: incompatible types found : groceryWebService1.ProductTree required: groceryWebService1.ws.ProductTree return gws.getProductTree(); ^ Gws1SoapBindingImpl.java:22: incompatible types found : groceryWebService1.Product required: groceryWebService1.ws.Product return gws.searchProductList(in0, in1); ^ 2 errors They are pretty straightforward errors, I know. It makes perfect
since that the function getProductTree is trying to return type
groceryWebService1.ws.ProductTree instead of
groceryWebService1.ProductTree. How do I return the ProductTree class
that's in the ws/ directory instead!?!? It's already in the package, so I
shouldn't have to import it. I tried doing funky cast statements, but they
didn't work. Any ideas? I greatly appreciate any and all help
:-\
Thanks,
M. Fecina ([EMAIL PROTECTED])
|
