I found the cause of this problem.  Not all my classes were good beans, I
had forgotten a few setters.

-Dave

-----Original Message-----
From: David Hoffer [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 6:30 PM
To: users@cxf.apache.org
Subject: Possible WSDL generation problem? 

I was able to get a simple web-service up and running using CXF.  

Since I have interfaces in my API I used "type adapters" as described in
this email thread.

Although the service is running when I generate a Java client using
cxf-codegen-plugin it generates classes (well given the names should be
interfaces) that are empty.  That is, the classes have no content or
methods, like:

/**
 * <p>Java class for IBestLoanSuite complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained
within this class.
 * 
 * <pre>
 * &lt;complexType name="IBestLoanSuite">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
 *       &lt;sequence>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "IBestLoanSuite")
public class IBestLoanSuite {
}

However there should be a bunch of methods in here that return objects.
Upon further looking at the WSDL, the methods are not there either.  So it
seems that the problem may be with the generated WSDL.

- I don't know for sure the WSDL is right given what I now see.
- Since I had to use "type adapters" to create the WSDL from java code, do I
need them again when generating java code?  If so, how?

Any help would be greatly appreciated.

-Dave


-----Original Message-----
From: Ian Roberts [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 19, 2008 7:01 AM
To: users@cxf.apache.org
Subject: Re: CXF newbie questions

David Hoffer wrote:
> One more thing; when I run, JAXB complains that my API contains interfaces
> (input and output parameters)...says it can't handle interfaces.  I
changed
> them and it was okay but is there a way to allow interfaces?

Kind of, you need to use a "type adapter" to map the interface into a
concrete class that JAXB can work with.  The java_first_jaxws sample in
the latest CXF has an example of how this works.

Ian

-- 
Ian Roberts               | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK



Reply via email to