You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tog <gu...@gmail.com> on 2009/04/03 16:11:12 UTC

Issue with dynamic client (or wrong wsdl)

In GroovyWS, we are using the CXF dynamic client.

It throws the following exception when using the attached wsdl  - I think
the problem comes from a generated class which is not having the default
no-arg argument (java/lang/IllegalArgumentException).
If I use wsdl2java I get :

package java.lang;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "IllegalArgumentException")
public class IllegalArgumentException {
}

Is there something wrong with this wsdl ?


Apr 3, 2009 3:19:51 PM org.apache.cxf.endpoint.dynamic.DynamicClientFactory
outputDebug
INFO: Created classes: java.lang.IllegalArgumentException,
java.lang.ObjectFactory,
com.wps.rd.unity.remoting.service.GetAmountFromSharedMap,
com.wps.rd.unity.remoting.service.GetAmountFromSharedMapResponse,
com.wps.rd.unity.remoting.service.GetBooleanFromSharedMap,
com.wps.rd.unity.remoting.service.GetBooleanFromSharedMapResponse,
com.wps.rd.unity.remoting.service.GetCurrentStateName,
com.wps.rd.unity.remoting.service.GetCurrentStateNameResponse,
com.wps.rd.unity.remoting.service.GetLatestGeneratedBarcode,
com.wps.rd.unity.remoting.service.GetLatestGeneratedBarcodeResponse,
com.wps.rd.unity.remoting.service.ObjectFactory,
com.wps.rd.unity.coreshared.util.Amount,
com.wps.rd.unity.coreshared.util.ObjectFactory

Caught: java.lang.IllegalStateException: Unable to create JAXBContext for
generated packages: 1 counts of IllegalAnnotationExceptions
java.lang.IllegalStateException: Unable to create JAXBContext for generated
packages: 1 counts of IllegalAnnotationExceptions
        at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:352)
        at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
        at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
        at
groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:188)
        at groovyx.net.ws.WSClient.initialize(WSClient.java:104)
        at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at currency3.run(currency3.groovy:4)
        at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:256)
        at groovy.lang.GroovyShell.run(GroovyShell.java:218)
        at groovy.lang.GroovyShell.run(GroovyShell.java:147)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:493)
        at groovy.ui.GroovyMain.run(GroovyMain.java:308)
        at groovy.ui.GroovyMain.process(GroovyMain.java:294)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:111)
        at groovy.ui.GroovyMain.main(GroovyMain.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108)
        at
org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts
of IllegalAnnotationExceptions
java.lang.StackTraceElement does not have a no-arg default constructor.
        this problem is related to the following location:
                at java.lang.StackTraceElement
                at public java.lang.StackTraceElement[]
java.lang.Throwable.getStackTrace()
                at java.lang.Throwable
                at java.lang.Exception
                at
com.wps.rd.unity.remoting.service.IllegalArgumentException
                at public javax.xml.bind.JAXBElement
com.wps.rd.unity.remoting.service.ObjectFactory.createIllegalArgumentException(com.wps.rd.unity.remoting.service.IllegalArgumentException)
                at com.wps.rd.unity.remoting.service.ObjectFactory

        at
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:448)
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:297)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)



-- 

PGP KeyID: 1024D/47172155
FingerPrint: C739 8B3C 5ABF 127F CCFA  5835 F673 370B 4717 2155

http://cheztog.blogspot.com