I am having a bit of an issue generating the WSDL from my Java code. The apt
task runs fine and the source and classes are generated.

I have looked at the samples in the jaxb-ri but they are using primitives or
strings. The JAXB-RI java2wsdl gives similar errors as the cxf javatowsdl.

I have the following :

Webservice object :

@WebService
public class SystemService implements ISystemBO {
   
    private ISystemBO biz;
   
    @WebMethod
    public AddAccountJournalResponse addAccountJournal(
            @WebParam(name="request") AddAccountJournalRequest request) {
        return biz.addAccountJournal(request);
    }
}

Biz object :

public AddAccountJournalResponse addAccountJournal(AddAccountJournalRequest
request) {
        AccountJournal entry =
            adminDao.addAccountJournal(request.getSourceId(),
request.getDestinatationId(),
            request.getSourceAmount(), request.getSourceCurrency(),
            request.getDestinationCurrency(), request.getType(),
            request.getDescription(), request.getDate(),
request.getUserId());
       
        if(entry == null) {
            return new AddAccountJournalResponse(Boolean.FALSE);
        } else {
            return new AddAccountJournalResponse(Boolean.TRUE, entry);
        }
    }

Request Object :

@XmlRootElement(name="modelAddAccountJournalRequest")
public class AddAccountJournalRequest {
    //member fields, getter/setters
}

Response object :
@XmlRootElement(name="modelAddAccountJournalResponse")
public class AddAccountJournalResponse {
    //member fields, getter/setters
}

The output from my build is :

     [java]     this problem is related to the following location:
     [java]             at
com.a.biz.model.response.AddAccountJournalResponse
     [java]             at private
com.a.biz.model.response.AddAccountJournalResponse
com.a.ws.jaxws.AddAccountJournalResponse._return
     [java]             at com.a.ws.jaxws.AddAccountJournalResponse
     [java]
     [java]     at
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
     [java]     at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
     [java]     at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
     [java]     at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
     [java]     at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:597)
     [java]     at
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
     [java]     at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
     [java]     at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
     [java]     at
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext(JAXBDataBinding.java:369)
     [java]     at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:180)
     [java]     ... 13 more

I have searched for more examples using more complicated objects that are
being passed in as requests, but have not found anything that has been all
that helpful. Much appreciated for any assistance :-) 
-- 
View this message in context: 
http://www.nabble.com/JavaToWSDL-failure-tp14947397p14947397.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to