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
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.remoting.unity.rd.wps.com"; xmlns:ns2="http://util.coreshared.unity.rd.wps.com"; xmlns:ns1="http://lang.java"; xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"; xmlns:tns="http://service.remoting.unity.rd.wps.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
  <wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.remoting.unity.rd.wps.com";>
<xsd:element name="getLatestGeneratedBarcode">
<xsd:complexType/>
</xsd:element>
<xsd:element name="getLatestGeneratedBarcodeResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getBooleanFromSharedMap">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="in1" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getBooleanFromSharedMapResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IllegalArgumentException" type="ns1:IllegalArgumentException"/>
<xsd:element name="getAmountFromSharedMap">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getAmountFromSharedMapResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns2:Amount"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getCurrentStateName">
<xsd:complexType/>
</xsd:element>
<xsd:element name="getCurrentStateNameResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://lang.java";>
<xsd:complexType name="IllegalArgumentException"/>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.coreshared.unity.rd.wps.com";>
<xsd:complexType name="Amount">
<xsd:sequence>
<xsd:element minOccurs="0" name="currencyCode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="fractionDigits" type="xsd:int"/>
<xsd:element minOccurs="0" name="value" type="xsd:long"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
  </wsdl:types>
  <wsdl:message name="getAmountFromSharedMapRequest">
    <wsdl:part name="parameters" element="tns:getAmountFromSharedMap">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="IllegalArgumentException">
    <wsdl:part name="IllegalArgumentException" element="tns:IllegalArgumentException">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getAmountFromSharedMapResponse">
    <wsdl:part name="parameters" element="tns:getAmountFromSharedMapResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getBooleanFromSharedMapRequest">
    <wsdl:part name="parameters" element="tns:getBooleanFromSharedMap">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getLatestGeneratedBarcodeRequest">
    <wsdl:part name="parameters" element="tns:getLatestGeneratedBarcode">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getBooleanFromSharedMapResponse">
    <wsdl:part name="parameters" element="tns:getBooleanFromSharedMapResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getLatestGeneratedBarcodeResponse">
    <wsdl:part name="parameters" element="tns:getLatestGeneratedBarcodeResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getCurrentStateNameRequest">
    <wsdl:part name="parameters" element="tns:getCurrentStateName">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getCurrentStateNameResponse">
    <wsdl:part name="parameters" element="tns:getCurrentStateNameResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="WorkflowServicePortType">
    <wsdl:operation name="getLatestGeneratedBarcode">
      <wsdl:input name="getLatestGeneratedBarcodeRequest" message="tns:getLatestGeneratedBarcodeRequest">
    </wsdl:input>
      <wsdl:output name="getLatestGeneratedBarcodeResponse" message="tns:getLatestGeneratedBarcodeResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getBooleanFromSharedMap">
      <wsdl:input name="getBooleanFromSharedMapRequest" message="tns:getBooleanFromSharedMapRequest">
    </wsdl:input>
      <wsdl:output name="getBooleanFromSharedMapResponse" message="tns:getBooleanFromSharedMapResponse">
    </wsdl:output>
      <wsdl:fault name="IllegalArgumentException" message="tns:IllegalArgumentException">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getAmountFromSharedMap">
      <wsdl:input name="getAmountFromSharedMapRequest" message="tns:getAmountFromSharedMapRequest">
    </wsdl:input>
      <wsdl:output name="getAmountFromSharedMapResponse" message="tns:getAmountFromSharedMapResponse">
    </wsdl:output>
      <wsdl:fault name="IllegalArgumentException" message="tns:IllegalArgumentException">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getCurrentStateName">
      <wsdl:input name="getCurrentStateNameRequest" message="tns:getCurrentStateNameRequest">
    </wsdl:input>
      <wsdl:output name="getCurrentStateNameResponse" message="tns:getCurrentStateNameResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="WorkflowServiceHttpBinding" type="tns:WorkflowServicePortType">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getLatestGeneratedBarcode">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getLatestGeneratedBarcodeRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getLatestGeneratedBarcodeResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getBooleanFromSharedMap">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getBooleanFromSharedMapRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getBooleanFromSharedMapResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="IllegalArgumentException">
        <wsdlsoap:fault name="IllegalArgumentException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getAmountFromSharedMap">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getAmountFromSharedMapRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getAmountFromSharedMapResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      <wsdl:fault name="IllegalArgumentException">
        <wsdlsoap:fault name="IllegalArgumentException" use="literal"/>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getCurrentStateName">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getCurrentStateNameRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getCurrentStateNameResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="WorkflowService">
    <wsdl:port name="WorkflowServiceHttpPort" binding="tns:WorkflowServiceHttpBinding">
      <wsdlsoap:address location="http://localhost:2002/remoting/WorkflowService"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Reply via email to