You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Johannes Elsinghorst <Jo...@gmx.net> on 2008/10/01 16:12:35 UTC

Re: JSR181 Aegis Binding - Type Mapping Question

Gert,
yes , i did. You can set a so called override type List, that contains
class names which are not referenced by the pojo and therefore not loaded.
It works like this:
<jsr181:endpoint ...> 
        <jsr181:pojo>
          ...
         </jsr181:pojo>
         <property name="properties">
         <map>          
             <entry key="overrideTypesList">
                 <list>
                        <value>class1</value>...
                        <value>class2</value>                  
                 </list>
             </entry>
         </map>
        </property>
</jsr181:endpoint>

Didn't get my endpoint to fully work though :-(
(http://www.nabble.com/XFire-AegisBindingProvider-td19759162.html)

cheers, Johannes
> Johannes,
>
> Did you get a solution for this on IRC this morning?
>
> Regards,
>
> Gert
>
> Johannes Elsinghorst wrote:
>> Hi,
>>
>> i have a JSR181-SU that exposes a pojo to the bus. The pojo is an
>> spring-ejb proxy, so i dont have the sources. I provide my own wsdl,
>> because the clientside classes used by the ejb contain abstract classes
>> and the extending classes get lost in the wsdl-autogeneration process.
>> These abstract classes are actually the problem. Everything works just
>> fine for simple methods that take only simple types as parameters (e.g
>> simlpe strings). The wsdl looks like this and conatins all types
>> (abstract and exentending):
>> ...
>> <xs:element name="doStuff">
>>         <xs:complexType>
>>           <xs:sequence>
>>             <xs:element name="name" type="xs:string" />
>>             <xs:element name="Value" type="abstractType" />         
>>           </xs:sequence>
>>         </xs:complexType>
>> </xs:element>
>>
>> when i send a message to the jsr181 endpoint like this:
>> <soap:Envelope ...>
>>    <soap:Body>
>>       <tns:doStuff>
>>          <name>someName</name>
>>          <abstractType
>> xsi:type="tns:typeExtendingAbstractType">               ...
>>          </abstractType>
>>        </tns:doStuff>
>> ...
>> xfire looks in the typeExtendingAbstractType's TypeMapping (xml2Type)
>> for a class to instatiate. But this mapping is empty so its tries to
>> instatiate the abstract class and throws an exception! I have all the
>> impl-classes (dont have the source either) in the classpath, but dont
>> know how to tell xfire/aegis to put them in its mappings. Anybody an
>> idea? I found that theres some way to define these class.aegis.xml
>> mapping files, but im not sure whether thats what i need. I just need to
>> tell it what class to use for what xml-Type!
>> Has anybody an idea how to do this?
>>
>> cheers, Johannes
>>
>>   
>