Hello All,
   
  I am beginning to pick up on xfire. I created my first web service in 
¡°Application A(Service providing application¡±)  with java class User.java and 
implentation class UserImpl.java and was able to test it following Tomek's 
input with success, so far good. I feel like I am almost there.  All my web 
service does is return a simple string that it gets.
   
  Now to the part of consuming the service.  I have to pass this string from 
different ¡°Application B (Service consuming application)¡± . I generated code 
using xFire plugin in Application B that generated following classes.
   
  1. User.java
  2. UserImpl.java
  3. UserClient.java
  4. UserPortType.java
  5. UserResponse.java
  6. ObjectFactory.java
  7. package-info.java
   
  Here is the problem, ok I downloaded all the above files to folder called 
"com.soa" in application B and to default package.  All I need to do now is 
just pass a string to Application A and get it back. I want try something like 
'User.getMeString ("Srini");
   
  He is the first probelm, as soon as downloaded above file thru plugin , it 
downloaded with same package declarations as in Applcation A. But my client 
application B doesn't show any errors.  I tried to use above classes in my 
action classes I get errors as my Application B doesn¡¯t recognize any of the 
above classes. My idea was to do something like following in my action class to 
import package where I have above classes. When I downloaded to com.soa, it 
created com.soa.com.cma.soa (the bold part is from Application A, do not why 
that happens)
   
  My plan is to do to import above package into my struts action class so I can 
do something like import com.soa.com.cma.soa.*; to get access to above classes. 
But I get error saying the package doesn¡¯t exist.
   
  So my questions are.  How do I use generated classes in my consumer 
application (Application B) to consume and how can I access those classes.  If 
anyone  has sample code to pass a string to a service (of different 
application)  and get it back and how to make generated classes available to 
consuming application I will appreciate it very much.
   
  As of now it seems like it is very easy to generate java classes from wsdl if 
you give url location but it seems like your consuming application doesn't 
recognize any of those as generated classes still have package declaration from 
service provider where as consuming app can't recognize those packages. 
   
  Sorry for long text, I am new to xFire and web services. Hope it all make 
sense.
   
  Regards,
  Srini
   

       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.

Reply via email to