You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by callum <ca...@hotmail.com> on 2007/06/03 11:34:26 UTC

Re: Problem with jsr181 xml binding

I'm having a very similar problem; was this ever resolved?  Is anyone aware
of an xfire jira reference ? (I have searched, but can't find one).

Regards,
Callum


gnodet wrote:
> 
> I'm not sure how xfire tries to load mapping files, but i think there is a
> problem somewhere.
> Could you please raise a JIRA -- and submit a patch ;)
> 
> Cheers,
> Guillaume Nodet
> 
> On 6/29/06, KBerthelot <kb...@edgenet.com> wrote:
>>
>>
>> I'm having trouble deploying a Jsr181Endpoint that uses the default
>> binding
>> (aegis).  It can't seem to find the type mapping file, even though I've
>> confirmed that it's in the classpath in the same directory as the mapped
>> class. I'm trying to map a Set, and if I use generics to type it it works
>> fine, so I know the classpath it ok.  I realize this is probably more of
>> an
>> XFire issue, but I was hoping that there was something obvious I'm doing
>> wrong.  I'm using a snapshot from 6/28 (xfire 1.1.1).
>>
>>
>> The exception is:
>>
>> org.codehaus.xfire.XFireRuntimeException: Couldn't create type for
>> property
>> books on class com.edgenet.test.Catalog: Cannot create mapping for
>> java.util.Set, unspecified component type for interface java.util.Set
>>         at
>> org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(
>> DefaultTypeCreator.java:43)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(
>> AbstractTypeCreator.java:90)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(
>> AbstractTypeCreator.java:387)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createCollectionQName(
>> AbstractTypeCreator.java:310)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createCollectionType(
>> AbstractTypeCreator.java:214)
>>         at
>> org.codehaus.xfire.aegis.type.DefaultTypeCreator.createCollectionType(
>> DefaultTypeCreator.java:48)
>>         at
>> org.codehaus.xfire.aegis.type.java5.Java5TypeCreator.createCollectionType(
>> Java5TypeCreator.java:159)
>>         at
>> org.codehaus.xfire.aegis.type.XMLTypeCreator.createCollectionType(
>> XMLTypeCreator.java:181)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass(
>> AbstractTypeCreator.java:90)
>>         at
>> org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType(
>> AbstractTypeCreator.java:367)
>>         at
>> org.codehaus.xfire.aegis.type.basic.BeanTypeInfo.getType(BeanTypeInfo.java
>> :200)
>>         at org.codehaus.xfire.aegis.type.basic.BeanType.getType(
>> BeanType.java:478)
>>         at
>> org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java
>> :411)
>>         at
>> org.codehaus.xfire.wsdl11.builder.AbstractWSDL.addDependency(
>> AbstractWSDL.java:248)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParametersSchema(
>> WSDLBuilder.java:473)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocumentType(
>> WSDLBuilder.java:446)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createWrappedOutputParts(
>> WSDLBuilder.java:423)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createOutputMessage(
>> WSDLBuilder.java:192)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createAbstractInterface(
>> WSDLBuilder.java:117)
>>         at org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(
>> WSDLBuilder.java:76)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(
>> WSDLBuilderAdapter.java:40)
>>         at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java
>> :104)
>>         at
>> org.apache.servicemix.jsr181.Jsr181Endpoint.generateWsdl(
>> Jsr181Endpoint.java:328)
>>         at
>> org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(
>> Jsr181Endpoint.java:258)
>>         at
>> org.apache.servicemix.jsr181.Jsr181SpringComponent$LifeCycle.doInit(
>> Jsr181SpringComponent.java:66)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.init(
>> AsyncBaseLifeCycle.java:108)
>>
>>
>> My configuration is:
>>
>> <sm:container id="jbi" useMBeanServer="true" createMBeanServer="true"
>> embedded="true">
>>
>>    <sm:activationSpecs>
>>
>>       <sm:activationSpec componentName="echoComponent">
>>          <sm:component>
>>             <jsr181:component>
>>                <jsr181:endpoints>
>>                   <jsr181:endpoint
>>                         pojoClass="com.edgenet.test.CatalogServiceImpl"
>>                         service="edgenet:CatalogService"
>>                         annotations="none"
>>                         endpoint="catalogService" />
>>                </jsr181:endpoints>
>>             </jsr181:component>
>>          </sm:component>
>>       </sm:activationSpec>
>>
>>    </sm:activationSpecs>
>> </sm:container>
>>
>>
>> The problem class is:
>>
>> package com.edgenet.test;
>>
>> import java.util.HashSet;
>> import java.util.Set;
>>
>> public class Catalog {
>>         private int catalogId = 1;
>>         private Set books = new HashSet();
>>
>>         .
>>         .
>>         .
>>
>>         // This method causes the problem
>>
>>         public Set getBooks() {
>>                 return books;
>>         }
>> }
>>
>>
>> The type mapping file is "Catalog.aegis.xml":
>>
>> <mappings>
>>    <mapping>
>>       <method name="getBooks">
>>          <return-type componentType="com.edgenet.test.Book"/>
>>       </method>
>>    </mapping>
>> </mappings>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-jsr181-xml-binding-tf1869898.html#a5110445
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-jsr181-xml-binding-tf1869898s12049.html#a10935095
Sent from the ServiceMix - User mailing list archive at Nabble.com.