You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Julio Arias <ju...@rbxglobal.com> on 2007/07/20 02:54:15 UTC
Returning a java map
Hi -
I have the following web method, we are using JAXB binding but the
WSDL generator doesn't create a complex type for the returning(or
param) map thus wsdl2java blows up with the following exception(see
below). Xfire use to create a complex type in the WSDL for this. Do I
need a special annotation?
@WebMethod
Map<Long, MetadataVO> getMap(Map<Long, String> param);
------------------------------------------------------------------------
-------------
WSDLToJava Error : java.lang.NullPointerException
org.apache.cxf.tools.common.ToolException:
java.lang.NullPointerException
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:223)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
(ToolRunner.java:84)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run
(WSDLToJava.java:102)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main
(WSDLToJava.java:171)
Caused by: java.lang.NullPointerException
at
org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
(XmlSchemaCollection.java:372)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
(WSDLServiceBuilder.java:775)
at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
(WSDLServiceBuilder.java:578)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
(WSDLServiceBuilder.java:561)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
(WSDLServiceBuilder.java:251)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
(WSDLServiceBuilder.java:154)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
(WSDLServiceBuilder.java:143)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:142)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:215)
... 3 more
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------
Re: Returning a java map
Posted by Jim Ma <em...@iona.com>.
Hi ,
I used eclipse stp to validate this wsdl and found two errors :
in this line <element minOccurs="0" name="id" nillable="true"
type="ns0:UUID"/>, the namespace prefix ns0 is not defined .
in this line <element minOccurs="0" name="context" nillable="true"
type="ns1:Context"/> , context element can not be found in ns1 namespace ,
it's defined in namespace "http://metadata.core.lor.rbx.com" .
Cheers
Jim
Julio Arias wrote:
> Hi Jim -
>
> I partially fix this, I change the data binding to Aegis (now the map
> has a type in the WSDL) but now I get a different problem with wsdl2java
> The WSDL looks very similar at the one generated by xFire I think
> there is a problem with the WSDL namespaces but I'm not sure what.
> This is the WSDL:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions name="MetadataService"
> targetNamespace="http://lor.rbx.com/ws/metadata"
> xmlns:ns1="http://lor.rbx.com/ws/metadata"
> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:types>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://metadata.core.lor.rbx.com"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <simpleType name="DocumentLanguage">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="English"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDegreeInteractivity">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentFormat">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="HTML_XHTML"/>
> <enumeration value="SHOWCKWAVE_FLASH"/>
> <enumeration value="FLASH_VIDEO"/>
> <enumeration value="JPEG"/>
> <enumeration value="GIF"/>
> <enumeration value="MPEG"/>
> <enumeration value="PDF"/>
> <enumeration value="MSWORD"/>
> <enumeration value="MSEXCEL"/>
> <enumeration value="MSPOWERPOINT"/>
>
> <enumeration value="XML"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDifficulty">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentLearningResourceType">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Excercise"/>
>
> <enumeration value="Simulation"/>
> <enumeration value="Questionnaire"/>
> <enumeration value="Diagram"/>
> <enumeration value="Figure"/>
> <enumeration value="Graph"/>
> <enumeration value="Index"/>
> <enumeration value="Slide"/>
> <enumeration value="Table"/>
> <enumeration value="NarrativeText"/>
> <enumeration value="Exam"/>
> <enumeration value="Experiment"/>
> <enumeration value="ProblemStatement"/>
> <enumeration value="SelfAssesment"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentIntendedEndUser">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Teacher"/>
> <enumeration value="Author"/>
> <enumeration value="Learner"/>
> <enumeration value="Manager"/>
> </restriction>
> </simpleType>
> <simpleType name="Context">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="PrimaryEducation"/>
> <enumeration value="SecondaryEducation"/>
> <enumeration value="HigherEducation"/>
> <enumeration value="UniversityFirstCycle"/>
> <enumeration value="UniversitySecondCycle"/>
> <enumeration value="UniversityPostgrade"/>
> <enumeration value="TechnicalSchoolFirstCycle"/>
>
> <enumeration value="TechnicalSchoolSecondCycle"/>
> <enumeration value="ProfessionalFormation"/>
> <enumeration value="ContinuousFormation"/>
> <enumeration value="VocationalTraining"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentStatus">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Draft"/>
> <enumeration value="Final"/>
> <enumeration value="Revised"/>
> <enumeration value="Unavailable"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentInteractivityType">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Active"/>
> <enumeration value="Expositive"/>
> <enumeration value="Mixed"/>
> <enumeration value="Undefined"/>
> </restriction>
> </simpleType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://lor.rbx.com/ws/metadata"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="anyType2anyTypeMap">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> <complexType>
> <sequence>
> <element minOccurs="0" name="key" type="anyType"/>
> <element minOccurs="0" name="value" type="anyType"/>
>
> </sequence>
> </complexType>
> </element>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="urn:com:rbx:lor:ws:model"
> xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://util.java"
> xmlns:ns1="http://metadata.core.lor.rbx.com">
> <complexType name="User">
> <sequence>
> <element minOccurs="0" name="firstName" nillable="true" type="string"/>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="lastName" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Metadata">
>
> <sequence>
> <element minOccurs="0" name="ageFrom" type="int"/>
> <element minOccurs="0" name="ageTo" type="int"/>
> <element minOccurs="0" name="context" nillable="true"
> type="ns1:Context"/>
> <element minOccurs="0" name="coverage" nillable="true"
> type="ns3:Coverage"/>
> <element minOccurs="0" name="creator" nillable="true" type="ns3:User"/>
> <element minOccurs="0" name="degreeInteractivity" nillable="true"
> type="ns1:DocumentDegreeInteractivity"/>
> <element minOccurs="0" name="description" nillable="true" type="string"/>
> <element minOccurs="0" name="difficulty" nillable="true"
> type="ns1:DocumentDifficulty"/>
> <element minOccurs="0" name="format" nillable="true"
> type="ns1:DocumentFormat"/>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="intendedUser" nillable="true"
> type="ns1:DocumentIntendedEndUser"/>
> <element minOccurs="0" name="interactivityType" nillable="true"
> type="ns1:DocumentInteractivityType"/>
> <element minOccurs="0" name="keywords" nillable="true"
> type="ns3:ArrayOfKeyword"/>
> <element minOccurs="0" name="language" nillable="true"
> type="ns1:DocumentLanguage"/>
> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
>
> <element minOccurs="0" name="rating" type="int"/>
> <element minOccurs="0" name="resourceType" nillable="true"
> type="ns1:DocumentLearningResourceType"/>
> <element minOccurs="0" name="size" type="int"/>
> <element minOccurs="0" name="status" nillable="true"
> type="ns1:DocumentStatus"/>
> <element minOccurs="0" name="subject" nillable="true"
> type="ns3:Subject"/>
> <element minOccurs="0" name="title" nillable="true" type="string"/>
> <element minOccurs="0" name="version" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Coverage">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
>
> <complexType name="ArrayOfKeyword">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
> nillable="true" type="ns3:Keyword"/>
> </sequence>
> </complexType>
> <complexType name="Subject">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://util.java"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="UUID">
> <sequence>
>
> <element minOccurs="0" name="leastSignificantBits" type="long"/>
> <element minOccurs="0" name="mostSignificantBits" type="long"/>
> </sequence>
> </complexType>
> </schema>
>
> </wsdl:types>
> <wsdl:message name="updateMetadata">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getMap">
>
> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadata">
> <wsdl:part name="documentID" type="ns3:UUID">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="updateMetadataResponse">
> </wsdl:message>
>
> <wsdl:message name="getMapResponse">
> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadataResponse">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="MetadataService">
>
> <wsdl:operation name="updateMetadata">
> <wsdl:input message="ns1:updateMetadata" name="updateMetadata">
> </wsdl:input>
> <wsdl:output message="ns1:updateMetadataResponse"
> name="updateMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <wsdl:input message="ns1:getDocumentMetadata"
> name="getDocumentMetadata">
> </wsdl:input>
>
> <wsdl:output message="ns1:getDocumentMetadataResponse"
> name="getDocumentMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <wsdl:input message="ns1:getMap" name="getMap">
> </wsdl:input>
> <wsdl:output message="ns1:getMapResponse" name="getMapResponse">
> </wsdl:output>
> </wsdl:operation>
>
> </wsdl:portType>
> <wsdl:binding name="MetadataServiceSoapBinding"
> type="ns1:MetadataService">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="updateMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="updateMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="updateMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getDocumentMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getDocumentMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getMap">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getMapResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="MetadataService">
> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
> name="MetadataServiceImplPort">
> <soap:address
> location="http://localhost:8080/lor/services/MetadataService"/>
> </wsdl:port>
> </wsdl:service>
>
> </wsdl:definitions>
>
> And this is the error:
>
> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
> 'ns3:Coverage'
>
> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
> simple or complex type 'ns3:Coverage'
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:34)
>
> at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:245)
>
> at
> com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:61)
>
> at
> com.sun.xml.xsom.impl.parser.ParserContext$2.error(ParserContext.java:188)
>
> at
> com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:166)
>
> at
> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:103)
>
> at
> com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java:91)
> at
> com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:66)
> at
> com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:126)
>
> at
> com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:172)
> at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:488)
> at
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:197)
>
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:123)
>
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate(JAXBDataBinding.java:163)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:483)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:168)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:215)
>
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:84)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
> type 'ns3:Coverage'
> at
> com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:162)
>
> ... 15 more
>
>
> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
>
>> Hi ,
>> The generated wsdl seems invalid**. Can you also paste the wsdl you
>> generated?
>> Cheers
>>
>> Jim
>>
>> Julio Arias wrote:
>>> Hi -
>>>
>>> I have the following web method, we are using JAXB binding but the
>>> WSDL generator doesn't create a complex type for the returning(or
>>> param) map thus wsdl2java blows up with the following exception(see
>>> below). Xfire use to create a complex type in the WSDL for this. Do
>>> I need a special annotation?
>>>
>>> @WebMethod
>>> Map<Long, MetadataVO> getMap(Map<Long, String> param);
>>>
>>> -------------------------------------------------------------------------------------
>>>
>>>
>>> WSDLToJava Error : java.lang.NullPointerException
>>>
>>> org.apache.cxf.tools.common.ToolException:
>>> java.lang.NullPointerException
>>> at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:223)
>>>
>>> at
>>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:84)
>>>
>>> at
>>> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
>>> at
>>> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName(XmlSchemaCollection.java:372)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage(WSDLServiceBuilder.java:775)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLServiceBuilder.java:578)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuilder.java:561)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:251)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:154)
>>>
>>> at
>>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:143)
>>>
>>> at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
>>>
>>> at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:215)
>>>
>>> ... 3 more
>>>
>>>
>>>
>>>
>>>
>>>
>>> Julio Arias
>>> Java Developer
>>> Roundbox Global : enterprise : technology : genius
>>> ---------------------------------------------------------------------
>>> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>>> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>>> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>>> ---------------------------------------------------------------------
>>>
>>>
>
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>
Re: Returning a java map
Posted by Daniel Kulp <dk...@apache.org>.
Julio,
Dan D. thinks he fixed the namespace issue in the Aegis binding
yesterday. Is there any way you could grab the latest snapshot that I
deployed last night from:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apache-cxf/2.0.1-incubator-SNAPSHOT/
and give that a try?
Thanks!
Dan
On Thursday 19 July 2007 23:07, Julio Arias wrote:
> Hi Jim -
>
> I partially fix this, I change the data binding to Aegis (now the map
> has a type in the WSDL) but now I get a different problem with
> wsdl2java The WSDL looks very similar at the one generated by xFire I
> think there is a problem with the WSDL namespaces but I'm not sure
> what. This is the WSDL:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions name="MetadataService" targetNamespace="http://
> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
> schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://
> metadata.core.lor.rbx.com" xmlns="http://www.w3.org/2001/XMLSchema">
> <simpleType name="DocumentLanguage">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="English"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDegreeInteractivity">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentFormat">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="HTML_XHTML"/>
> <enumeration value="SHOWCKWAVE_FLASH"/>
> <enumeration value="FLASH_VIDEO"/>
> <enumeration value="JPEG"/>
> <enumeration value="GIF"/>
> <enumeration value="MPEG"/>
> <enumeration value="PDF"/>
> <enumeration value="MSWORD"/>
> <enumeration value="MSEXCEL"/>
> <enumeration value="MSPOWERPOINT"/>
>
> <enumeration value="XML"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDifficulty">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentLearningResourceType">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Excercise"/>
>
> <enumeration value="Simulation"/>
> <enumeration value="Questionnaire"/>
> <enumeration value="Diagram"/>
> <enumeration value="Figure"/>
> <enumeration value="Graph"/>
> <enumeration value="Index"/>
> <enumeration value="Slide"/>
> <enumeration value="Table"/>
> <enumeration value="NarrativeText"/>
> <enumeration value="Exam"/>
> <enumeration value="Experiment"/>
> <enumeration value="ProblemStatement"/>
> <enumeration value="SelfAssesment"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentIntendedEndUser">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Teacher"/>
> <enumeration value="Author"/>
> <enumeration value="Learner"/>
> <enumeration value="Manager"/>
> </restriction>
> </simpleType>
> <simpleType name="Context">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="PrimaryEducation"/>
> <enumeration value="SecondaryEducation"/>
> <enumeration value="HigherEducation"/>
> <enumeration value="UniversityFirstCycle"/>
> <enumeration value="UniversitySecondCycle"/>
> <enumeration value="UniversityPostgrade"/>
> <enumeration value="TechnicalSchoolFirstCycle"/>
>
> <enumeration value="TechnicalSchoolSecondCycle"/>
> <enumeration value="ProfessionalFormation"/>
> <enumeration value="ContinuousFormation"/>
> <enumeration value="VocationalTraining"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentStatus">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Draft"/>
> <enumeration value="Final"/>
> <enumeration value="Revised"/>
> <enumeration value="Unavailable"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentInteractivityType">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Active"/>
> <enumeration value="Expositive"/>
> <enumeration value="Mixed"/>
> <enumeration value="Undefined"/>
> </restriction>
> </simpleType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/ws/
> metadata" xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="anyType2anyTypeMap">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> <complexType>
> <sequence>
> <element minOccurs="0" name="key" type="anyType"/>
> <element minOccurs="0" name="value" type="anyType"/>
>
> </sequence>
> </complexType>
> </element>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
> 2001/XMLSchema" xmlns:ns0="http://util.java" xmlns:ns1="http://
> metadata.core.lor.rbx.com">
> <complexType name="User">
> <sequence>
> <element minOccurs="0" name="firstName" nillable="true"
> type="string"/> <element minOccurs="0" name="id" nillable="true"
> type="ns0:UUID"/> <element minOccurs="0" name="lastName"
> nillable="true" type="string"/> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Metadata">
>
> <sequence>
> <element minOccurs="0" name="ageFrom" type="int"/>
> <element minOccurs="0" name="ageTo" type="int"/>
> <element minOccurs="0" name="context" nillable="true"
> type="ns1:Context"/>
> <element minOccurs="0" name="coverage" nillable="true"
> type="ns3:Coverage"/>
> <element minOccurs="0" name="creator" nillable="true"
> type="ns3:User"/> <element minOccurs="0" name="degreeInteractivity"
> nillable="true" type="ns1:DocumentDegreeInteractivity"/>
> <element minOccurs="0" name="description" nillable="true"
> type="string"/>
> <element minOccurs="0" name="difficulty" nillable="true"
> type="ns1:DocumentDifficulty"/>
> <element minOccurs="0" name="format" nillable="true"
> type="ns1:DocumentFormat"/>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="intendedUser" nillable="true"
> type="ns1:DocumentIntendedEndUser"/>
> <element minOccurs="0" name="interactivityType" nillable="true"
> type="ns1:DocumentInteractivityType"/>
> <element minOccurs="0" name="keywords" nillable="true"
> type="ns3:ArrayOfKeyword"/>
> <element minOccurs="0" name="language" nillable="true"
> type="ns1:DocumentLanguage"/>
> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
>
> <element minOccurs="0" name="rating" type="int"/>
> <element minOccurs="0" name="resourceType" nillable="true"
> type="ns1:DocumentLearningResourceType"/>
> <element minOccurs="0" name="size" type="int"/>
> <element minOccurs="0" name="status" nillable="true"
> type="ns1:DocumentStatus"/>
> <element minOccurs="0" name="subject" nillable="true"
> type="ns3:Subject"/>
> <element minOccurs="0" name="title" nillable="true" type="string"/>
> <element minOccurs="0" name="version" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Coverage">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
>
> <complexType name="ArrayOfKeyword">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
> nillable="true" type="ns3:Keyword"/>
> </sequence>
> </complexType>
> <complexType name="Subject">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://util.java"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="UUID">
> <sequence>
>
> <element minOccurs="0" name="leastSignificantBits" type="long"/>
> <element minOccurs="0" name="mostSignificantBits" type="long"/>
> </sequence>
> </complexType>
> </schema>
>
> </wsdl:types>
> <wsdl:message name="updateMetadata">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getMap">
>
> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadata">
> <wsdl:part name="documentID" type="ns3:UUID">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="updateMetadataResponse">
> </wsdl:message>
>
> <wsdl:message name="getMapResponse">
> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadataResponse">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="MetadataService">
>
> <wsdl:operation name="updateMetadata">
> <wsdl:input message="ns1:updateMetadata" name="updateMetadata">
> </wsdl:input>
> <wsdl:output message="ns1:updateMetadataResponse"
> name="updateMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <wsdl:input message="ns1:getDocumentMetadata"
> name="getDocumentMetadata">
> </wsdl:input>
>
> <wsdl:output message="ns1:getDocumentMetadataResponse"
> name="getDocumentMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <wsdl:input message="ns1:getMap" name="getMap">
> </wsdl:input>
> <wsdl:output message="ns1:getMapResponse"
> name="getMapResponse"> </wsdl:output>
> </wsdl:operation>
>
> </wsdl:portType>
> <wsdl:binding name="MetadataServiceSoapBinding"
> type="ns1:MetadataService">
> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> soap/http"/>
> <wsdl:operation name="updateMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="updateMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="updateMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getDocumentMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getDocumentMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getMap">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getMapResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="MetadataService">
> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
> name="MetadataServiceImplPort">
> <soap:address location="http://localhost:8080/lor/services/
> MetadataService"/>
> </wsdl:port>
> </wsdl:service>
>
> </wsdl:definitions>
>
> And this is the error:
>
> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
> 'ns3:Coverage'
>
> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
> simple or complex type 'ns3:Coverage'
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.err
>or (JAXBBindErrorListener.java:34)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> (SchemaCompilerImpl.java:245)
> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
> (ErrorReceiverFilter.java:61)
> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
> (ParserContext.java:188)
> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> (ParserContext.java:166)
> at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
> (NGCCRuntimeEx.java:103)
> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> (DelayedRef.java:91)
> at com.sun.xml.xsom.impl.parser.DelayedRef.run
> (DelayedRef.java:66)
> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
> (ParserContext.java:126)
> at com.sun.xml.xsom.parser.XSOMParser.getResult
> (XSOMParser.java:172)
> at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:
> 488)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> (SchemaCompilerImpl.java:197)
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initializ
>e( JAXBDataBinding.java:123)
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
> (JAXBDataBinding.java:163)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
> (WSDLToJavaContainer.java:483)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> (WSDLToJavaContainer.java:168)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> (WSDLToJavaContainer.java:215)
> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> (ToolRunner.java:84)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> (WSDLToJava.java:102)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> (WSDLToJava.java:171)
> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
> type 'ns3:Coverage'
> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> (ParserContext.java:162)
> ... 15 more
>
> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
> > Hi ,
> > The generated wsdl seems invalid**. Can you also paste the wsdl you
> > generated?
> > Cheers
> >
> > Jim
> >
> > Julio Arias wrote:
> >> Hi -
> >>
> >> I have the following web method, we are using JAXB binding but the
> >> WSDL generator doesn't create a complex type for the returning(or
> >> param) map thus wsdl2java blows up with the following exception
> >> (see below). Xfire use to create a complex type in the WSDL for
> >> this. Do I need a special annotation?
> >>
> >> @WebMethod
> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
> >>
> >> -------------------------------------------------------------------
> >>-- ----------------
> >>
> >> WSDLToJava Error : java.lang.NullPointerException
> >>
> >> org.apache.cxf.tools.common.ToolException:
> >> java.lang.NullPointerException
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:223)
> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> >> (ToolRunner.java:84)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> >> (WSDLToJava.java:102)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> >> (WSDLToJava.java:171)
> >> Caused by: java.lang.NullPointerException
> >> at
> >> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
> >> (XmlSchemaCollection.java:372)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
> >> (WSDLServiceBuilder.java:775)
> >> at
> >> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
> >> (WSDLServiceBuilder.java:578)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
> >> (WSDLServiceBuilder.java:561)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:251)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:154)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:143)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:142)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:215)
> >> ... 3 more
> >>
> >>
> >>
> >>
> >>
> >>
> >> Julio Arias
> >> Java Developer
> >> Roundbox Global : enterprise : technology : genius
> >> -------------------------------------------------------------------
> >>-- Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> >> -------------------------------------------------------------------
> >>--
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog
Re: Returning a java map
Posted by Julio Arias <ju...@rbxglobal.com>.
Thanks Dan, I'll test it and let u know.
On Jul 23, 2007, at 7:31 AM, Dan Diephouse wrote:
> Hiya,
>
> Now I've really fixed this in SVN and integrated in a test case.
> You can try
> building the CXF sources yourself, or we'll get a snapshot published
> sometime before tomorrow I believe. Thanks,
>
> - Dan
>
> On 7/22/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>>
>> Hi Julio,
>> In case you thought we've forgotten about you - I've confirmed
>> this issue
>> and am working on a fix. I should have something within the next
>> 24 hours,
>> if not tonight. Thanks,
>> - Dan
>>
>> On 7/20/07, Julio Arias <ju...@rbxglobal.com> wrote:
>> >
>> > I try the latest SNAPSHOT (apache-cxf-2.0.1-
>> > incubator-20070720.021044-2.tar.gz ) and still is not working. The
>> > WSDL here is not the same I put first but it has the same problem.
>> >
>> > ----------------------SEI---------------------------
>> >
>> > @WebService(
>> > targetNamespace = "http://client.webservice.crm.ecot.com/
>> > skeleton/StudentService",
>> > name = "StudentService"
>> > )
>> > @SOAPBinding(style = SOAPBinding.Style.RPC, use =
>> > SOAPBinding.Use.LITERAL)
>> > public interface StudentService {
>> >
>> > public StudentVO findStudent(Long id);
>> >
>> > public Map<Long, StudentVO> getStudentsMap();
>> >
>> > public List<StudentVO> getStudents(Map<String, String>
>> filters);
>> >
>> > public List<StudentVO> getStudentsByIds(List<String> ids);
>> >
>> > }
>> >
>> > -----------Spring config-------------------------
>> >
>> >
>> > <bean id="aegisDatabinding"
>> >
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>> >
>> >
>> > <bean id="userServiceImpl"
>> > class="com.altair.cls.web.service.crm.UserServiceImpl ">
>> > <property name="userManager" ref="userManager"/>
>> > </bean>
>> >
>> > <jaxws:endpoint id="userService" address="/UserService"
>> > implementor="#userServiceImpl">
>> >
>> > <jaxws:serviceFactory>
>> > <bean
>> > class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>> > <property name="dataBinding"
>> ref="aegisDatabinding"/>
>> > </bean>
>> > </jaxws:serviceFactory>
>> >
>> > </jaxws:endpoint>
>> >
>> >
>> > -------------------- WSDL-------------------------
>> >
>> > <?xml version="1.0" encoding="utf-8"?>
>> > <wsdl:definitions name="StudentService" targetNamespace="http://
>> > client.webservice.crm.ecot.com/skeleton/StudentService"
>> > xmlns:ns1="http://client.webservice.crm.ecot.com/skeleton/
>> > StudentService" xmlns:ns2="urn:com:ecot:crm:webservice:vo:student"
>> > xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:wsdl="http://
>> > schemas.xmlsoap.org/wsdl/" xmlns:xsd=" http://www.w3.org/2001/
>> XMLSchema
>> > ">
>> > <wsdl:types>
>> > <schema attributeFormDefault="qualified"
>> > elementFormDefault="qualified" targetNamespace="http://
>> > client.webservice.crm.ecot.com/skeleton/StudentService"
>> xmlns="http://
>> > www.w3.org/2001/XMLSchema">
>> > <complexType name="ArrayOfString">
>> > <sequence>
>> > <element maxOccurs="unbounded" minOccurs="0" name="string"
>> > nillable="true" type="string"/>
>> > </sequence>
>> > </complexType>
>> > <complexType name="anyType2anyTypeMap">
>> > <sequence>
>> > <element maxOccurs="unbounded" minOccurs="0" name="entry">
>> > <complexType>
>> > <sequence>
>> > <element minOccurs="0" name="key" type="anyType"/>
>> > <element minOccurs="0" name="value" type="anyType"/>
>> >
>> > </sequence>
>> > </complexType>
>> > </element>
>> > </sequence>
>> > </complexType>
>> > </schema>
>> >
>> > <schema attributeFormDefault="qualified"
>> > elementFormDefault="qualified"
>> > targetNamespace="urn:com:ecot:crm:webservice:vo:student"
>> > xmlns=" http://www.w3.org/2001/XMLSchema">
>> > <complexType name="ArrayOfStudentVO">
>> > <sequence>
>> > <element maxOccurs="unbounded" minOccurs="0" name="StudentVO"
>> > nillable="true" type="ns1:StudentVO"/>
>> > </sequence>
>> > </complexType>
>> > <complexType name="StudentVO">
>> > <sequence>
>> > <element minOccurs="0" name="SEPId" nillable="true" type="long"/>
>> > <element minOccurs="0" name="address" nillable="true"
>> type="string"/>
>> >
>> > <element minOccurs="0" name="admittedDate" nillable="true"
>> > type="string"/>
>> > <element minOccurs="0" name="adultFirstName" nillable="true"
>> > type="string"/>
>> > <element minOccurs="0" name="adultLastName" nillable="true"
>> > type="string"/>
>> > <element minOccurs="0" name="birthDate" nillable="true"
>> type="string"/>
>> > <element minOccurs="0" name="country" nillable="true"
>> type="string"/>
>> > <element minOccurs="0" name="email" nillable="true" type="string"/>
>> > <element minOccurs="0" name="enrolledDate" nillable="true"
>> > type="string"/>
>> > <element minOccurs="0" name="firstName" nillable="true"
>> type="string"/>
>> > <element minOccurs="0" name="gender" nillable="true"
>> type="string"/>
>> > <element minOccurs="0" name="grade" nillable="true" type="string"/>
>> > <element minOccurs="0" name="lastName" nillable="true"
>> type="string"/>
>> > <element minOccurs="0" name="phone" nillable="true" type="string"/>
>> > <element minOccurs="0" name="status" nillable="true"
>> type="string"/>
>> > <any maxOccurs="unbounded"/>
>> > </sequence>
>> > </complexType>
>> > </schema>
>> >
>> > </wsdl:types>
>> > <wsdl:message name="findStudent">
>> > <wsdl:part name="arg0" type="xsd:long">
>> > </wsdl:part>
>> > </wsdl:message>
>> > <wsdl:message name="getStudentsByIdsResponse">
>> > <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
>> > </wsdl:part>
>> >
>> > </wsdl:message>
>> > <wsdl:message name="getStudentsByIds">
>> > <wsdl:part name="arg0" type="ns1:ArrayOfString">
>> > </wsdl:part>
>> > </wsdl:message>
>> > <wsdl:message name="findStudentResponse">
>> > <wsdl:part name="return" type="ns2:StudentVO">
>> > </wsdl:part>
>> > </wsdl:message>
>> >
>> > <wsdl:message name="getStudentsMap">
>> > </wsdl:message>
>> > <wsdl:message name="getStudentsResponse">
>> > <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
>> > </wsdl:part>
>> > </wsdl:message>
>> > <wsdl:message name="getStudents">
>> > <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
>> > </wsdl:part>
>> >
>> > </wsdl:message>
>> > <wsdl:message name="getStudentsMapResponse">
>> > <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
>> > </wsdl:part>
>> > </wsdl:message>
>> > <wsdl:portType name="StudentService">
>> > <wsdl:operation name="getStudentsByIds">
>> > <wsdl:input message="ns1:getStudentsByIds"
>> > name="getStudentsByIds">
>> > </wsdl:input>
>> >
>> > <wsdl:output message="ns1:getStudentsByIdsResponse"
>> > name="getStudentsByIdsResponse">
>> > </wsdl:output>
>> > </wsdl:operation>
>> > <wsdl:operation name="findStudent">
>> > <wsdl:input message="ns1:findStudent" name="findStudent">
>> > </wsdl:input>
>> > <wsdl:output message="ns1:findStudentResponse"
>> > name="findStudentResponse">
>> > </wsdl:output>
>> > </wsdl:operation>
>> >
>> > <wsdl:operation name="getStudents">
>> > <wsdl:input message="ns1:getStudents" name="getStudents">
>> > </wsdl:input>
>> > <wsdl:output message="ns1:getStudentsResponse"
>> > name="getStudentsResponse">
>> > </wsdl:output>
>> > </wsdl:operation>
>> > <wsdl:operation name="getStudentsMap">
>> > <wsdl:input message="ns1:getStudentsMap"
>> name="getStudentsMap">
>> > </wsdl:input>
>> >
>> > <wsdl:output message="ns1:getStudentsMapResponse"
>> > name="getStudentsMapResponse">
>> > </wsdl:output>
>> > </wsdl:operation>
>> > </wsdl:portType>
>> > <wsdl:binding name="StudentServiceSoapBinding"
>> > type="ns1:StudentService">
>> > <soap:binding style="rpc" transport="http://
>> schemas.xmlsoap.org/
>> > soap/http"/>
>> > <wsdl:operation name="getStudentsByIds">
>> > <soap:operation soapAction="" style="rpc"/>
>> > <wsdl:input name="getStudentsByIds">
>> >
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:input>
>> > <wsdl:output name="getStudentsByIdsResponse">
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:output>
>> > </wsdl:operation>
>> > <wsdl:operation name="findStudent">
>> > <soap:operation soapAction="" style="rpc"/>
>> > <wsdl:input name="findStudent">
>> >
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:input>
>> > <wsdl:output name="findStudentResponse">
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:output>
>> > </wsdl:operation>
>> > <wsdl:operation name="getStudents">
>> > <soap:operation soapAction="" style="rpc"/>
>> > <wsdl:input name="getStudents">
>> >
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:input>
>> > <wsdl:output name="getStudentsResponse">
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:output>
>> > </wsdl:operation>
>> > <wsdl:operation name="getStudentsMap">
>> > <soap:operation soapAction="" style="rpc"/>
>> > <wsdl:input name="getStudentsMap">
>> >
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:input>
>> > <wsdl:output name="getStudentsMapResponse">
>> > <soap:body namespace="http://
>> client.webservice.crm.ecot.com/
>> > skeleton/StudentService" use="literal"/>
>> > </wsdl:output>
>> > </wsdl:operation>
>> > </wsdl:binding>
>> > <wsdl:service name="StudentService">
>> > <wsdl:port binding="ns1:StudentServiceSoapBinding"
>> > name="StudentService">
>> >
>> > <soap:address location="http://localhost:8080/cls/services/
>> > StudentService"/>
>> > </wsdl:port>
>> > </wsdl:service>
>> > </wsdl:definitions>
>> >
>> > On Jul 20, 2007, at 8:19 AM, Dan Diephouse wrote:
>> >
>> > > Hi Julio,
>> > >
>> > > I believe I fixed this yesterday as part of CXF-811. Could you
>> try a
>> > > SNAPSHOT build?
>> > >
>> > > http://incubator.apache.org/cxf/download.html
>> > >
>> > > The fixes will be part of our 2.0.1 release. Thanks,
>> > >
>> > > - Dan
>> > >
>> > > On 7/19/07, Julio Arias <ju...@rbxglobal.com> wrote:
>> > >>
>> > >> Hi Jim -
>> > >>
>> > >> I partially fix this, I change the data binding to Aegis (now
>> the map
>> >
>> > >> has a type in the WSDL) but now I get a different problem with
>> > >> wsdl2java
>> > >> The WSDL looks very similar at the one generated by xFire I
>> think
>> > >> there is a problem with the WSDL namespaces but I'm not sure
>> what.
>> > >> This is the WSDL:
>> > >>
>> > >> <?xml version="1.0" encoding="utf-8"?>
>> > >> <wsdl:definitions name="MetadataService"
>> targetNamespace="http://
>> > >> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/
>> metadata"
>> > >> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3=" http://
>> util.java"
>> > >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> > >> xmlns:wsdl="http://
>> > >> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
>> > >> XMLSchema">
>> > >> <wsdl:types>
>> > >> <schema attributeFormDefault="qualified"
>> > >> elementFormDefault="qualified" targetNamespace="http://
>> > >> metadata.core.lor.rbx.com " xmlns="http://www.w3.org/2001/
>> XMLSchema">
>> > >> <simpleType name="DocumentLanguage">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="English"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentDegreeInteractivity">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="VeryLow"/>
>> > >> <enumeration value="Low"/>
>> > >> <enumeration value="Medium"/>
>> > >>
>> > >> <enumeration value="High"/>
>> > >> <enumeration value="VeryHigh"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentFormat">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="HTML_XHTML"/>
>> > >> <enumeration value="SHOWCKWAVE_FLASH"/>
>> > >> <enumeration value="FLASH_VIDEO"/>
>> > >> <enumeration value="JPEG"/>
>> > >> <enumeration value="GIF"/>
>> > >> <enumeration value="MPEG"/>
>> > >> <enumeration value="PDF"/>
>> > >> <enumeration value="MSWORD"/>
>> > >> <enumeration value="MSEXCEL"/>
>> > >> <enumeration value="MSPOWERPOINT"/>
>> > >>
>> > >> <enumeration value="XML"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentDifficulty">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="VeryLow"/>
>> > >> <enumeration value="Low"/>
>> > >> <enumeration value="Medium"/>
>> > >> <enumeration value="High"/>
>> > >> <enumeration value="VeryHigh"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentLearningResourceType">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="Excercise"/>
>> > >>
>> > >> <enumeration value="Simulation"/>
>> > >> <enumeration value="Questionnaire"/>
>> > >> <enumeration value="Diagram"/>
>> > >> <enumeration value="Figure"/>
>> > >> <enumeration value="Graph"/>
>> > >> <enumeration value="Index"/>
>> > >> <enumeration value="Slide"/>
>> > >> <enumeration value="Table"/>
>> > >> <enumeration value="NarrativeText"/>
>> > >> <enumeration value="Exam"/>
>> > >> <enumeration value="Experiment"/>
>> > >> <enumeration value="ProblemStatement"/>
>> > >> <enumeration value="SelfAssesment"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentIntendedEndUser">
>> > >> <restriction base="string">
>> > >>
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="Teacher"/>
>> > >> <enumeration value="Author"/>
>> > >> <enumeration value="Learner"/>
>> > >> <enumeration value="Manager"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="Context">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="PrimaryEducation"/>
>> > >> <enumeration value="SecondaryEducation"/>
>> > >> <enumeration value="HigherEducation"/>
>> > >> <enumeration value="UniversityFirstCycle"/>
>> > >> <enumeration value="UniversitySecondCycle"/>
>> > >> <enumeration value="UniversityPostgrade"/>
>> > >> <enumeration value="TechnicalSchoolFirstCycle"/>
>> > >>
>> > >> <enumeration value="TechnicalSchoolSecondCycle"/>
>> > >> <enumeration value="ProfessionalFormation"/>
>> > >> <enumeration value="ContinuousFormation"/>
>> > >> <enumeration value="VocationalTraining"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentStatus">
>> > >> <restriction base="string">
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="Draft"/>
>> > >> <enumeration value="Final"/>
>> > >> <enumeration value="Revised"/>
>> > >> <enumeration value="Unavailable"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> <simpleType name="DocumentInteractivityType">
>> > >> <restriction base="string">
>> > >>
>> > >> <enumeration value="Any"/>
>> > >> <enumeration value="Active"/>
>> > >> <enumeration value="Expositive"/>
>> > >> <enumeration value="Mixed"/>
>> > >> <enumeration value="Undefined"/>
>> > >> </restriction>
>> > >> </simpleType>
>> > >> </schema>
>> > >>
>> > >> <schema attributeFormDefault="qualified"
>> > >> elementFormDefault="qualified" targetNamespace="http://
>> lor.rbx.com/
>> > >> ws/
>> > >> metadata" xmlns=" http://www.w3.org/2001/XMLSchema">
>> > >> <complexType name="anyType2anyTypeMap">
>> > >> <sequence>
>> > >> <element maxOccurs="unbounded" minOccurs="0" name="entry">
>> > >> <complexType>
>> > >> <sequence>
>> > >> <element minOccurs="0" name="key" type="anyType"/>
>> > >> <element minOccurs="0" name="value" type="anyType"/>
>> > >>
>> > >> </sequence>
>> > >> </complexType>
>> > >> </element>
>> > >> </sequence>
>> > >> </complexType>
>> > >> </schema>
>> > >>
>> > >> <schema attributeFormDefault="qualified"
>> > >> elementFormDefault="qualified"
>> > >> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://
>> www.w3.org/
>> > >> 2001/XMLSchema" xmlns:ns0=" http://util.java" xmlns:ns1="http://
>> > >> metadata.core.lor.rbx.com">
>> > >> <complexType name="User">
>> > >> <sequence>
>> > >> <element minOccurs="0" name="firstName" nillable="true"
>> > >> type="string"/>
>> > >> <element minOccurs="0" name="id" nillable="true"
>> type="ns0:UUID"/>
>> > >> <element minOccurs="0" name="lastName" nillable="true"
>> > >> type="string"/>
>> > >> <any maxOccurs="unbounded"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >> <complexType name="Metadata">
>> > >>
>> > >> <sequence>
>> > >> <element minOccurs="0" name="ageFrom" type="int"/>
>> > >> <element minOccurs="0" name="ageTo" type="int"/>
>> > >> <element minOccurs="0" name="context" nillable="true"
>> > >> type="ns1:Context"/>
>> > >> <element minOccurs="0" name="coverage" nillable="true"
>> > >> type="ns3:Coverage"/>
>> > >> <element minOccurs="0" name="creator" nillable="true"
>> > >> type="ns3:User"/>
>> > >> <element minOccurs="0" name="degreeInteractivity"
>> nillable="true"
>> > >> type="ns1:DocumentDegreeInteractivity"/>
>> > >> <element minOccurs="0" name="description" nillable="true"
>> > >> type="string"/>
>> > >> <element minOccurs="0" name="difficulty" nillable="true"
>> > >> type="ns1:DocumentDifficulty"/>
>> > >> <element minOccurs="0" name="format" nillable="true"
>> > >> type="ns1:DocumentFormat"/>
>> > >> <element minOccurs="0" name="id" nillable="true"
>> type="ns0:UUID"/>
>> > >> <element minOccurs="0" name="intendedUser" nillable="true"
>> > >> type="ns1:DocumentIntendedEndUser"/>
>> > >> <element minOccurs="0" name="interactivityType" nillable="true"
>> > >> type="ns1:DocumentInteractivityType"/>
>> > >> <element minOccurs="0" name="keywords" nillable="true"
>> > >> type="ns3:ArrayOfKeyword"/>
>> > >> <element minOccurs="0" name="language" nillable="true"
>> > >> type="ns1:DocumentLanguage"/>
>> > >> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
>> > >> <element minOccurs="0" name="owner" nillable="true"
>> type="ns3:User"/>
>> > >>
>> > >> <element minOccurs="0" name="rating" type="int"/>
>> > >> <element minOccurs="0" name="resourceType" nillable="true"
>> > >> type="ns1:DocumentLearningResourceType"/>
>> > >> <element minOccurs="0" name="size" type="int"/>
>> > >> <element minOccurs="0" name="status" nillable="true"
>> > >> type="ns1:DocumentStatus"/>
>> > >> <element minOccurs="0" name="subject" nillable="true"
>> > >> type="ns3:Subject"/>
>> > >> <element minOccurs="0" name="title" nillable="true"
>> type="string"/>
>> > >> <element minOccurs="0" name="version" nillable="true"
>> type="string"/>
>> >
>> > >> <any maxOccurs="unbounded"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >> <complexType name="Coverage">
>> > >> <sequence>
>> > >> <element minOccurs="0" name="id" nillable="true"
>> type="ns0:UUID"/>
>> > >> <element minOccurs="0" name="value" nillable="true"
>> type="string"/>
>> > >> <any maxOccurs="unbounded"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >>
>> > >> <complexType name="ArrayOfKeyword">
>> > >> <sequence>
>> > >> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
>> > >> nillable="true" type="ns3:Keyword"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >> <complexType name="Subject">
>> > >> <sequence>
>> > >> <element minOccurs="0" name="id" nillable="true"
>> type="ns0:UUID"/>
>> > >> <element minOccurs="0" name="value" nillable="true"
>> type="string"/>
>> > >> <any maxOccurs="unbounded"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >> </schema>
>> > >>
>> > >> <schema attributeFormDefault="qualified"
>> > >> elementFormDefault="qualified" targetNamespace="http://
>> util.java "
>> > >> xmlns="http://www.w3.org/2001/XMLSchema">
>> > >> <complexType name="UUID">
>> > >> <sequence>
>> > >>
>> > >> <element minOccurs="0" name="leastSignificantBits" type="long"/>
>> > >> <element minOccurs="0" name="mostSignificantBits" type="long"/>
>> > >> </sequence>
>> > >> </complexType>
>> > >> </schema>
>> > >>
>> > >> </wsdl:types>
>> > >> <wsdl:message name="updateMetadata">
>> > >> <wsdl:part name="metadata" type="ns2:Metadata">
>> > >> </wsdl:part>
>> > >> </wsdl:message>
>> > >> <wsdl:message name="getMap">
>> > >>
>> > >> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
>> > >> </wsdl:part>
>> > >> </wsdl:message>
>> > >> <wsdl:message name="getDocumentMetadata">
>> > >> <wsdl:part name="documentID" type="ns3:UUID">
>> > >> </wsdl:part>
>> > >> </wsdl:message>
>> > >> <wsdl:message name="updateMetadataResponse">
>> > >> </wsdl:message>
>> > >>
>> > >> <wsdl:message name="getMapResponse">
>> > >> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
>> > >> </wsdl:part>
>> > >> </wsdl:message>
>> > >> <wsdl:message name="getDocumentMetadataResponse">
>> > >> <wsdl:part name="metadata" type="ns2:Metadata">
>> > >> </wsdl:part>
>> > >> </wsdl:message>
>> > >> <wsdl:portType name="MetadataService">
>> > >>
>> > >> <wsdl:operation name="updateMetadata">
>> > >> <wsdl:input message="ns1:updateMetadata"
>> > >> name="updateMetadata">
>> > >> </wsdl:input>
>> > >> <wsdl:output message="ns1:updateMetadataResponse"
>> > >> name="updateMetadataResponse">
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >> <wsdl:operation name="getDocumentMetadata">
>> > >> <wsdl:input message="ns1:getDocumentMetadata"
>> > >> name="getDocumentMetadata">
>> > >> </wsdl:input>
>> > >>
>> > >> <wsdl:output message="ns1:getDocumentMetadataResponse"
>> > >> name="getDocumentMetadataResponse">
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >> <wsdl:operation name="getMap">
>> > >> <wsdl:input message="ns1:getMap" name="getMap">
>> > >> </wsdl:input>
>> > >> <wsdl:output message="ns1:getMapResponse"
>> > >> name="getMapResponse">
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >>
>> > >> </wsdl:portType>
>> > >> <wsdl:binding name="MetadataServiceSoapBinding"
>> > >> type="ns1:MetadataService">
>> > >> <soap:binding style="rpc" transport="http://
>> schemas.xmlsoap.org/
>> > >> soap/http"/>
>> > >> <wsdl:operation name="updateMetadata">
>> > >> <soap:operation soapAction="" style="rpc"/>
>> > >> <wsdl:input name="updateMetadata">
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:input>
>> > >> <wsdl:output name="updateMetadataResponse">
>> > >>
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >> <wsdl:operation name="getDocumentMetadata">
>> > >> <soap:operation soapAction="" style="rpc"/>
>> > >> <wsdl:input name="getDocumentMetadata">
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:input>
>> > >> <wsdl:output name="getDocumentMetadataResponse">
>> > >>
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >> <wsdl:operation name="getMap">
>> > >> <soap:operation soapAction="" style="rpc"/>
>> > >> <wsdl:input name="getMap">
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:input>
>> > >> <wsdl:output name="getMapResponse">
>> > >>
>> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> > >> use="literal"/>
>> > >> </wsdl:output>
>> > >> </wsdl:operation>
>> > >> </wsdl:binding>
>> > >> <wsdl:service name="MetadataService">
>> > >> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
>> > >> name="MetadataServiceImplPort">
>> > >> <soap:address location="http://localhost:8080/lor/
>> services/
>> > >> MetadataService"/>
>> > >> </wsdl:port>
>> > >> </wsdl:service>
>> > >>
>> > >> </wsdl:definitions>
>> > >>
>> > >> And this is the error:
>> > >>
>> > >> WSDLToJava Error : Thrown by JAXB : undefined simple or
>> complex type
>> > >> 'ns3:Coverage'
>> > >>
>> > >> org.apache.cxf.tools.common.ToolException: Thrown by JAXB :
>> undefined
>> > >> simple or complex type 'ns3:Coverage'
>> > >> at
>> > >>
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.er
>> > >> ror
>> > >> (JAXBBindErrorListener.java:34)
>> > >> at
>> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
>> > >> (SchemaCompilerImpl.java:245)
>> > >> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
>> > >> (ErrorReceiverFilter.java :61)
>> > >> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
>> > >> (ParserContext.java:188)
>> > >> at com.sun.xml.xsom.impl.parser.ParserContext
>> $1.reportError
>> > >> (ParserContext.java :166)
>> > >> at
>> com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
>> > >> (NGCCRuntimeEx.java:103)
>> > >> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
>> > >> (DelayedRef.java :91)
>> > >> at com.sun.xml.xsom.impl.parser.DelayedRef.run
>> > >> (DelayedRef.java:66)
>> > >> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
>> > >> (ParserContext.java:126)
>> > >> at com.sun.xml.xsom.parser.XSOMParser.getResult
>> > >> (XSOMParser.java:172)
>> > >> at com.sun.tools.xjc.ModelLoader.createXSOM
>> > >> (ModelLoader.java:
>> > >> 488)
>> > >> at
>> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
>> > >> (SchemaCompilerImpl.java:197)
>> > >> at
>> > >>
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initiali
>> > >> ze(
>> > >> JAXBDataBinding.java:123)
>> > >> at
>> > >>
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
>> > >> (JAXBDataBinding.java:163)
>> > >> at
>> > >> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
>> > >> (WSDLToJavaContainer.java:483)
>> > >> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> > >> (WSDLToJavaContainer.java:168)
>> > >> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> > >> (WSDLToJavaContainer.java:215)
>> > >> at
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
>> > >> (ToolRunner.java:84)
>> > >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
>> > >> (WSDLToJava.java:102)
>> > >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
>> > >> (WSDLToJava.java:171)
>> > >> Caused by: org.xml.sax.SAXParseException: undefined simple or
>> complex
>> > >> type 'ns3:Coverage'
>> > >> at com.sun.xml.xsom.impl.parser.ParserContext
>> $1.reportError
>> > >> (ParserContext.java:162)
>> > >> ... 15 more
>> > >>
>> > >>
>> > >> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
>> > >>
>> > >> > Hi ,
>> > >> > The generated wsdl seems invalid**. Can you also paste the
>> wsdl you
>> > >> > generated?
>> > >> > Cheers
>> > >> >
>> > >> > Jim
>> > >> >
>> > >> > Julio Arias wrote:
>> > >> >> Hi -
>> > >> >>
>> > >> >> I have the following web method, we are using JAXB binding
>> but the
>> > >> >> WSDL generator doesn't create a complex type for the
>> returning(or
>> > >> >> param) map thus wsdl2java blows up with the following
>> exception
>> > >> >> (see below). Xfire use to create a complex type in the
>> WSDL for
>> > >> >> this. Do I need a special annotation?
>> > >> >>
>> > >> >> @WebMethod
>> > >> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
>> > >> >>
>> > >> >>
>> > >>
>> ---------------------------------------------------------------------
>> >
>> > >> >> ----------------
>> > >> >>
>> > >> >> WSDLToJava Error : java.lang.NullPointerException
>> > >> >>
>> > >> >> org.apache.cxf.tools.common.ToolException:
>> > >> >> java.lang.NullPointerException
>> > >> >> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> > >> >> (WSDLToJavaContainer.java:223)
>> > >> >> at
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
>> > >> >> (ToolRunner.java:84)
>> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
>> > >> >> (WSDLToJava.java:102)
>> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
>> > >> >> (WSDLToJava.java:171)
>> > >> >> Caused by: java.lang.NullPointerException
>> > >> >> at
>> > >> >>
>> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
>> > >> >> (XmlSchemaCollection.java:372)
>> > >> >> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
>> > >> >> (WSDLServiceBuilder.java:775)
>> > >> >> at
>> > >> >>
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
>> > >> >> (WSDLServiceBuilder.java:578)
>> > >> >> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
>> > >> >> (WSDLServiceBuilder.java:561)
>> > >> >> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> > >> >> (WSDLServiceBuilder.java:251)
>> > >> >> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> > >> >> (WSDLServiceBuilder.java:154)
>> > >> >> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> > >> >> (WSDLServiceBuilder.java :143)
>> > >> >> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> > >> >> (WSDLToJavaContainer.java:142)
>> > >> >> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> > >> >> (WSDLToJavaContainer.java:215)
>> > >> >> ... 3 more
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> Julio Arias
>> > >> >> Java Developer
>> > >> >> Roundbox Global : enterprise : technology : genius
>> > >> >>
>> > >>
>> ---------------------------------------------------------------------
>> >
>> > >> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> > >> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> > >> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> > >> >>
>> > >>
>> ---------------------------------------------------------------------
>> > >> >>
>> > >> >>
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> Julio Arias
>> > >> Java Developer
>> > >> Roundbox Global : enterprise : technology : genius
>> > >>
>> ---------------------------------------------------------------------
>> >
>> > >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> > >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> > >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> > >>
>> ---------------------------------------------------------------------
>> > >>
>> > >>
>> > >
>> > >
>> > > --
>> > > Dan Diephouse
>> > > Envoi Solutions
>> > > http://envoisolutions.com | http://netzooid.com/blog
>> >
>> >
>> >
>> >
>> > Julio Arias
>> > Java Developer
>> > Roundbox Global : enterprise : technology : genius
>> >
>> ---------------------------------------------------------------------
>> > Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> > tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> > email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> >
>> ---------------------------------------------------------------------
>> >
>> >
>>
>>
>> --
>> Dan Diephouse
>> Envoi Solutions
>> http://envoisolutions.com | http://netzooid.com/blog
>>
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------
Re: Returning a java map
Posted by Dan Diephouse <da...@envoisolutions.com>.
Hiya,
Now I've really fixed this in SVN and integrated in a test case. You can try
building the CXF sources yourself, or we'll get a snapshot published
sometime before tomorrow I believe. Thanks,
- Dan
On 7/22/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> Hi Julio,
> In case you thought we've forgotten about you - I've confirmed this issue
> and am working on a fix. I should have something within the next 24 hours,
> if not tonight. Thanks,
> - Dan
>
> On 7/20/07, Julio Arias <ju...@rbxglobal.com> wrote:
> >
> > I try the latest SNAPSHOT (apache-cxf-2.0.1-
> > incubator-20070720.021044-2.tar.gz ) and still is not working. The
> > WSDL here is not the same I put first but it has the same problem.
> >
> > ----------------------SEI---------------------------
> >
> > @WebService(
> > targetNamespace = "http://client.webservice.crm.ecot.com/
> > skeleton/StudentService",
> > name = "StudentService"
> > )
> > @SOAPBinding(style = SOAPBinding.Style.RPC, use =
> > SOAPBinding.Use.LITERAL)
> > public interface StudentService {
> >
> > public StudentVO findStudent(Long id);
> >
> > public Map<Long, StudentVO> getStudentsMap();
> >
> > public List<StudentVO> getStudents(Map<String, String> filters);
> >
> > public List<StudentVO> getStudentsByIds(List<String> ids);
> >
> > }
> >
> > -----------Spring config-------------------------
> >
> >
> > <bean id="aegisDatabinding"
> > class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
> >
> >
> > <bean id="userServiceImpl"
> > class="com.altair.cls.web.service.crm.UserServiceImpl ">
> > <property name="userManager" ref="userManager"/>
> > </bean>
> >
> > <jaxws:endpoint id="userService" address="/UserService"
> > implementor="#userServiceImpl">
> >
> > <jaxws:serviceFactory>
> > <bean
> > class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
> > <property name="dataBinding" ref="aegisDatabinding"/>
> > </bean>
> > </jaxws:serviceFactory>
> >
> > </jaxws:endpoint>
> >
> >
> > -------------------- WSDL-------------------------
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <wsdl:definitions name="StudentService" targetNamespace="http://
> > client.webservice.crm.ecot.com/skeleton/StudentService"
> > xmlns:ns1="http://client.webservice.crm.ecot.com/skeleton/
> > StudentService" xmlns:ns2="urn:com:ecot:crm:webservice:vo:student"
> > xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
> > schemas.xmlsoap.org/wsdl/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema
> > ">
> > <wsdl:types>
> > <schema attributeFormDefault="qualified"
> > elementFormDefault="qualified" targetNamespace="http://
> > client.webservice.crm.ecot.com/skeleton/StudentService" xmlns="http://
> > www.w3.org/2001/XMLSchema">
> > <complexType name="ArrayOfString">
> > <sequence>
> > <element maxOccurs="unbounded" minOccurs="0" name="string"
> > nillable="true" type="string"/>
> > </sequence>
> > </complexType>
> > <complexType name="anyType2anyTypeMap">
> > <sequence>
> > <element maxOccurs="unbounded" minOccurs="0" name="entry">
> > <complexType>
> > <sequence>
> > <element minOccurs="0" name="key" type="anyType"/>
> > <element minOccurs="0" name="value" type="anyType"/>
> >
> > </sequence>
> > </complexType>
> > </element>
> > </sequence>
> > </complexType>
> > </schema>
> >
> > <schema attributeFormDefault="qualified"
> > elementFormDefault="qualified"
> > targetNamespace="urn:com:ecot:crm:webservice:vo:student"
> > xmlns=" http://www.w3.org/2001/XMLSchema">
> > <complexType name="ArrayOfStudentVO">
> > <sequence>
> > <element maxOccurs="unbounded" minOccurs="0" name="StudentVO"
> > nillable="true" type="ns1:StudentVO"/>
> > </sequence>
> > </complexType>
> > <complexType name="StudentVO">
> > <sequence>
> > <element minOccurs="0" name="SEPId" nillable="true" type="long"/>
> > <element minOccurs="0" name="address" nillable="true" type="string"/>
> >
> > <element minOccurs="0" name="admittedDate" nillable="true"
> > type="string"/>
> > <element minOccurs="0" name="adultFirstName" nillable="true"
> > type="string"/>
> > <element minOccurs="0" name="adultLastName" nillable="true"
> > type="string"/>
> > <element minOccurs="0" name="birthDate" nillable="true" type="string"/>
> > <element minOccurs="0" name="country" nillable="true" type="string"/>
> > <element minOccurs="0" name="email" nillable="true" type="string"/>
> > <element minOccurs="0" name="enrolledDate" nillable="true"
> > type="string"/>
> > <element minOccurs="0" name="firstName" nillable="true" type="string"/>
> > <element minOccurs="0" name="gender" nillable="true" type="string"/>
> > <element minOccurs="0" name="grade" nillable="true" type="string"/>
> > <element minOccurs="0" name="lastName" nillable="true" type="string"/>
> > <element minOccurs="0" name="phone" nillable="true" type="string"/>
> > <element minOccurs="0" name="status" nillable="true" type="string"/>
> > <any maxOccurs="unbounded"/>
> > </sequence>
> > </complexType>
> > </schema>
> >
> > </wsdl:types>
> > <wsdl:message name="findStudent">
> > <wsdl:part name="arg0" type="xsd:long">
> > </wsdl:part>
> > </wsdl:message>
> > <wsdl:message name="getStudentsByIdsResponse">
> > <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
> > </wsdl:part>
> >
> > </wsdl:message>
> > <wsdl:message name="getStudentsByIds">
> > <wsdl:part name="arg0" type="ns1:ArrayOfString">
> > </wsdl:part>
> > </wsdl:message>
> > <wsdl:message name="findStudentResponse">
> > <wsdl:part name="return" type="ns2:StudentVO">
> > </wsdl:part>
> > </wsdl:message>
> >
> > <wsdl:message name="getStudentsMap">
> > </wsdl:message>
> > <wsdl:message name="getStudentsResponse">
> > <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
> > </wsdl:part>
> > </wsdl:message>
> > <wsdl:message name="getStudents">
> > <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> > </wsdl:part>
> >
> > </wsdl:message>
> > <wsdl:message name="getStudentsMapResponse">
> > <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> > </wsdl:part>
> > </wsdl:message>
> > <wsdl:portType name="StudentService">
> > <wsdl:operation name="getStudentsByIds">
> > <wsdl:input message="ns1:getStudentsByIds"
> > name="getStudentsByIds">
> > </wsdl:input>
> >
> > <wsdl:output message="ns1:getStudentsByIdsResponse"
> > name="getStudentsByIdsResponse">
> > </wsdl:output>
> > </wsdl:operation>
> > <wsdl:operation name="findStudent">
> > <wsdl:input message="ns1:findStudent" name="findStudent">
> > </wsdl:input>
> > <wsdl:output message="ns1:findStudentResponse"
> > name="findStudentResponse">
> > </wsdl:output>
> > </wsdl:operation>
> >
> > <wsdl:operation name="getStudents">
> > <wsdl:input message="ns1:getStudents" name="getStudents">
> > </wsdl:input>
> > <wsdl:output message="ns1:getStudentsResponse"
> > name="getStudentsResponse">
> > </wsdl:output>
> > </wsdl:operation>
> > <wsdl:operation name="getStudentsMap">
> > <wsdl:input message="ns1:getStudentsMap" name="getStudentsMap">
> > </wsdl:input>
> >
> > <wsdl:output message="ns1:getStudentsMapResponse"
> > name="getStudentsMapResponse">
> > </wsdl:output>
> > </wsdl:operation>
> > </wsdl:portType>
> > <wsdl:binding name="StudentServiceSoapBinding"
> > type="ns1:StudentService">
> > <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> > soap/http"/>
> > <wsdl:operation name="getStudentsByIds">
> > <soap:operation soapAction="" style="rpc"/>
> > <wsdl:input name="getStudentsByIds">
> >
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:input>
> > <wsdl:output name="getStudentsByIdsResponse">
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:output>
> > </wsdl:operation>
> > <wsdl:operation name="findStudent">
> > <soap:operation soapAction="" style="rpc"/>
> > <wsdl:input name="findStudent">
> >
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:input>
> > <wsdl:output name="findStudentResponse">
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:output>
> > </wsdl:operation>
> > <wsdl:operation name="getStudents">
> > <soap:operation soapAction="" style="rpc"/>
> > <wsdl:input name="getStudents">
> >
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:input>
> > <wsdl:output name="getStudentsResponse">
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:output>
> > </wsdl:operation>
> > <wsdl:operation name="getStudentsMap">
> > <soap:operation soapAction="" style="rpc"/>
> > <wsdl:input name="getStudentsMap">
> >
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:input>
> > <wsdl:output name="getStudentsMapResponse">
> > <soap:body namespace="http://client.webservice.crm.ecot.com/
> > skeleton/StudentService" use="literal"/>
> > </wsdl:output>
> > </wsdl:operation>
> > </wsdl:binding>
> > <wsdl:service name="StudentService">
> > <wsdl:port binding="ns1:StudentServiceSoapBinding"
> > name="StudentService">
> >
> > <soap:address location="http://localhost:8080/cls/services/
> > StudentService"/>
> > </wsdl:port>
> > </wsdl:service>
> > </wsdl:definitions>
> >
> > On Jul 20, 2007, at 8:19 AM, Dan Diephouse wrote:
> >
> > > Hi Julio,
> > >
> > > I believe I fixed this yesterday as part of CXF-811. Could you try a
> > > SNAPSHOT build?
> > >
> > > http://incubator.apache.org/cxf/download.html
> > >
> > > The fixes will be part of our 2.0.1 release. Thanks,
> > >
> > > - Dan
> > >
> > > On 7/19/07, Julio Arias <ju...@rbxglobal.com> wrote:
> > >>
> > >> Hi Jim -
> > >>
> > >> I partially fix this, I change the data binding to Aegis (now the map
> >
> > >> has a type in the WSDL) but now I get a different problem with
> > >> wsdl2java
> > >> The WSDL looks very similar at the one generated by xFire I think
> > >> there is a problem with the WSDL namespaces but I'm not sure what.
> > >> This is the WSDL:
> > >>
> > >> <?xml version="1.0" encoding="utf-8"?>
> > >> <wsdl:definitions name="MetadataService" targetNamespace="http://
> > >> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
> > >> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3=" http://util.java"
> > >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >> xmlns:wsdl="http://
> > >> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
> > >> XMLSchema">
> > >> <wsdl:types>
> > >> <schema attributeFormDefault="qualified"
> > >> elementFormDefault="qualified" targetNamespace="http://
> > >> metadata.core.lor.rbx.com " xmlns="http://www.w3.org/2001/XMLSchema">
> > >> <simpleType name="DocumentLanguage">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="English"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentDegreeInteractivity">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="VeryLow"/>
> > >> <enumeration value="Low"/>
> > >> <enumeration value="Medium"/>
> > >>
> > >> <enumeration value="High"/>
> > >> <enumeration value="VeryHigh"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentFormat">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="HTML_XHTML"/>
> > >> <enumeration value="SHOWCKWAVE_FLASH"/>
> > >> <enumeration value="FLASH_VIDEO"/>
> > >> <enumeration value="JPEG"/>
> > >> <enumeration value="GIF"/>
> > >> <enumeration value="MPEG"/>
> > >> <enumeration value="PDF"/>
> > >> <enumeration value="MSWORD"/>
> > >> <enumeration value="MSEXCEL"/>
> > >> <enumeration value="MSPOWERPOINT"/>
> > >>
> > >> <enumeration value="XML"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentDifficulty">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="VeryLow"/>
> > >> <enumeration value="Low"/>
> > >> <enumeration value="Medium"/>
> > >> <enumeration value="High"/>
> > >> <enumeration value="VeryHigh"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentLearningResourceType">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="Excercise"/>
> > >>
> > >> <enumeration value="Simulation"/>
> > >> <enumeration value="Questionnaire"/>
> > >> <enumeration value="Diagram"/>
> > >> <enumeration value="Figure"/>
> > >> <enumeration value="Graph"/>
> > >> <enumeration value="Index"/>
> > >> <enumeration value="Slide"/>
> > >> <enumeration value="Table"/>
> > >> <enumeration value="NarrativeText"/>
> > >> <enumeration value="Exam"/>
> > >> <enumeration value="Experiment"/>
> > >> <enumeration value="ProblemStatement"/>
> > >> <enumeration value="SelfAssesment"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentIntendedEndUser">
> > >> <restriction base="string">
> > >>
> > >> <enumeration value="Any"/>
> > >> <enumeration value="Teacher"/>
> > >> <enumeration value="Author"/>
> > >> <enumeration value="Learner"/>
> > >> <enumeration value="Manager"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="Context">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="PrimaryEducation"/>
> > >> <enumeration value="SecondaryEducation"/>
> > >> <enumeration value="HigherEducation"/>
> > >> <enumeration value="UniversityFirstCycle"/>
> > >> <enumeration value="UniversitySecondCycle"/>
> > >> <enumeration value="UniversityPostgrade"/>
> > >> <enumeration value="TechnicalSchoolFirstCycle"/>
> > >>
> > >> <enumeration value="TechnicalSchoolSecondCycle"/>
> > >> <enumeration value="ProfessionalFormation"/>
> > >> <enumeration value="ContinuousFormation"/>
> > >> <enumeration value="VocationalTraining"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentStatus">
> > >> <restriction base="string">
> > >> <enumeration value="Any"/>
> > >> <enumeration value="Draft"/>
> > >> <enumeration value="Final"/>
> > >> <enumeration value="Revised"/>
> > >> <enumeration value="Unavailable"/>
> > >> </restriction>
> > >> </simpleType>
> > >> <simpleType name="DocumentInteractivityType">
> > >> <restriction base="string">
> > >>
> > >> <enumeration value="Any"/>
> > >> <enumeration value="Active"/>
> > >> <enumeration value="Expositive"/>
> > >> <enumeration value="Mixed"/>
> > >> <enumeration value="Undefined"/>
> > >> </restriction>
> > >> </simpleType>
> > >> </schema>
> > >>
> > >> <schema attributeFormDefault="qualified"
> > >> elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/
> > >> ws/
> > >> metadata" xmlns=" http://www.w3.org/2001/XMLSchema">
> > >> <complexType name="anyType2anyTypeMap">
> > >> <sequence>
> > >> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> > >> <complexType>
> > >> <sequence>
> > >> <element minOccurs="0" name="key" type="anyType"/>
> > >> <element minOccurs="0" name="value" type="anyType"/>
> > >>
> > >> </sequence>
> > >> </complexType>
> > >> </element>
> > >> </sequence>
> > >> </complexType>
> > >> </schema>
> > >>
> > >> <schema attributeFormDefault="qualified"
> > >> elementFormDefault="qualified"
> > >> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
> > >> 2001/XMLSchema" xmlns:ns0=" http://util.java" xmlns:ns1="http://
> > >> metadata.core.lor.rbx.com">
> > >> <complexType name="User">
> > >> <sequence>
> > >> <element minOccurs="0" name="firstName" nillable="true"
> > >> type="string"/>
> > >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> > >> <element minOccurs="0" name="lastName" nillable="true"
> > >> type="string"/>
> > >> <any maxOccurs="unbounded"/>
> > >> </sequence>
> > >> </complexType>
> > >> <complexType name="Metadata">
> > >>
> > >> <sequence>
> > >> <element minOccurs="0" name="ageFrom" type="int"/>
> > >> <element minOccurs="0" name="ageTo" type="int"/>
> > >> <element minOccurs="0" name="context" nillable="true"
> > >> type="ns1:Context"/>
> > >> <element minOccurs="0" name="coverage" nillable="true"
> > >> type="ns3:Coverage"/>
> > >> <element minOccurs="0" name="creator" nillable="true"
> > >> type="ns3:User"/>
> > >> <element minOccurs="0" name="degreeInteractivity" nillable="true"
> > >> type="ns1:DocumentDegreeInteractivity"/>
> > >> <element minOccurs="0" name="description" nillable="true"
> > >> type="string"/>
> > >> <element minOccurs="0" name="difficulty" nillable="true"
> > >> type="ns1:DocumentDifficulty"/>
> > >> <element minOccurs="0" name="format" nillable="true"
> > >> type="ns1:DocumentFormat"/>
> > >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> > >> <element minOccurs="0" name="intendedUser" nillable="true"
> > >> type="ns1:DocumentIntendedEndUser"/>
> > >> <element minOccurs="0" name="interactivityType" nillable="true"
> > >> type="ns1:DocumentInteractivityType"/>
> > >> <element minOccurs="0" name="keywords" nillable="true"
> > >> type="ns3:ArrayOfKeyword"/>
> > >> <element minOccurs="0" name="language" nillable="true"
> > >> type="ns1:DocumentLanguage"/>
> > >> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
> > >> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
> > >>
> > >> <element minOccurs="0" name="rating" type="int"/>
> > >> <element minOccurs="0" name="resourceType" nillable="true"
> > >> type="ns1:DocumentLearningResourceType"/>
> > >> <element minOccurs="0" name="size" type="int"/>
> > >> <element minOccurs="0" name="status" nillable="true"
> > >> type="ns1:DocumentStatus"/>
> > >> <element minOccurs="0" name="subject" nillable="true"
> > >> type="ns3:Subject"/>
> > >> <element minOccurs="0" name="title" nillable="true" type="string"/>
> > >> <element minOccurs="0" name="version" nillable="true" type="string"/>
> >
> > >> <any maxOccurs="unbounded"/>
> > >> </sequence>
> > >> </complexType>
> > >> <complexType name="Coverage">
> > >> <sequence>
> > >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> > >> <element minOccurs="0" name="value" nillable="true" type="string"/>
> > >> <any maxOccurs="unbounded"/>
> > >> </sequence>
> > >> </complexType>
> > >>
> > >> <complexType name="ArrayOfKeyword">
> > >> <sequence>
> > >> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
> > >> nillable="true" type="ns3:Keyword"/>
> > >> </sequence>
> > >> </complexType>
> > >> <complexType name="Subject">
> > >> <sequence>
> > >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> > >> <element minOccurs="0" name="value" nillable="true" type="string"/>
> > >> <any maxOccurs="unbounded"/>
> > >> </sequence>
> > >> </complexType>
> > >> </schema>
> > >>
> > >> <schema attributeFormDefault="qualified"
> > >> elementFormDefault="qualified" targetNamespace="http://util.java "
> > >> xmlns="http://www.w3.org/2001/XMLSchema">
> > >> <complexType name="UUID">
> > >> <sequence>
> > >>
> > >> <element minOccurs="0" name="leastSignificantBits" type="long"/>
> > >> <element minOccurs="0" name="mostSignificantBits" type="long"/>
> > >> </sequence>
> > >> </complexType>
> > >> </schema>
> > >>
> > >> </wsdl:types>
> > >> <wsdl:message name="updateMetadata">
> > >> <wsdl:part name="metadata" type="ns2:Metadata">
> > >> </wsdl:part>
> > >> </wsdl:message>
> > >> <wsdl:message name="getMap">
> > >>
> > >> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> > >> </wsdl:part>
> > >> </wsdl:message>
> > >> <wsdl:message name="getDocumentMetadata">
> > >> <wsdl:part name="documentID" type="ns3:UUID">
> > >> </wsdl:part>
> > >> </wsdl:message>
> > >> <wsdl:message name="updateMetadataResponse">
> > >> </wsdl:message>
> > >>
> > >> <wsdl:message name="getMapResponse">
> > >> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> > >> </wsdl:part>
> > >> </wsdl:message>
> > >> <wsdl:message name="getDocumentMetadataResponse">
> > >> <wsdl:part name="metadata" type="ns2:Metadata">
> > >> </wsdl:part>
> > >> </wsdl:message>
> > >> <wsdl:portType name="MetadataService">
> > >>
> > >> <wsdl:operation name="updateMetadata">
> > >> <wsdl:input message="ns1:updateMetadata"
> > >> name="updateMetadata">
> > >> </wsdl:input>
> > >> <wsdl:output message="ns1:updateMetadataResponse"
> > >> name="updateMetadataResponse">
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >> <wsdl:operation name="getDocumentMetadata">
> > >> <wsdl:input message="ns1:getDocumentMetadata"
> > >> name="getDocumentMetadata">
> > >> </wsdl:input>
> > >>
> > >> <wsdl:output message="ns1:getDocumentMetadataResponse"
> > >> name="getDocumentMetadataResponse">
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >> <wsdl:operation name="getMap">
> > >> <wsdl:input message="ns1:getMap" name="getMap">
> > >> </wsdl:input>
> > >> <wsdl:output message="ns1:getMapResponse"
> > >> name="getMapResponse">
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >>
> > >> </wsdl:portType>
> > >> <wsdl:binding name="MetadataServiceSoapBinding"
> > >> type="ns1:MetadataService">
> > >> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> > >> soap/http"/>
> > >> <wsdl:operation name="updateMetadata">
> > >> <soap:operation soapAction="" style="rpc"/>
> > >> <wsdl:input name="updateMetadata">
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:input>
> > >> <wsdl:output name="updateMetadataResponse">
> > >>
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >> <wsdl:operation name="getDocumentMetadata">
> > >> <soap:operation soapAction="" style="rpc"/>
> > >> <wsdl:input name="getDocumentMetadata">
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:input>
> > >> <wsdl:output name="getDocumentMetadataResponse">
> > >>
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >> <wsdl:operation name="getMap">
> > >> <soap:operation soapAction="" style="rpc"/>
> > >> <wsdl:input name="getMap">
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:input>
> > >> <wsdl:output name="getMapResponse">
> > >>
> > >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> > >> use="literal"/>
> > >> </wsdl:output>
> > >> </wsdl:operation>
> > >> </wsdl:binding>
> > >> <wsdl:service name="MetadataService">
> > >> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
> > >> name="MetadataServiceImplPort">
> > >> <soap:address location="http://localhost:8080/lor/services/
> > >> MetadataService"/>
> > >> </wsdl:port>
> > >> </wsdl:service>
> > >>
> > >> </wsdl:definitions>
> > >>
> > >> And this is the error:
> > >>
> > >> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
> > >> 'ns3:Coverage'
> > >>
> > >> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
> > >> simple or complex type 'ns3:Coverage'
> > >> at
> > >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.er
> > >> ror
> > >> (JAXBBindErrorListener.java:34)
> > >> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > >> (SchemaCompilerImpl.java:245)
> > >> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
> > >> (ErrorReceiverFilter.java :61)
> > >> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
> > >> (ParserContext.java:188)
> > >> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> > >> (ParserContext.java :166)
> > >> at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
> > >> (NGCCRuntimeEx.java:103)
> > >> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > >> (DelayedRef.java :91)
> > >> at com.sun.xml.xsom.impl.parser.DelayedRef.run
> > >> (DelayedRef.java:66)
> > >> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
> > >> (ParserContext.java:126)
> > >> at com.sun.xml.xsom.parser.XSOMParser.getResult
> > >> (XSOMParser.java:172)
> > >> at com.sun.tools.xjc.ModelLoader.createXSOM
> > >> (ModelLoader.java:
> > >> 488)
> > >> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > >> (SchemaCompilerImpl.java:197)
> > >> at
> > >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initiali
> > >> ze(
> > >> JAXBDataBinding.java:123)
> > >> at
> > >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
> > >> (JAXBDataBinding.java:163)
> > >> at
> > >> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
> > >> (WSDLToJavaContainer.java:483)
> > >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> > >> (WSDLToJavaContainer.java:168)
> > >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> > >> (WSDLToJavaContainer.java:215)
> > >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> > >> (ToolRunner.java:84)
> > >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> > >> (WSDLToJava.java:102)
> > >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> > >> (WSDLToJava.java:171)
> > >> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
> > >> type 'ns3:Coverage'
> > >> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> > >> (ParserContext.java:162)
> > >> ... 15 more
> > >>
> > >>
> > >> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
> > >>
> > >> > Hi ,
> > >> > The generated wsdl seems invalid**. Can you also paste the wsdl you
> > >> > generated?
> > >> > Cheers
> > >> >
> > >> > Jim
> > >> >
> > >> > Julio Arias wrote:
> > >> >> Hi -
> > >> >>
> > >> >> I have the following web method, we are using JAXB binding but the
> > >> >> WSDL generator doesn't create a complex type for the returning(or
> > >> >> param) map thus wsdl2java blows up with the following exception
> > >> >> (see below). Xfire use to create a complex type in the WSDL for
> > >> >> this. Do I need a special annotation?
> > >> >>
> > >> >> @WebMethod
> > >> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
> > >> >>
> > >> >>
> > >> ---------------------------------------------------------------------
> >
> > >> >> ----------------
> > >> >>
> > >> >> WSDLToJava Error : java.lang.NullPointerException
> > >> >>
> > >> >> org.apache.cxf.tools.common.ToolException:
> > >> >> java.lang.NullPointerException
> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> > >> >> (WSDLToJavaContainer.java:223)
> > >> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> > >> >> (ToolRunner.java:84)
> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> > >> >> (WSDLToJava.java:102)
> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> > >> >> (WSDLToJava.java:171)
> > >> >> Caused by: java.lang.NullPointerException
> > >> >> at
> > >> >> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
> > >> >> (XmlSchemaCollection.java:372)
> > >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
> > >> >> (WSDLServiceBuilder.java:775)
> > >> >> at
> > >> >> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
> > >> >> (WSDLServiceBuilder.java:578)
> > >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
> > >> >> (WSDLServiceBuilder.java:561)
> > >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> > >> >> (WSDLServiceBuilder.java:251)
> > >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> > >> >> (WSDLServiceBuilder.java:154)
> > >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> > >> >> (WSDLServiceBuilder.java :143)
> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> > >> >> (WSDLToJavaContainer.java:142)
> > >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> > >> >> (WSDLToJavaContainer.java:215)
> > >> >> ... 3 more
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> Julio Arias
> > >> >> Java Developer
> > >> >> Roundbox Global : enterprise : technology : genius
> > >> >>
> > >> ---------------------------------------------------------------------
> >
> > >> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> > >> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> > >> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> > >> >>
> > >> ---------------------------------------------------------------------
> > >> >>
> > >> >>
> > >>
> > >>
> > >>
> > >>
> > >> Julio Arias
> > >> Java Developer
> > >> Roundbox Global : enterprise : technology : genius
> > >> ---------------------------------------------------------------------
> >
> > >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> > >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> > >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> > >> ---------------------------------------------------------------------
> > >>
> > >>
> > >
> > >
> > > --
> > > Dan Diephouse
> > > Envoi Solutions
> > > http://envoisolutions.com | http://netzooid.com/blog
> >
> >
> >
> >
> > Julio Arias
> > Java Developer
> > Roundbox Global : enterprise : technology : genius
> > ---------------------------------------------------------------------
> > Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> > tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> > email: julio.arias@rbxglobal.com | www.rbxglobal.com
> > ---------------------------------------------------------------------
> >
> >
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog
Re: Returning a java map
Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Julio,
In case you thought we've forgotten about you - I've confirmed this issue
and am working on a fix. I should have something within the next 24 hours,
if not tonight. Thanks,
- Dan
On 7/20/07, Julio Arias <ju...@rbxglobal.com> wrote:
>
> I try the latest SNAPSHOT (apache-cxf-2.0.1-
> incubator-20070720.021044-2.tar.gz ) and still is not working. The
> WSDL here is not the same I put first but it has the same problem.
>
> ----------------------SEI---------------------------
>
> @WebService(
> targetNamespace = "http://client.webservice.crm.ecot.com/
> skeleton/StudentService",
> name = "StudentService"
> )
> @SOAPBinding(style = SOAPBinding.Style.RPC, use =
> SOAPBinding.Use.LITERAL)
> public interface StudentService {
>
> public StudentVO findStudent(Long id);
>
> public Map<Long, StudentVO> getStudentsMap();
>
> public List<StudentVO> getStudents(Map<String, String> filters);
>
> public List<StudentVO> getStudentsByIds(List<String> ids);
>
> }
>
> -----------Spring config-------------------------
>
>
> <bean id="aegisDatabinding"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>
>
> <bean id="userServiceImpl"
> class="com.altair.cls.web.service.crm.UserServiceImpl">
> <property name="userManager" ref="userManager"/>
> </bean>
>
> <jaxws:endpoint id="userService" address="/UserService"
> implementor="#userServiceImpl">
>
> <jaxws:serviceFactory>
> <bean
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
> <property name="dataBinding" ref="aegisDatabinding"/>
> </bean>
> </jaxws:serviceFactory>
>
> </jaxws:endpoint>
>
>
> -------------------- WSDL-------------------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions name="StudentService" targetNamespace="http://
> client.webservice.crm.ecot.com/skeleton/StudentService"
> xmlns:ns1="http://client.webservice.crm.ecot.com/skeleton/
> StudentService" xmlns:ns2="urn:com:ecot:crm:webservice:vo:student"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:types>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://
> client.webservice.crm.ecot.com/skeleton/StudentService" xmlns="http://
> www.w3.org/2001/XMLSchema">
> <complexType name="ArrayOfString">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="string"
> nillable="true" type="string"/>
> </sequence>
> </complexType>
> <complexType name="anyType2anyTypeMap">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> <complexType>
> <sequence>
> <element minOccurs="0" name="key" type="anyType"/>
> <element minOccurs="0" name="value" type="anyType"/>
>
> </sequence>
> </complexType>
> </element>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="urn:com:ecot:crm:webservice:vo:student"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="ArrayOfStudentVO">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="StudentVO"
> nillable="true" type="ns1:StudentVO"/>
> </sequence>
> </complexType>
> <complexType name="StudentVO">
> <sequence>
> <element minOccurs="0" name="SEPId" nillable="true" type="long"/>
> <element minOccurs="0" name="address" nillable="true" type="string"/>
>
> <element minOccurs="0" name="admittedDate" nillable="true"
> type="string"/>
> <element minOccurs="0" name="adultFirstName" nillable="true"
> type="string"/>
> <element minOccurs="0" name="adultLastName" nillable="true"
> type="string"/>
> <element minOccurs="0" name="birthDate" nillable="true" type="string"/>
> <element minOccurs="0" name="country" nillable="true" type="string"/>
> <element minOccurs="0" name="email" nillable="true" type="string"/>
> <element minOccurs="0" name="enrolledDate" nillable="true"
> type="string"/>
> <element minOccurs="0" name="firstName" nillable="true" type="string"/>
> <element minOccurs="0" name="gender" nillable="true" type="string"/>
> <element minOccurs="0" name="grade" nillable="true" type="string"/>
> <element minOccurs="0" name="lastName" nillable="true" type="string"/>
> <element minOccurs="0" name="phone" nillable="true" type="string"/>
> <element minOccurs="0" name="status" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> </schema>
>
> </wsdl:types>
> <wsdl:message name="findStudent">
> <wsdl:part name="arg0" type="xsd:long">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getStudentsByIdsResponse">
> <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
> </wsdl:part>
>
> </wsdl:message>
> <wsdl:message name="getStudentsByIds">
> <wsdl:part name="arg0" type="ns1:ArrayOfString">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="findStudentResponse">
> <wsdl:part name="return" type="ns2:StudentVO">
> </wsdl:part>
> </wsdl:message>
>
> <wsdl:message name="getStudentsMap">
> </wsdl:message>
> <wsdl:message name="getStudentsResponse">
> <wsdl:part name="return" type="ns2:ArrayOfStudentVO">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getStudents">
> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
>
> </wsdl:message>
> <wsdl:message name="getStudentsMapResponse">
> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="StudentService">
> <wsdl:operation name="getStudentsByIds">
> <wsdl:input message="ns1:getStudentsByIds"
> name="getStudentsByIds">
> </wsdl:input>
>
> <wsdl:output message="ns1:getStudentsByIdsResponse"
> name="getStudentsByIdsResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="findStudent">
> <wsdl:input message="ns1:findStudent" name="findStudent">
> </wsdl:input>
> <wsdl:output message="ns1:findStudentResponse"
> name="findStudentResponse">
> </wsdl:output>
> </wsdl:operation>
>
> <wsdl:operation name="getStudents">
> <wsdl:input message="ns1:getStudents" name="getStudents">
> </wsdl:input>
> <wsdl:output message="ns1:getStudentsResponse"
> name="getStudentsResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getStudentsMap">
> <wsdl:input message="ns1:getStudentsMap" name="getStudentsMap">
> </wsdl:input>
>
> <wsdl:output message="ns1:getStudentsMapResponse"
> name="getStudentsMapResponse">
> </wsdl:output>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="StudentServiceSoapBinding"
> type="ns1:StudentService">
> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> soap/http"/>
> <wsdl:operation name="getStudentsByIds">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getStudentsByIds">
>
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:input>
> <wsdl:output name="getStudentsByIdsResponse">
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="findStudent">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="findStudent">
>
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:input>
> <wsdl:output name="findStudentResponse">
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getStudents">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getStudents">
>
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:input>
> <wsdl:output name="getStudentsResponse">
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getStudentsMap">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getStudentsMap">
>
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:input>
> <wsdl:output name="getStudentsMapResponse">
> <soap:body namespace="http://client.webservice.crm.ecot.com/
> skeleton/StudentService" use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="StudentService">
> <wsdl:port binding="ns1:StudentServiceSoapBinding"
> name="StudentService">
>
> <soap:address location="http://localhost:8080/cls/services/
> StudentService"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> On Jul 20, 2007, at 8:19 AM, Dan Diephouse wrote:
>
> > Hi Julio,
> >
> > I believe I fixed this yesterday as part of CXF-811. Could you try a
> > SNAPSHOT build?
> >
> > http://incubator.apache.org/cxf/download.html
> >
> > The fixes will be part of our 2.0.1 release. Thanks,
> >
> > - Dan
> >
> > On 7/19/07, Julio Arias <ju...@rbxglobal.com> wrote:
> >>
> >> Hi Jim -
> >>
> >> I partially fix this, I change the data binding to Aegis (now the map
> >> has a type in the WSDL) but now I get a different problem with
> >> wsdl2java
> >> The WSDL looks very similar at the one generated by xFire I think
> >> there is a problem with the WSDL namespaces but I'm not sure what.
> >> This is the WSDL:
> >>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <wsdl:definitions name="MetadataService" targetNamespace="http://
> >> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
> >> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
> >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >> xmlns:wsdl="http://
> >> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
> >> XMLSchema">
> >> <wsdl:types>
> >> <schema attributeFormDefault="qualified"
> >> elementFormDefault="qualified" targetNamespace="http://
> >> metadata.core.lor.rbx.com" xmlns="http://www.w3.org/2001/XMLSchema">
> >> <simpleType name="DocumentLanguage">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="English"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentDegreeInteractivity">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="VeryLow"/>
> >> <enumeration value="Low"/>
> >> <enumeration value="Medium"/>
> >>
> >> <enumeration value="High"/>
> >> <enumeration value="VeryHigh"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentFormat">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="HTML_XHTML"/>
> >> <enumeration value="SHOWCKWAVE_FLASH"/>
> >> <enumeration value="FLASH_VIDEO"/>
> >> <enumeration value="JPEG"/>
> >> <enumeration value="GIF"/>
> >> <enumeration value="MPEG"/>
> >> <enumeration value="PDF"/>
> >> <enumeration value="MSWORD"/>
> >> <enumeration value="MSEXCEL"/>
> >> <enumeration value="MSPOWERPOINT"/>
> >>
> >> <enumeration value="XML"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentDifficulty">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="VeryLow"/>
> >> <enumeration value="Low"/>
> >> <enumeration value="Medium"/>
> >> <enumeration value="High"/>
> >> <enumeration value="VeryHigh"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentLearningResourceType">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="Excercise"/>
> >>
> >> <enumeration value="Simulation"/>
> >> <enumeration value="Questionnaire"/>
> >> <enumeration value="Diagram"/>
> >> <enumeration value="Figure"/>
> >> <enumeration value="Graph"/>
> >> <enumeration value="Index"/>
> >> <enumeration value="Slide"/>
> >> <enumeration value="Table"/>
> >> <enumeration value="NarrativeText"/>
> >> <enumeration value="Exam"/>
> >> <enumeration value="Experiment"/>
> >> <enumeration value="ProblemStatement"/>
> >> <enumeration value="SelfAssesment"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentIntendedEndUser">
> >> <restriction base="string">
> >>
> >> <enumeration value="Any"/>
> >> <enumeration value="Teacher"/>
> >> <enumeration value="Author"/>
> >> <enumeration value="Learner"/>
> >> <enumeration value="Manager"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="Context">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="PrimaryEducation"/>
> >> <enumeration value="SecondaryEducation"/>
> >> <enumeration value="HigherEducation"/>
> >> <enumeration value="UniversityFirstCycle"/>
> >> <enumeration value="UniversitySecondCycle"/>
> >> <enumeration value="UniversityPostgrade"/>
> >> <enumeration value="TechnicalSchoolFirstCycle"/>
> >>
> >> <enumeration value="TechnicalSchoolSecondCycle"/>
> >> <enumeration value="ProfessionalFormation"/>
> >> <enumeration value="ContinuousFormation"/>
> >> <enumeration value="VocationalTraining"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentStatus">
> >> <restriction base="string">
> >> <enumeration value="Any"/>
> >> <enumeration value="Draft"/>
> >> <enumeration value="Final"/>
> >> <enumeration value="Revised"/>
> >> <enumeration value="Unavailable"/>
> >> </restriction>
> >> </simpleType>
> >> <simpleType name="DocumentInteractivityType">
> >> <restriction base="string">
> >>
> >> <enumeration value="Any"/>
> >> <enumeration value="Active"/>
> >> <enumeration value="Expositive"/>
> >> <enumeration value="Mixed"/>
> >> <enumeration value="Undefined"/>
> >> </restriction>
> >> </simpleType>
> >> </schema>
> >>
> >> <schema attributeFormDefault="qualified"
> >> elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/
> >> ws/
> >> metadata" xmlns="http://www.w3.org/2001/XMLSchema">
> >> <complexType name="anyType2anyTypeMap">
> >> <sequence>
> >> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> >> <complexType>
> >> <sequence>
> >> <element minOccurs="0" name="key" type="anyType"/>
> >> <element minOccurs="0" name="value" type="anyType"/>
> >>
> >> </sequence>
> >> </complexType>
> >> </element>
> >> </sequence>
> >> </complexType>
> >> </schema>
> >>
> >> <schema attributeFormDefault="qualified"
> >> elementFormDefault="qualified"
> >> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
> >> 2001/XMLSchema" xmlns:ns0="http://util.java" xmlns:ns1="http://
> >> metadata.core.lor.rbx.com">
> >> <complexType name="User">
> >> <sequence>
> >> <element minOccurs="0" name="firstName" nillable="true"
> >> type="string"/>
> >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> >> <element minOccurs="0" name="lastName" nillable="true"
> >> type="string"/>
> >> <any maxOccurs="unbounded"/>
> >> </sequence>
> >> </complexType>
> >> <complexType name="Metadata">
> >>
> >> <sequence>
> >> <element minOccurs="0" name="ageFrom" type="int"/>
> >> <element minOccurs="0" name="ageTo" type="int"/>
> >> <element minOccurs="0" name="context" nillable="true"
> >> type="ns1:Context"/>
> >> <element minOccurs="0" name="coverage" nillable="true"
> >> type="ns3:Coverage"/>
> >> <element minOccurs="0" name="creator" nillable="true"
> >> type="ns3:User"/>
> >> <element minOccurs="0" name="degreeInteractivity" nillable="true"
> >> type="ns1:DocumentDegreeInteractivity"/>
> >> <element minOccurs="0" name="description" nillable="true"
> >> type="string"/>
> >> <element minOccurs="0" name="difficulty" nillable="true"
> >> type="ns1:DocumentDifficulty"/>
> >> <element minOccurs="0" name="format" nillable="true"
> >> type="ns1:DocumentFormat"/>
> >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> >> <element minOccurs="0" name="intendedUser" nillable="true"
> >> type="ns1:DocumentIntendedEndUser"/>
> >> <element minOccurs="0" name="interactivityType" nillable="true"
> >> type="ns1:DocumentInteractivityType"/>
> >> <element minOccurs="0" name="keywords" nillable="true"
> >> type="ns3:ArrayOfKeyword"/>
> >> <element minOccurs="0" name="language" nillable="true"
> >> type="ns1:DocumentLanguage"/>
> >> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
> >> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
> >>
> >> <element minOccurs="0" name="rating" type="int"/>
> >> <element minOccurs="0" name="resourceType" nillable="true"
> >> type="ns1:DocumentLearningResourceType"/>
> >> <element minOccurs="0" name="size" type="int"/>
> >> <element minOccurs="0" name="status" nillable="true"
> >> type="ns1:DocumentStatus"/>
> >> <element minOccurs="0" name="subject" nillable="true"
> >> type="ns3:Subject"/>
> >> <element minOccurs="0" name="title" nillable="true" type="string"/>
> >> <element minOccurs="0" name="version" nillable="true" type="string"/>
> >> <any maxOccurs="unbounded"/>
> >> </sequence>
> >> </complexType>
> >> <complexType name="Coverage">
> >> <sequence>
> >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> >> <element minOccurs="0" name="value" nillable="true" type="string"/>
> >> <any maxOccurs="unbounded"/>
> >> </sequence>
> >> </complexType>
> >>
> >> <complexType name="ArrayOfKeyword">
> >> <sequence>
> >> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
> >> nillable="true" type="ns3:Keyword"/>
> >> </sequence>
> >> </complexType>
> >> <complexType name="Subject">
> >> <sequence>
> >> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> >> <element minOccurs="0" name="value" nillable="true" type="string"/>
> >> <any maxOccurs="unbounded"/>
> >> </sequence>
> >> </complexType>
> >> </schema>
> >>
> >> <schema attributeFormDefault="qualified"
> >> elementFormDefault="qualified" targetNamespace="http://util.java"
> >> xmlns="http://www.w3.org/2001/XMLSchema">
> >> <complexType name="UUID">
> >> <sequence>
> >>
> >> <element minOccurs="0" name="leastSignificantBits" type="long"/>
> >> <element minOccurs="0" name="mostSignificantBits" type="long"/>
> >> </sequence>
> >> </complexType>
> >> </schema>
> >>
> >> </wsdl:types>
> >> <wsdl:message name="updateMetadata">
> >> <wsdl:part name="metadata" type="ns2:Metadata">
> >> </wsdl:part>
> >> </wsdl:message>
> >> <wsdl:message name="getMap">
> >>
> >> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> >> </wsdl:part>
> >> </wsdl:message>
> >> <wsdl:message name="getDocumentMetadata">
> >> <wsdl:part name="documentID" type="ns3:UUID">
> >> </wsdl:part>
> >> </wsdl:message>
> >> <wsdl:message name="updateMetadataResponse">
> >> </wsdl:message>
> >>
> >> <wsdl:message name="getMapResponse">
> >> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> >> </wsdl:part>
> >> </wsdl:message>
> >> <wsdl:message name="getDocumentMetadataResponse">
> >> <wsdl:part name="metadata" type="ns2:Metadata">
> >> </wsdl:part>
> >> </wsdl:message>
> >> <wsdl:portType name="MetadataService">
> >>
> >> <wsdl:operation name="updateMetadata">
> >> <wsdl:input message="ns1:updateMetadata"
> >> name="updateMetadata">
> >> </wsdl:input>
> >> <wsdl:output message="ns1:updateMetadataResponse"
> >> name="updateMetadataResponse">
> >> </wsdl:output>
> >> </wsdl:operation>
> >> <wsdl:operation name="getDocumentMetadata">
> >> <wsdl:input message="ns1:getDocumentMetadata"
> >> name="getDocumentMetadata">
> >> </wsdl:input>
> >>
> >> <wsdl:output message="ns1:getDocumentMetadataResponse"
> >> name="getDocumentMetadataResponse">
> >> </wsdl:output>
> >> </wsdl:operation>
> >> <wsdl:operation name="getMap">
> >> <wsdl:input message="ns1:getMap" name="getMap">
> >> </wsdl:input>
> >> <wsdl:output message="ns1:getMapResponse"
> >> name="getMapResponse">
> >> </wsdl:output>
> >> </wsdl:operation>
> >>
> >> </wsdl:portType>
> >> <wsdl:binding name="MetadataServiceSoapBinding"
> >> type="ns1:MetadataService">
> >> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> >> soap/http"/>
> >> <wsdl:operation name="updateMetadata">
> >> <soap:operation soapAction="" style="rpc"/>
> >> <wsdl:input name="updateMetadata">
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:input>
> >> <wsdl:output name="updateMetadataResponse">
> >>
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:output>
> >> </wsdl:operation>
> >> <wsdl:operation name="getDocumentMetadata">
> >> <soap:operation soapAction="" style="rpc"/>
> >> <wsdl:input name="getDocumentMetadata">
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:input>
> >> <wsdl:output name="getDocumentMetadataResponse">
> >>
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:output>
> >> </wsdl:operation>
> >> <wsdl:operation name="getMap">
> >> <soap:operation soapAction="" style="rpc"/>
> >> <wsdl:input name="getMap">
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:input>
> >> <wsdl:output name="getMapResponse">
> >>
> >> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> >> use="literal"/>
> >> </wsdl:output>
> >> </wsdl:operation>
> >> </wsdl:binding>
> >> <wsdl:service name="MetadataService">
> >> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
> >> name="MetadataServiceImplPort">
> >> <soap:address location="http://localhost:8080/lor/services/
> >> MetadataService"/>
> >> </wsdl:port>
> >> </wsdl:service>
> >>
> >> </wsdl:definitions>
> >>
> >> And this is the error:
> >>
> >> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
> >> 'ns3:Coverage'
> >>
> >> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
> >> simple or complex type 'ns3:Coverage'
> >> at
> >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.er
> >> ror
> >> (JAXBBindErrorListener.java:34)
> >> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> >> (SchemaCompilerImpl.java:245)
> >> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
> >> (ErrorReceiverFilter.java:61)
> >> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
> >> (ParserContext.java:188)
> >> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> >> (ParserContext.java:166)
> >> at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
> >> (NGCCRuntimeEx.java:103)
> >> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> >> (DelayedRef.java:91)
> >> at com.sun.xml.xsom.impl.parser.DelayedRef.run
> >> (DelayedRef.java:66)
> >> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
> >> (ParserContext.java:126)
> >> at com.sun.xml.xsom.parser.XSOMParser.getResult
> >> (XSOMParser.java:172)
> >> at com.sun.tools.xjc.ModelLoader.createXSOM
> >> (ModelLoader.java:
> >> 488)
> >> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> >> (SchemaCompilerImpl.java:197)
> >> at
> >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initiali
> >> ze(
> >> JAXBDataBinding.java:123)
> >> at
> >> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
> >> (JAXBDataBinding.java:163)
> >> at
> >> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
> >> (WSDLToJavaContainer.java:483)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:168)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:215)
> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> >> (ToolRunner.java:84)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> >> (WSDLToJava.java:102)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> >> (WSDLToJava.java:171)
> >> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
> >> type 'ns3:Coverage'
> >> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> >> (ParserContext.java:162)
> >> ... 15 more
> >>
> >>
> >> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
> >>
> >> > Hi ,
> >> > The generated wsdl seems invalid**. Can you also paste the wsdl you
> >> > generated?
> >> > Cheers
> >> >
> >> > Jim
> >> >
> >> > Julio Arias wrote:
> >> >> Hi -
> >> >>
> >> >> I have the following web method, we are using JAXB binding but the
> >> >> WSDL generator doesn't create a complex type for the returning(or
> >> >> param) map thus wsdl2java blows up with the following exception
> >> >> (see below). Xfire use to create a complex type in the WSDL for
> >> >> this. Do I need a special annotation?
> >> >>
> >> >> @WebMethod
> >> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
> >> >>
> >> >>
> >> ---------------------------------------------------------------------
> >> >> ----------------
> >> >>
> >> >> WSDLToJava Error : java.lang.NullPointerException
> >> >>
> >> >> org.apache.cxf.tools.common.ToolException:
> >> >> java.lang.NullPointerException
> >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> >> (WSDLToJavaContainer.java:223)
> >> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> >> >> (ToolRunner.java:84)
> >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> >> >> (WSDLToJava.java:102)
> >> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> >> >> (WSDLToJava.java:171)
> >> >> Caused by: java.lang.NullPointerException
> >> >> at
> >> >> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
> >> >> (XmlSchemaCollection.java:372)
> >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
> >> >> (WSDLServiceBuilder.java:775)
> >> >> at
> >> >> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
> >> >> (WSDLServiceBuilder.java:578)
> >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
> >> >> (WSDLServiceBuilder.java:561)
> >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> >> (WSDLServiceBuilder.java:251)
> >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> >> (WSDLServiceBuilder.java:154)
> >> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> >> (WSDLServiceBuilder.java:143)
> >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> >> (WSDLToJavaContainer.java:142)
> >> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> >> (WSDLToJavaContainer.java:215)
> >> >> ... 3 more
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Julio Arias
> >> >> Java Developer
> >> >> Roundbox Global : enterprise : technology : genius
> >> >>
> >> ---------------------------------------------------------------------
> >> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> >> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> >> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> >> >>
> >> ---------------------------------------------------------------------
> >> >>
> >> >>
> >>
> >>
> >>
> >>
> >> Julio Arias
> >> Java Developer
> >> Roundbox Global : enterprise : technology : genius
> >> ---------------------------------------------------------------------
> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> >> ---------------------------------------------------------------------
> >>
> >>
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
>
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog
Re: Returning a java map
Posted by Julio Arias <ju...@rbxglobal.com>.
I try the latest SNAPSHOT (apache-cxf-2.0.1-
incubator-20070720.021044-2.tar.gz ) and still is not working. The
WSDL here is not the same I put first but it has the same problem.
----------------------SEI---------------------------
@WebService(
targetNamespace = "http://client.webservice.crm.ecot.com/
skeleton/StudentService",
name = "StudentService"
)
@SOAPBinding(style = SOAPBinding.Style.RPC, use =
SOAPBinding.Use.LITERAL)
public interface StudentService {
public StudentVO findStudent(Long id);
public Map<Long, StudentVO> getStudentsMap();
public List<StudentVO> getStudents(Map<String, String> filters);
public List<StudentVO> getStudentsByIds(List<String> ids);
}
-----------Spring config-------------------------
<bean id="aegisDatabinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
<bean id="userServiceImpl"
class="com.altair.cls.web.service.crm.UserServiceImpl">
<property name="userManager" ref="userManager"/>
</bean>
<jaxws:endpoint id="userService" address="/UserService"
implementor="#userServiceImpl">
<jaxws:serviceFactory>
<bean
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="dataBinding" ref="aegisDatabinding"/>
</bean>
</jaxws:serviceFactory>
</jaxws:endpoint>
-------------------- WSDL-------------------------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="StudentService" targetNamespace="http://
client.webservice.crm.ecot.com/skeleton/StudentService"
xmlns:ns1="http://client.webservice.crm.ecot.com/skeleton/
StudentService" xmlns:ns2="urn:com:ecot:crm:webservice:vo:student"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://
client.webservice.crm.ecot.com/skeleton/StudentService" xmlns="http://
www.w3.org/2001/XMLSchema">
<complexType name="ArrayOfString">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="string"
nillable="true" type="string"/>
</sequence>
</complexType>
<complexType name="anyType2anyTypeMap">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="entry">
<complexType>
<sequence>
<element minOccurs="0" name="key" type="anyType"/>
<element minOccurs="0" name="value" type="anyType"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</schema>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="urn:com:ecot:crm:webservice:vo:student"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="ArrayOfStudentVO">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="StudentVO"
nillable="true" type="ns1:StudentVO"/>
</sequence>
</complexType>
<complexType name="StudentVO">
<sequence>
<element minOccurs="0" name="SEPId" nillable="true" type="long"/>
<element minOccurs="0" name="address" nillable="true" type="string"/>
<element minOccurs="0" name="admittedDate" nillable="true"
type="string"/>
<element minOccurs="0" name="adultFirstName" nillable="true"
type="string"/>
<element minOccurs="0" name="adultLastName" nillable="true"
type="string"/>
<element minOccurs="0" name="birthDate" nillable="true" type="string"/>
<element minOccurs="0" name="country" nillable="true" type="string"/>
<element minOccurs="0" name="email" nillable="true" type="string"/>
<element minOccurs="0" name="enrolledDate" nillable="true"
type="string"/>
<element minOccurs="0" name="firstName" nillable="true" type="string"/>
<element minOccurs="0" name="gender" nillable="true" type="string"/>
<element minOccurs="0" name="grade" nillable="true" type="string"/>
<element minOccurs="0" name="lastName" nillable="true" type="string"/>
<element minOccurs="0" name="phone" nillable="true" type="string"/>
<element minOccurs="0" name="status" nillable="true" type="string"/>
<any maxOccurs="unbounded"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="findStudent">
<wsdl:part name="arg0" type="xsd:long">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getStudentsByIdsResponse">
<wsdl:part name="return" type="ns2:ArrayOfStudentVO">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getStudentsByIds">
<wsdl:part name="arg0" type="ns1:ArrayOfString">
</wsdl:part>
</wsdl:message>
<wsdl:message name="findStudentResponse">
<wsdl:part name="return" type="ns2:StudentVO">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getStudentsMap">
</wsdl:message>
<wsdl:message name="getStudentsResponse">
<wsdl:part name="return" type="ns2:ArrayOfStudentVO">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getStudents">
<wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getStudentsMapResponse">
<wsdl:part name="return" type="ns1:anyType2anyTypeMap">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="StudentService">
<wsdl:operation name="getStudentsByIds">
<wsdl:input message="ns1:getStudentsByIds"
name="getStudentsByIds">
</wsdl:input>
<wsdl:output message="ns1:getStudentsByIdsResponse"
name="getStudentsByIdsResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findStudent">
<wsdl:input message="ns1:findStudent" name="findStudent">
</wsdl:input>
<wsdl:output message="ns1:findStudentResponse"
name="findStudentResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getStudents">
<wsdl:input message="ns1:getStudents" name="getStudents">
</wsdl:input>
<wsdl:output message="ns1:getStudentsResponse"
name="getStudentsResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getStudentsMap">
<wsdl:input message="ns1:getStudentsMap" name="getStudentsMap">
</wsdl:input>
<wsdl:output message="ns1:getStudentsMapResponse"
name="getStudentsMapResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="StudentServiceSoapBinding"
type="ns1:StudentService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
soap/http"/>
<wsdl:operation name="getStudentsByIds">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="getStudentsByIds">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:input>
<wsdl:output name="getStudentsByIdsResponse">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findStudent">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="findStudent">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:input>
<wsdl:output name="findStudentResponse">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getStudents">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="getStudents">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:input>
<wsdl:output name="getStudentsResponse">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getStudentsMap">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="getStudentsMap">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:input>
<wsdl:output name="getStudentsMapResponse">
<soap:body namespace="http://client.webservice.crm.ecot.com/
skeleton/StudentService" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="StudentService">
<wsdl:port binding="ns1:StudentServiceSoapBinding"
name="StudentService">
<soap:address location="http://localhost:8080/cls/services/
StudentService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
On Jul 20, 2007, at 8:19 AM, Dan Diephouse wrote:
> Hi Julio,
>
> I believe I fixed this yesterday as part of CXF-811. Could you try a
> SNAPSHOT build?
>
> http://incubator.apache.org/cxf/download.html
>
> The fixes will be part of our 2.0.1 release. Thanks,
>
> - Dan
>
> On 7/19/07, Julio Arias <ju...@rbxglobal.com> wrote:
>>
>> Hi Jim -
>>
>> I partially fix this, I change the data binding to Aegis (now the map
>> has a type in the WSDL) but now I get a different problem with
>> wsdl2java
>> The WSDL looks very similar at the one generated by xFire I think
>> there is a problem with the WSDL namespaces but I'm not sure what.
>> This is the WSDL:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <wsdl:definitions name="MetadataService" targetNamespace="http://
>> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
>> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:wsdl="http://
>> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
>> XMLSchema">
>> <wsdl:types>
>> <schema attributeFormDefault="qualified"
>> elementFormDefault="qualified" targetNamespace="http://
>> metadata.core.lor.rbx.com" xmlns="http://www.w3.org/2001/XMLSchema">
>> <simpleType name="DocumentLanguage">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="English"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentDegreeInteractivity">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="VeryLow"/>
>> <enumeration value="Low"/>
>> <enumeration value="Medium"/>
>>
>> <enumeration value="High"/>
>> <enumeration value="VeryHigh"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentFormat">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="HTML_XHTML"/>
>> <enumeration value="SHOWCKWAVE_FLASH"/>
>> <enumeration value="FLASH_VIDEO"/>
>> <enumeration value="JPEG"/>
>> <enumeration value="GIF"/>
>> <enumeration value="MPEG"/>
>> <enumeration value="PDF"/>
>> <enumeration value="MSWORD"/>
>> <enumeration value="MSEXCEL"/>
>> <enumeration value="MSPOWERPOINT"/>
>>
>> <enumeration value="XML"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentDifficulty">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="VeryLow"/>
>> <enumeration value="Low"/>
>> <enumeration value="Medium"/>
>> <enumeration value="High"/>
>> <enumeration value="VeryHigh"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentLearningResourceType">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="Excercise"/>
>>
>> <enumeration value="Simulation"/>
>> <enumeration value="Questionnaire"/>
>> <enumeration value="Diagram"/>
>> <enumeration value="Figure"/>
>> <enumeration value="Graph"/>
>> <enumeration value="Index"/>
>> <enumeration value="Slide"/>
>> <enumeration value="Table"/>
>> <enumeration value="NarrativeText"/>
>> <enumeration value="Exam"/>
>> <enumeration value="Experiment"/>
>> <enumeration value="ProblemStatement"/>
>> <enumeration value="SelfAssesment"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentIntendedEndUser">
>> <restriction base="string">
>>
>> <enumeration value="Any"/>
>> <enumeration value="Teacher"/>
>> <enumeration value="Author"/>
>> <enumeration value="Learner"/>
>> <enumeration value="Manager"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="Context">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="PrimaryEducation"/>
>> <enumeration value="SecondaryEducation"/>
>> <enumeration value="HigherEducation"/>
>> <enumeration value="UniversityFirstCycle"/>
>> <enumeration value="UniversitySecondCycle"/>
>> <enumeration value="UniversityPostgrade"/>
>> <enumeration value="TechnicalSchoolFirstCycle"/>
>>
>> <enumeration value="TechnicalSchoolSecondCycle"/>
>> <enumeration value="ProfessionalFormation"/>
>> <enumeration value="ContinuousFormation"/>
>> <enumeration value="VocationalTraining"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentStatus">
>> <restriction base="string">
>> <enumeration value="Any"/>
>> <enumeration value="Draft"/>
>> <enumeration value="Final"/>
>> <enumeration value="Revised"/>
>> <enumeration value="Unavailable"/>
>> </restriction>
>> </simpleType>
>> <simpleType name="DocumentInteractivityType">
>> <restriction base="string">
>>
>> <enumeration value="Any"/>
>> <enumeration value="Active"/>
>> <enumeration value="Expositive"/>
>> <enumeration value="Mixed"/>
>> <enumeration value="Undefined"/>
>> </restriction>
>> </simpleType>
>> </schema>
>>
>> <schema attributeFormDefault="qualified"
>> elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/
>> ws/
>> metadata" xmlns="http://www.w3.org/2001/XMLSchema">
>> <complexType name="anyType2anyTypeMap">
>> <sequence>
>> <element maxOccurs="unbounded" minOccurs="0" name="entry">
>> <complexType>
>> <sequence>
>> <element minOccurs="0" name="key" type="anyType"/>
>> <element minOccurs="0" name="value" type="anyType"/>
>>
>> </sequence>
>> </complexType>
>> </element>
>> </sequence>
>> </complexType>
>> </schema>
>>
>> <schema attributeFormDefault="qualified"
>> elementFormDefault="qualified"
>> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
>> 2001/XMLSchema" xmlns:ns0="http://util.java" xmlns:ns1="http://
>> metadata.core.lor.rbx.com">
>> <complexType name="User">
>> <sequence>
>> <element minOccurs="0" name="firstName" nillable="true"
>> type="string"/>
>> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
>> <element minOccurs="0" name="lastName" nillable="true"
>> type="string"/>
>> <any maxOccurs="unbounded"/>
>> </sequence>
>> </complexType>
>> <complexType name="Metadata">
>>
>> <sequence>
>> <element minOccurs="0" name="ageFrom" type="int"/>
>> <element minOccurs="0" name="ageTo" type="int"/>
>> <element minOccurs="0" name="context" nillable="true"
>> type="ns1:Context"/>
>> <element minOccurs="0" name="coverage" nillable="true"
>> type="ns3:Coverage"/>
>> <element minOccurs="0" name="creator" nillable="true"
>> type="ns3:User"/>
>> <element minOccurs="0" name="degreeInteractivity" nillable="true"
>> type="ns1:DocumentDegreeInteractivity"/>
>> <element minOccurs="0" name="description" nillable="true"
>> type="string"/>
>> <element minOccurs="0" name="difficulty" nillable="true"
>> type="ns1:DocumentDifficulty"/>
>> <element minOccurs="0" name="format" nillable="true"
>> type="ns1:DocumentFormat"/>
>> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
>> <element minOccurs="0" name="intendedUser" nillable="true"
>> type="ns1:DocumentIntendedEndUser"/>
>> <element minOccurs="0" name="interactivityType" nillable="true"
>> type="ns1:DocumentInteractivityType"/>
>> <element minOccurs="0" name="keywords" nillable="true"
>> type="ns3:ArrayOfKeyword"/>
>> <element minOccurs="0" name="language" nillable="true"
>> type="ns1:DocumentLanguage"/>
>> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
>> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
>>
>> <element minOccurs="0" name="rating" type="int"/>
>> <element minOccurs="0" name="resourceType" nillable="true"
>> type="ns1:DocumentLearningResourceType"/>
>> <element minOccurs="0" name="size" type="int"/>
>> <element minOccurs="0" name="status" nillable="true"
>> type="ns1:DocumentStatus"/>
>> <element minOccurs="0" name="subject" nillable="true"
>> type="ns3:Subject"/>
>> <element minOccurs="0" name="title" nillable="true" type="string"/>
>> <element minOccurs="0" name="version" nillable="true" type="string"/>
>> <any maxOccurs="unbounded"/>
>> </sequence>
>> </complexType>
>> <complexType name="Coverage">
>> <sequence>
>> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
>> <element minOccurs="0" name="value" nillable="true" type="string"/>
>> <any maxOccurs="unbounded"/>
>> </sequence>
>> </complexType>
>>
>> <complexType name="ArrayOfKeyword">
>> <sequence>
>> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
>> nillable="true" type="ns3:Keyword"/>
>> </sequence>
>> </complexType>
>> <complexType name="Subject">
>> <sequence>
>> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
>> <element minOccurs="0" name="value" nillable="true" type="string"/>
>> <any maxOccurs="unbounded"/>
>> </sequence>
>> </complexType>
>> </schema>
>>
>> <schema attributeFormDefault="qualified"
>> elementFormDefault="qualified" targetNamespace="http://util.java"
>> xmlns="http://www.w3.org/2001/XMLSchema">
>> <complexType name="UUID">
>> <sequence>
>>
>> <element minOccurs="0" name="leastSignificantBits" type="long"/>
>> <element minOccurs="0" name="mostSignificantBits" type="long"/>
>> </sequence>
>> </complexType>
>> </schema>
>>
>> </wsdl:types>
>> <wsdl:message name="updateMetadata">
>> <wsdl:part name="metadata" type="ns2:Metadata">
>> </wsdl:part>
>> </wsdl:message>
>> <wsdl:message name="getMap">
>>
>> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
>> </wsdl:part>
>> </wsdl:message>
>> <wsdl:message name="getDocumentMetadata">
>> <wsdl:part name="documentID" type="ns3:UUID">
>> </wsdl:part>
>> </wsdl:message>
>> <wsdl:message name="updateMetadataResponse">
>> </wsdl:message>
>>
>> <wsdl:message name="getMapResponse">
>> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
>> </wsdl:part>
>> </wsdl:message>
>> <wsdl:message name="getDocumentMetadataResponse">
>> <wsdl:part name="metadata" type="ns2:Metadata">
>> </wsdl:part>
>> </wsdl:message>
>> <wsdl:portType name="MetadataService">
>>
>> <wsdl:operation name="updateMetadata">
>> <wsdl:input message="ns1:updateMetadata"
>> name="updateMetadata">
>> </wsdl:input>
>> <wsdl:output message="ns1:updateMetadataResponse"
>> name="updateMetadataResponse">
>> </wsdl:output>
>> </wsdl:operation>
>> <wsdl:operation name="getDocumentMetadata">
>> <wsdl:input message="ns1:getDocumentMetadata"
>> name="getDocumentMetadata">
>> </wsdl:input>
>>
>> <wsdl:output message="ns1:getDocumentMetadataResponse"
>> name="getDocumentMetadataResponse">
>> </wsdl:output>
>> </wsdl:operation>
>> <wsdl:operation name="getMap">
>> <wsdl:input message="ns1:getMap" name="getMap">
>> </wsdl:input>
>> <wsdl:output message="ns1:getMapResponse"
>> name="getMapResponse">
>> </wsdl:output>
>> </wsdl:operation>
>>
>> </wsdl:portType>
>> <wsdl:binding name="MetadataServiceSoapBinding"
>> type="ns1:MetadataService">
>> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
>> soap/http"/>
>> <wsdl:operation name="updateMetadata">
>> <soap:operation soapAction="" style="rpc"/>
>> <wsdl:input name="updateMetadata">
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:input>
>> <wsdl:output name="updateMetadataResponse">
>>
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:output>
>> </wsdl:operation>
>> <wsdl:operation name="getDocumentMetadata">
>> <soap:operation soapAction="" style="rpc"/>
>> <wsdl:input name="getDocumentMetadata">
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:input>
>> <wsdl:output name="getDocumentMetadataResponse">
>>
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:output>
>> </wsdl:operation>
>> <wsdl:operation name="getMap">
>> <soap:operation soapAction="" style="rpc"/>
>> <wsdl:input name="getMap">
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:input>
>> <wsdl:output name="getMapResponse">
>>
>> <soap:body namespace="http://lor.rbx.com/ws/metadata"
>> use="literal"/>
>> </wsdl:output>
>> </wsdl:operation>
>> </wsdl:binding>
>> <wsdl:service name="MetadataService">
>> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
>> name="MetadataServiceImplPort">
>> <soap:address location="http://localhost:8080/lor/services/
>> MetadataService"/>
>> </wsdl:port>
>> </wsdl:service>
>>
>> </wsdl:definitions>
>>
>> And this is the error:
>>
>> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
>> 'ns3:Coverage'
>>
>> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
>> simple or complex type 'ns3:Coverage'
>> at
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.er
>> ror
>> (JAXBBindErrorListener.java:34)
>> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
>> (SchemaCompilerImpl.java:245)
>> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
>> (ErrorReceiverFilter.java:61)
>> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
>> (ParserContext.java:188)
>> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
>> (ParserContext.java:166)
>> at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
>> (NGCCRuntimeEx.java:103)
>> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
>> (DelayedRef.java:91)
>> at com.sun.xml.xsom.impl.parser.DelayedRef.run
>> (DelayedRef.java:66)
>> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
>> (ParserContext.java:126)
>> at com.sun.xml.xsom.parser.XSOMParser.getResult
>> (XSOMParser.java:172)
>> at com.sun.tools.xjc.ModelLoader.createXSOM
>> (ModelLoader.java:
>> 488)
>> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
>> (SchemaCompilerImpl.java:197)
>> at
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initiali
>> ze(
>> JAXBDataBinding.java:123)
>> at
>> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
>> (JAXBDataBinding.java:163)
>> at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
>> (WSDLToJavaContainer.java:483)
>> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> (WSDLToJavaContainer.java:168)
>> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> (WSDLToJavaContainer.java:215)
>> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
>> (ToolRunner.java:84)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
>> (WSDLToJava.java:102)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
>> (WSDLToJava.java:171)
>> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
>> type 'ns3:Coverage'
>> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
>> (ParserContext.java:162)
>> ... 15 more
>>
>>
>> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
>>
>> > Hi ,
>> > The generated wsdl seems invalid**. Can you also paste the wsdl you
>> > generated?
>> > Cheers
>> >
>> > Jim
>> >
>> > Julio Arias wrote:
>> >> Hi -
>> >>
>> >> I have the following web method, we are using JAXB binding but the
>> >> WSDL generator doesn't create a complex type for the returning(or
>> >> param) map thus wsdl2java blows up with the following exception
>> >> (see below). Xfire use to create a complex type in the WSDL for
>> >> this. Do I need a special annotation?
>> >>
>> >> @WebMethod
>> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> ----------------
>> >>
>> >> WSDLToJava Error : java.lang.NullPointerException
>> >>
>> >> org.apache.cxf.tools.common.ToolException:
>> >> java.lang.NullPointerException
>> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> >> (WSDLToJavaContainer.java:223)
>> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
>> >> (ToolRunner.java:84)
>> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
>> >> (WSDLToJava.java:102)
>> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
>> >> (WSDLToJava.java:171)
>> >> Caused by: java.lang.NullPointerException
>> >> at
>> >> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
>> >> (XmlSchemaCollection.java:372)
>> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
>> >> (WSDLServiceBuilder.java:775)
>> >> at
>> >> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
>> >> (WSDLServiceBuilder.java:578)
>> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
>> >> (WSDLServiceBuilder.java:561)
>> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> >> (WSDLServiceBuilder.java:251)
>> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> >> (WSDLServiceBuilder.java:154)
>> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> >> (WSDLServiceBuilder.java:143)
>> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> >> (WSDLToJavaContainer.java:142)
>> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> >> (WSDLToJavaContainer.java:215)
>> >> ... 3 more
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Julio Arias
>> >> Java Developer
>> >> Roundbox Global : enterprise : technology : genius
>> >>
>> ---------------------------------------------------------------------
>> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> >>
>> ---------------------------------------------------------------------
>> >>
>> >>
>>
>>
>>
>>
>> Julio Arias
>> Java Developer
>> Roundbox Global : enterprise : technology : genius
>> ---------------------------------------------------------------------
>> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> ---------------------------------------------------------------------
>>
>>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------
Re: Returning a java map
Posted by Dan Diephouse <da...@envoisolutions.com>.
Hi Julio,
I believe I fixed this yesterday as part of CXF-811. Could you try a
SNAPSHOT build?
http://incubator.apache.org/cxf/download.html
The fixes will be part of our 2.0.1 release. Thanks,
- Dan
On 7/19/07, Julio Arias <ju...@rbxglobal.com> wrote:
>
> Hi Jim -
>
> I partially fix this, I change the data binding to Aegis (now the map
> has a type in the WSDL) but now I get a different problem with wsdl2java
> The WSDL looks very similar at the one generated by xFire I think
> there is a problem with the WSDL namespaces but I'm not sure what.
> This is the WSDL:
>
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions name="MetadataService" targetNamespace="http://
> lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
> xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
> schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:types>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://
> metadata.core.lor.rbx.com" xmlns="http://www.w3.org/2001/XMLSchema">
> <simpleType name="DocumentLanguage">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="English"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDegreeInteractivity">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentFormat">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="HTML_XHTML"/>
> <enumeration value="SHOWCKWAVE_FLASH"/>
> <enumeration value="FLASH_VIDEO"/>
> <enumeration value="JPEG"/>
> <enumeration value="GIF"/>
> <enumeration value="MPEG"/>
> <enumeration value="PDF"/>
> <enumeration value="MSWORD"/>
> <enumeration value="MSEXCEL"/>
> <enumeration value="MSPOWERPOINT"/>
>
> <enumeration value="XML"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentDifficulty">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="VeryLow"/>
> <enumeration value="Low"/>
> <enumeration value="Medium"/>
> <enumeration value="High"/>
> <enumeration value="VeryHigh"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentLearningResourceType">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Excercise"/>
>
> <enumeration value="Simulation"/>
> <enumeration value="Questionnaire"/>
> <enumeration value="Diagram"/>
> <enumeration value="Figure"/>
> <enumeration value="Graph"/>
> <enumeration value="Index"/>
> <enumeration value="Slide"/>
> <enumeration value="Table"/>
> <enumeration value="NarrativeText"/>
> <enumeration value="Exam"/>
> <enumeration value="Experiment"/>
> <enumeration value="ProblemStatement"/>
> <enumeration value="SelfAssesment"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentIntendedEndUser">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Teacher"/>
> <enumeration value="Author"/>
> <enumeration value="Learner"/>
> <enumeration value="Manager"/>
> </restriction>
> </simpleType>
> <simpleType name="Context">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="PrimaryEducation"/>
> <enumeration value="SecondaryEducation"/>
> <enumeration value="HigherEducation"/>
> <enumeration value="UniversityFirstCycle"/>
> <enumeration value="UniversitySecondCycle"/>
> <enumeration value="UniversityPostgrade"/>
> <enumeration value="TechnicalSchoolFirstCycle"/>
>
> <enumeration value="TechnicalSchoolSecondCycle"/>
> <enumeration value="ProfessionalFormation"/>
> <enumeration value="ContinuousFormation"/>
> <enumeration value="VocationalTraining"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentStatus">
> <restriction base="string">
> <enumeration value="Any"/>
> <enumeration value="Draft"/>
> <enumeration value="Final"/>
> <enumeration value="Revised"/>
> <enumeration value="Unavailable"/>
> </restriction>
> </simpleType>
> <simpleType name="DocumentInteractivityType">
> <restriction base="string">
>
> <enumeration value="Any"/>
> <enumeration value="Active"/>
> <enumeration value="Expositive"/>
> <enumeration value="Mixed"/>
> <enumeration value="Undefined"/>
> </restriction>
> </simpleType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/ws/
> metadata" xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="anyType2anyTypeMap">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="entry">
> <complexType>
> <sequence>
> <element minOccurs="0" name="key" type="anyType"/>
> <element minOccurs="0" name="value" type="anyType"/>
>
> </sequence>
> </complexType>
> </element>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
> 2001/XMLSchema" xmlns:ns0="http://util.java" xmlns:ns1="http://
> metadata.core.lor.rbx.com">
> <complexType name="User">
> <sequence>
> <element minOccurs="0" name="firstName" nillable="true" type="string"/>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="lastName" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Metadata">
>
> <sequence>
> <element minOccurs="0" name="ageFrom" type="int"/>
> <element minOccurs="0" name="ageTo" type="int"/>
> <element minOccurs="0" name="context" nillable="true"
> type="ns1:Context"/>
> <element minOccurs="0" name="coverage" nillable="true"
> type="ns3:Coverage"/>
> <element minOccurs="0" name="creator" nillable="true" type="ns3:User"/>
> <element minOccurs="0" name="degreeInteractivity" nillable="true"
> type="ns1:DocumentDegreeInteractivity"/>
> <element minOccurs="0" name="description" nillable="true"
> type="string"/>
> <element minOccurs="0" name="difficulty" nillable="true"
> type="ns1:DocumentDifficulty"/>
> <element minOccurs="0" name="format" nillable="true"
> type="ns1:DocumentFormat"/>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="intendedUser" nillable="true"
> type="ns1:DocumentIntendedEndUser"/>
> <element minOccurs="0" name="interactivityType" nillable="true"
> type="ns1:DocumentInteractivityType"/>
> <element minOccurs="0" name="keywords" nillable="true"
> type="ns3:ArrayOfKeyword"/>
> <element minOccurs="0" name="language" nillable="true"
> type="ns1:DocumentLanguage"/>
> <element minOccurs="0" name="lastUpdate" type="dateTime"/>
> <element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
>
> <element minOccurs="0" name="rating" type="int"/>
> <element minOccurs="0" name="resourceType" nillable="true"
> type="ns1:DocumentLearningResourceType"/>
> <element minOccurs="0" name="size" type="int"/>
> <element minOccurs="0" name="status" nillable="true"
> type="ns1:DocumentStatus"/>
> <element minOccurs="0" name="subject" nillable="true"
> type="ns3:Subject"/>
> <element minOccurs="0" name="title" nillable="true" type="string"/>
> <element minOccurs="0" name="version" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <complexType name="Coverage">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
>
> <complexType name="ArrayOfKeyword">
> <sequence>
> <element maxOccurs="unbounded" minOccurs="0" name="Keyword"
> nillable="true" type="ns3:Keyword"/>
> </sequence>
> </complexType>
> <complexType name="Subject">
> <sequence>
> <element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
> <element minOccurs="0" name="value" nillable="true" type="string"/>
> <any maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> </schema>
>
> <schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://util.java"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <complexType name="UUID">
> <sequence>
>
> <element minOccurs="0" name="leastSignificantBits" type="long"/>
> <element minOccurs="0" name="mostSignificantBits" type="long"/>
> </sequence>
> </complexType>
> </schema>
>
> </wsdl:types>
> <wsdl:message name="updateMetadata">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getMap">
>
> <wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadata">
> <wsdl:part name="documentID" type="ns3:UUID">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="updateMetadataResponse">
> </wsdl:message>
>
> <wsdl:message name="getMapResponse">
> <wsdl:part name="return" type="ns1:anyType2anyTypeMap">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="getDocumentMetadataResponse">
> <wsdl:part name="metadata" type="ns2:Metadata">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="MetadataService">
>
> <wsdl:operation name="updateMetadata">
> <wsdl:input message="ns1:updateMetadata" name="updateMetadata">
> </wsdl:input>
> <wsdl:output message="ns1:updateMetadataResponse"
> name="updateMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <wsdl:input message="ns1:getDocumentMetadata"
> name="getDocumentMetadata">
> </wsdl:input>
>
> <wsdl:output message="ns1:getDocumentMetadataResponse"
> name="getDocumentMetadataResponse">
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <wsdl:input message="ns1:getMap" name="getMap">
> </wsdl:input>
> <wsdl:output message="ns1:getMapResponse" name="getMapResponse">
> </wsdl:output>
> </wsdl:operation>
>
> </wsdl:portType>
> <wsdl:binding name="MetadataServiceSoapBinding"
> type="ns1:MetadataService">
> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
> soap/http"/>
> <wsdl:operation name="updateMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="updateMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="updateMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getDocumentMetadata">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getDocumentMetadata">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getDocumentMetadataResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> <wsdl:operation name="getMap">
> <soap:operation soapAction="" style="rpc"/>
> <wsdl:input name="getMap">
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getMapResponse">
>
> <soap:body namespace="http://lor.rbx.com/ws/metadata"
> use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="MetadataService">
> <wsdl:port binding="ns1:MetadataServiceSoapBinding"
> name="MetadataServiceImplPort">
> <soap:address location="http://localhost:8080/lor/services/
> MetadataService"/>
> </wsdl:port>
> </wsdl:service>
>
> </wsdl:definitions>
>
> And this is the error:
>
> WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
> 'ns3:Coverage'
>
> org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
> simple or complex type 'ns3:Coverage'
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error
> (JAXBBindErrorListener.java:34)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> (SchemaCompilerImpl.java:245)
> at com.sun.tools.xjc.util.ErrorReceiverFilter.error
> (ErrorReceiverFilter.java:61)
> at com.sun.xml.xsom.impl.parser.ParserContext$2.error
> (ParserContext.java:188)
> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> (ParserContext.java:166)
> at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
> (NGCCRuntimeEx.java:103)
> at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> (DelayedRef.java:91)
> at com.sun.xml.xsom.impl.parser.DelayedRef.run
> (DelayedRef.java:66)
> at com.sun.xml.xsom.impl.parser.ParserContext.getResult
> (ParserContext.java:126)
> at com.sun.xml.xsom.parser.XSOMParser.getResult
> (XSOMParser.java:172)
> at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:
> 488)
> at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> (SchemaCompilerImpl.java:197)
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(
> JAXBDataBinding.java:123)
> at
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
> (JAXBDataBinding.java:163)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
> (WSDLToJavaContainer.java:483)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> (WSDLToJavaContainer.java:168)
> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> (WSDLToJavaContainer.java:215)
> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> (ToolRunner.java:84)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> (WSDLToJava.java:102)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> (WSDLToJava.java:171)
> Caused by: org.xml.sax.SAXParseException: undefined simple or complex
> type 'ns3:Coverage'
> at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
> (ParserContext.java:162)
> ... 15 more
>
>
> On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
>
> > Hi ,
> > The generated wsdl seems invalid**. Can you also paste the wsdl you
> > generated?
> > Cheers
> >
> > Jim
> >
> > Julio Arias wrote:
> >> Hi -
> >>
> >> I have the following web method, we are using JAXB binding but the
> >> WSDL generator doesn't create a complex type for the returning(or
> >> param) map thus wsdl2java blows up with the following exception
> >> (see below). Xfire use to create a complex type in the WSDL for
> >> this. Do I need a special annotation?
> >>
> >> @WebMethod
> >> Map<Long, MetadataVO> getMap(Map<Long, String> param);
> >>
> >> ---------------------------------------------------------------------
> >> ----------------
> >>
> >> WSDLToJava Error : java.lang.NullPointerException
> >>
> >> org.apache.cxf.tools.common.ToolException:
> >> java.lang.NullPointerException
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:223)
> >> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
> >> (ToolRunner.java:84)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
> >> (WSDLToJava.java:102)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
> >> (WSDLToJava.java:171)
> >> Caused by: java.lang.NullPointerException
> >> at
> >> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
> >> (XmlSchemaCollection.java:372)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
> >> (WSDLServiceBuilder.java:775)
> >> at
> >> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
> >> (WSDLServiceBuilder.java:578)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
> >> (WSDLServiceBuilder.java:561)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:251)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:154)
> >> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
> >> (WSDLServiceBuilder.java:143)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:142)
> >> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
> >> (WSDLToJavaContainer.java:215)
> >> ... 3 more
> >>
> >>
> >>
> >>
> >>
> >>
> >> Julio Arias
> >> Java Developer
> >> Roundbox Global : enterprise : technology : genius
> >> ---------------------------------------------------------------------
> >> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> >> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> >> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> >> ---------------------------------------------------------------------
> >>
> >>
>
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog
Re: Returning a java map
Posted by Julio Arias <ju...@rbxglobal.com>.
Hi Jim -
I partially fix this, I change the data binding to Aegis (now the map
has a type in the WSDL) but now I get a different problem with wsdl2java
The WSDL looks very similar at the one generated by xFire I think
there is a problem with the WSDL namespaces but I'm not sure what.
This is the WSDL:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="MetadataService" targetNamespace="http://
lor.rbx.com/ws/metadata" xmlns:ns1="http://lor.rbx.com/ws/metadata"
xmlns:ns2="urn:com:rbx:lor:ws:model" xmlns:ns3="http://util.java"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://
metadata.core.lor.rbx.com" xmlns="http://www.w3.org/2001/XMLSchema">
<simpleType name="DocumentLanguage">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="English"/>
</restriction>
</simpleType>
<simpleType name="DocumentDegreeInteractivity">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="VeryLow"/>
<enumeration value="Low"/>
<enumeration value="Medium"/>
<enumeration value="High"/>
<enumeration value="VeryHigh"/>
</restriction>
</simpleType>
<simpleType name="DocumentFormat">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="HTML_XHTML"/>
<enumeration value="SHOWCKWAVE_FLASH"/>
<enumeration value="FLASH_VIDEO"/>
<enumeration value="JPEG"/>
<enumeration value="GIF"/>
<enumeration value="MPEG"/>
<enumeration value="PDF"/>
<enumeration value="MSWORD"/>
<enumeration value="MSEXCEL"/>
<enumeration value="MSPOWERPOINT"/>
<enumeration value="XML"/>
</restriction>
</simpleType>
<simpleType name="DocumentDifficulty">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="VeryLow"/>
<enumeration value="Low"/>
<enumeration value="Medium"/>
<enumeration value="High"/>
<enumeration value="VeryHigh"/>
</restriction>
</simpleType>
<simpleType name="DocumentLearningResourceType">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="Excercise"/>
<enumeration value="Simulation"/>
<enumeration value="Questionnaire"/>
<enumeration value="Diagram"/>
<enumeration value="Figure"/>
<enumeration value="Graph"/>
<enumeration value="Index"/>
<enumeration value="Slide"/>
<enumeration value="Table"/>
<enumeration value="NarrativeText"/>
<enumeration value="Exam"/>
<enumeration value="Experiment"/>
<enumeration value="ProblemStatement"/>
<enumeration value="SelfAssesment"/>
</restriction>
</simpleType>
<simpleType name="DocumentIntendedEndUser">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="Teacher"/>
<enumeration value="Author"/>
<enumeration value="Learner"/>
<enumeration value="Manager"/>
</restriction>
</simpleType>
<simpleType name="Context">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="PrimaryEducation"/>
<enumeration value="SecondaryEducation"/>
<enumeration value="HigherEducation"/>
<enumeration value="UniversityFirstCycle"/>
<enumeration value="UniversitySecondCycle"/>
<enumeration value="UniversityPostgrade"/>
<enumeration value="TechnicalSchoolFirstCycle"/>
<enumeration value="TechnicalSchoolSecondCycle"/>
<enumeration value="ProfessionalFormation"/>
<enumeration value="ContinuousFormation"/>
<enumeration value="VocationalTraining"/>
</restriction>
</simpleType>
<simpleType name="DocumentStatus">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="Draft"/>
<enumeration value="Final"/>
<enumeration value="Revised"/>
<enumeration value="Unavailable"/>
</restriction>
</simpleType>
<simpleType name="DocumentInteractivityType">
<restriction base="string">
<enumeration value="Any"/>
<enumeration value="Active"/>
<enumeration value="Expositive"/>
<enumeration value="Mixed"/>
<enumeration value="Undefined"/>
</restriction>
</simpleType>
</schema>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://lor.rbx.com/ws/
metadata" xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="anyType2anyTypeMap">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="entry">
<complexType>
<sequence>
<element minOccurs="0" name="key" type="anyType"/>
<element minOccurs="0" name="value" type="anyType"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</schema>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="urn:com:rbx:lor:ws:model" xmlns="http://www.w3.org/
2001/XMLSchema" xmlns:ns0="http://util.java" xmlns:ns1="http://
metadata.core.lor.rbx.com">
<complexType name="User">
<sequence>
<element minOccurs="0" name="firstName" nillable="true" type="string"/>
<element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
<element minOccurs="0" name="lastName" nillable="true" type="string"/>
<any maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="Metadata">
<sequence>
<element minOccurs="0" name="ageFrom" type="int"/>
<element minOccurs="0" name="ageTo" type="int"/>
<element minOccurs="0" name="context" nillable="true"
type="ns1:Context"/>
<element minOccurs="0" name="coverage" nillable="true"
type="ns3:Coverage"/>
<element minOccurs="0" name="creator" nillable="true" type="ns3:User"/>
<element minOccurs="0" name="degreeInteractivity" nillable="true"
type="ns1:DocumentDegreeInteractivity"/>
<element minOccurs="0" name="description" nillable="true"
type="string"/>
<element minOccurs="0" name="difficulty" nillable="true"
type="ns1:DocumentDifficulty"/>
<element minOccurs="0" name="format" nillable="true"
type="ns1:DocumentFormat"/>
<element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
<element minOccurs="0" name="intendedUser" nillable="true"
type="ns1:DocumentIntendedEndUser"/>
<element minOccurs="0" name="interactivityType" nillable="true"
type="ns1:DocumentInteractivityType"/>
<element minOccurs="0" name="keywords" nillable="true"
type="ns3:ArrayOfKeyword"/>
<element minOccurs="0" name="language" nillable="true"
type="ns1:DocumentLanguage"/>
<element minOccurs="0" name="lastUpdate" type="dateTime"/>
<element minOccurs="0" name="owner" nillable="true" type="ns3:User"/>
<element minOccurs="0" name="rating" type="int"/>
<element minOccurs="0" name="resourceType" nillable="true"
type="ns1:DocumentLearningResourceType"/>
<element minOccurs="0" name="size" type="int"/>
<element minOccurs="0" name="status" nillable="true"
type="ns1:DocumentStatus"/>
<element minOccurs="0" name="subject" nillable="true"
type="ns3:Subject"/>
<element minOccurs="0" name="title" nillable="true" type="string"/>
<element minOccurs="0" name="version" nillable="true" type="string"/>
<any maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="Coverage">
<sequence>
<element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
<element minOccurs="0" name="value" nillable="true" type="string"/>
<any maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ArrayOfKeyword">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="Keyword"
nillable="true" type="ns3:Keyword"/>
</sequence>
</complexType>
<complexType name="Subject">
<sequence>
<element minOccurs="0" name="id" nillable="true" type="ns0:UUID"/>
<element minOccurs="0" name="value" nillable="true" type="string"/>
<any maxOccurs="unbounded"/>
</sequence>
</complexType>
</schema>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://util.java"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="UUID">
<sequence>
<element minOccurs="0" name="leastSignificantBits" type="long"/>
<element minOccurs="0" name="mostSignificantBits" type="long"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="updateMetadata">
<wsdl:part name="metadata" type="ns2:Metadata">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getMap">
<wsdl:part name="arg0" type="ns1:anyType2anyTypeMap">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getDocumentMetadata">
<wsdl:part name="documentID" type="ns3:UUID">
</wsdl:part>
</wsdl:message>
<wsdl:message name="updateMetadataResponse">
</wsdl:message>
<wsdl:message name="getMapResponse">
<wsdl:part name="return" type="ns1:anyType2anyTypeMap">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getDocumentMetadataResponse">
<wsdl:part name="metadata" type="ns2:Metadata">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="MetadataService">
<wsdl:operation name="updateMetadata">
<wsdl:input message="ns1:updateMetadata" name="updateMetadata">
</wsdl:input>
<wsdl:output message="ns1:updateMetadataResponse"
name="updateMetadataResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDocumentMetadata">
<wsdl:input message="ns1:getDocumentMetadata"
name="getDocumentMetadata">
</wsdl:input>
<wsdl:output message="ns1:getDocumentMetadataResponse"
name="getDocumentMetadataResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getMap">
<wsdl:input message="ns1:getMap" name="getMap">
</wsdl:input>
<wsdl:output message="ns1:getMapResponse" name="getMapResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MetadataServiceSoapBinding"
type="ns1:MetadataService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/
soap/http"/>
<wsdl:operation name="updateMetadata">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="updateMetadata">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:input>
<wsdl:output name="updateMetadataResponse">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDocumentMetadata">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="getDocumentMetadata">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:input>
<wsdl:output name="getDocumentMetadataResponse">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getMap">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="getMap">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:input>
<wsdl:output name="getMapResponse">
<soap:body namespace="http://lor.rbx.com/ws/metadata"
use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MetadataService">
<wsdl:port binding="ns1:MetadataServiceSoapBinding"
name="MetadataServiceImplPort">
<soap:address location="http://localhost:8080/lor/services/
MetadataService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
And this is the error:
WSDLToJava Error : Thrown by JAXB : undefined simple or complex type
'ns3:Coverage'
org.apache.cxf.tools.common.ToolException: Thrown by JAXB : undefined
simple or complex type 'ns3:Coverage'
at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error
(JAXBBindErrorListener.java:34)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
(SchemaCompilerImpl.java:245)
at com.sun.tools.xjc.util.ErrorReceiverFilter.error
(ErrorReceiverFilter.java:61)
at com.sun.xml.xsom.impl.parser.ParserContext$2.error
(ParserContext.java:188)
at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
(ParserContext.java:166)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError
(NGCCRuntimeEx.java:103)
at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
(DelayedRef.java:91)
at com.sun.xml.xsom.impl.parser.DelayedRef.run
(DelayedRef.java:66)
at com.sun.xml.xsom.impl.parser.ParserContext.getResult
(ParserContext.java:126)
at com.sun.xml.xsom.parser.XSOMParser.getResult
(XSOMParser.java:172)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:
488)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
(SchemaCompilerImpl.java:197)
at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(
JAXBDataBinding.java:123)
at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate
(JAXBDataBinding.java:163)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
(WSDLToJavaContainer.java:483)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:168)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:215)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
(ToolRunner.java:84)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run
(WSDLToJava.java:102)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main
(WSDLToJava.java:171)
Caused by: org.xml.sax.SAXParseException: undefined simple or complex
type 'ns3:Coverage'
at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError
(ParserContext.java:162)
... 15 more
On Jul 19, 2007, at 8:06 PM, Jim Ma wrote:
> Hi ,
> The generated wsdl seems invalid**. Can you also paste the wsdl you
> generated?
> Cheers
>
> Jim
>
> Julio Arias wrote:
>> Hi -
>>
>> I have the following web method, we are using JAXB binding but the
>> WSDL generator doesn't create a complex type for the returning(or
>> param) map thus wsdl2java blows up with the following exception
>> (see below). Xfire use to create a complex type in the WSDL for
>> this. Do I need a special annotation?
>>
>> @WebMethod
>> Map<Long, MetadataVO> getMap(Map<Long, String> param);
>>
>> ---------------------------------------------------------------------
>> ----------------
>>
>> WSDLToJava Error : java.lang.NullPointerException
>>
>> org.apache.cxf.tools.common.ToolException:
>> java.lang.NullPointerException
>> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> (WSDLToJavaContainer.java:223)
>> at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool
>> (ToolRunner.java:84)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.run
>> (WSDLToJava.java:102)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.main
>> (WSDLToJava.java:171)
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName
>> (XmlSchemaCollection.java:372)
>> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage
>> (WSDLServiceBuilder.java:775)
>> at
>> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation
>> (WSDLServiceBuilder.java:578)
>> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface
>> (WSDLServiceBuilder.java:561)
>> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> (WSDLServiceBuilder.java:251)
>> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> (WSDLServiceBuilder.java:154)
>> at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices
>> (WSDLServiceBuilder.java:143)
>> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> (WSDLToJavaContainer.java:142)
>> at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
>> (WSDLToJavaContainer.java:215)
>> ... 3 more
>>
>>
>>
>>
>>
>>
>> Julio Arias
>> Java Developer
>> Roundbox Global : enterprise : technology : genius
>> ---------------------------------------------------------------------
>> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> ---------------------------------------------------------------------
>>
>>
Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------
Re: Returning a java map
Posted by Jim Ma <em...@iona.com>.
Hi ,
The generated wsdl seems invalid**. Can you also paste the wsdl you
generated?
Cheers
Jim
Julio Arias wrote:
> Hi -
>
> I have the following web method, we are using JAXB binding but the
> WSDL generator doesn't create a complex type for the returning(or
> param) map thus wsdl2java blows up with the following exception(see
> below). Xfire use to create a complex type in the WSDL for this. Do I
> need a special annotation?
>
> @WebMethod
> Map<Long, MetadataVO> getMap(Map<Long, String> param);
>
> -------------------------------------------------------------------------------------
>
>
> WSDLToJava Error : java.lang.NullPointerException
>
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:223)
>
> at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:84)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
> at
> org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:171)
> Caused by: java.lang.NullPointerException
> at
> org.apache.ws.commons.schema.XmlSchemaCollection.getElementByQName(XmlSchemaCollection.java:372)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildMessage(WSDLServiceBuilder.java:775)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLServiceBuilder.java:578)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuilder.java:561)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:251)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:154)
>
> at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:143)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
>
> at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:215)
>
> ... 3 more
>
>
>
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>