can a webservice make a call to a regular local java class?

Hi, I do have two java classes. Class1 and Class2.  Class1 calls class2. I want to convert Class1 to a webservice so I have installed Apache Axis and renamed the Class1.java to Class1.jws but getting erros can't fnd Class2 although I put the compiled class2 in the same axis dir as Class1.jws

My question is possible to do what I am trying to do? Having Class1 as a webservice while it uses Class2?
tbarrawiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Put the class you want to load in the WEB-INF/classes dir

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tbarrawiAuthor Commented:
Great. Thanks CEHJ
CEHJCommented:
:-)
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

tbarrawiAuthor Commented:
CEHJ,  what if the classes I have were in a package.  putting them under WEB-INF/classes/packagename didnt work
CEHJCommented:
It should do.

1. In your source code:

package x;

what is 'x'?

2. What is the full path under WEB-INF/classes where it resides?
tbarrawiAuthor Commented:
package myservice;

and the full path is WEB-INF/classes/myservice/

the webservices itself doesn't include any package name correct.

let me try again maybe i misstyped something...
CEHJCommented:
>>the webservices itself doesn't include any package name correct.

Not sure what you mean by that. Any class using it that's not in the same package will have to import it as normal or refer to it by the  FQ class name
tbarrawiAuthor Commented:
the class1.jws file under the axis main direct will not have the  package myservice; only the other classes under the EB-INF/classes/myservice/ should. correct?
CEHJCommented:
>>will not have the  package myservice

I'm not sure what you mean by that. Classes are loaded via the classpath and the pacakges relate to directory structures in relation to that classpath (or paths in the classpath)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.