You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by david duncan <ul...@yahoo.com> on 2006/02/25 03:20:39 UTC

multiple class objects for single web service

  A Web service only maps to 1 Java object / class?
   
  For example I have 2 Classes (each class has 1 java method)
   
  1) HelloWorld Object / class --> get a service request "name" and return "Hello" + name back to service caller
   
  2) EchoServer Object / class --> get a service request "Some string" and return "Same string" back to caller
   
  Can I put this 2 class (each class has 1 method) into 1 Web Service URL + 1 WSDL ?
   
  -OR- I have to have 2 seperate web services ? one for HelloWorld another one for EchoServer?
   
  thanks

		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 

Re: multiple class objects for single web service

Posted by Dies Koper <di...@jp.fujitsu.com>.
You can have several URLs for one service but only one web service 
interface at a particular URL.
You can define multiple web services (with all their URLs) in one WSDL.

Whether you want to use different URLs, WSDL files and web services for 
your HelloWorld and EchoServer interfaces or not, is a design decision.

Regards,
Dies


david duncan wrote:
>   A Web service only maps to 1 Java object / class?
>    
>   For example I have 2 Classes (each class has 1 java method)
>    
>   1) HelloWorld Object / class --> get a service request "name" and return "Hello" + name back to service caller
>    
>   2) EchoServer Object / class --> get a service request "Some string" and return "Same string" back to caller
>    
>   Can I put this 2 class (each class has 1 method) into 1 Web Service URL + 1 WSDL ?
>    
>   -OR- I have to have 2 seperate web services ? one for HelloWorld another one for EchoServer?
>    
>   thanks