If Axis allowed XSDTypeToJavaClass mappings or JavaInterfaceToJavaClass
mappings in addition to PackageToNamespace mappings, that would be
great. This way Axis could use the specified java class when it doesn't
know how to generate an xsd type for the target java interface (IState
in my case). 

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tim K. (Gmane)
Sent: Wednesday, April 06, 2005 2:56 PM
To: [email protected]
Subject: Re: Java2wsdl and interfaces


I don't think it's possible to do what you want, you need your method to

return a true JavaBean class, not an interface.

Think about it this way: what if IState were an argument to one of your 
methods (I know this is not your case)? When a client called your 
service how would Axis know what instance(s) of IState to create?

Tim

Oleg Lebedev wrote:
> Could anyone give me some feedback on the following?
> 
> -----Original Message-----
> From: Oleg Lebedev [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 05, 2005 3:51 PM
> To: [email protected]
> Subject: Java2wsdl and interfaces
> 
> 
> Greetings.
> 
> I am trying to expose my Java interface as a web service. The 
> interface itself defines a method, which returns IState interfaces. 
> So, when I use axis-java2wsdl ant task I get the following warning: 
> "The class IState does not contain a default constructor, which is a 
> requirement for a bean class.  The class cannot be converted into an 
> xml schema type.  An xml schema anyType will be used to define this 
> class in the wsdl file." This causes axis-java2wsdl to avoid 
> generating xsd type mappings for the IState interface. So, when later 
> I use axis-wsdl2java, I get the following error: "IState is referenced

> but not defined."
> 
> I remember other people having the same problem, but I can't find a 
> solution on the mailing list.
> 
> So, the question is how I tell axis-java2wsdl that a concrete 
> implementation class State should be used when generating type 
> mappings for interface IState?
> 
> Regards.
> 
> Oleg
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
If you have questions about this email, please
contact the IT Help Desk.

Mail

Reply via email to