cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eoghan Glynn <eogl...@gmail.com>
Subject Re: [DOSGi]"Could not determine how to read type" exception under DOSGi, How to solve?
Date Wed, 22 Jul 2009 13:16:14 GMT
Hi Sergey,

> should we also get the bus from it, as well as conduit/transports

Wouldn't we already need to have a reference to the bus, probably just
the default bus, in order to call
Bus.getExtension(ApplicationContext.class)?

Or is there a more direct way of grabbing this application context?

On the conduit issue, there would be the potential for inferring with
the normal mechanism for setting the conduit configuration via the
intents map.

Cheers,
Eoghan

2009/7/22 Sergey Beryozkin <sberyozk@progress.com>:
> Hi Eoghan
>
> great catch - should we also get the bus from it, as well as
> conduit/transports ? One might want to use Spring DM to preconfigure the
> default bus/etc ?
>
> cheers, Sergey
>
> ----- Original Message ----- From: "Eoghan Glynn" <eoglynn@gmail.com>
> To: <users@cxf.apache.org>
> Sent: Wednesday, July 22, 2009 12:44 PM
> Subject: Re: [DOSGi]"Could not determine how to read type" exception under
> DOSGi, How to solve?
>
>
> Hi Ahmed,
>
> The problem is that dOSGi just just news up a fresh Aegis or JAXB
> databinding instance (the type depending on a property), instead of
> using a spring-loaded databinding if available. See [1] for the
> context. We could I guess just grab the injected databinding from the
> Bus ApplicationContext instead.
>
> Please raise a JIRA for this.
>
> Cheers,
> Eoghan
>
> [1]
> http://svn.apache.org/repos/asf/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
>
> 2009/7/22  <ahmed.aadel@remainsoftware.com>:
>>
>> I'm stuck with this problem. Please help.
>>
>> To make it short:
>>
>> Given the following method in a published service interface:
>>
>> Object getResult();
>>
>> and a service implementation and some class Foo:
>>
>> public Object getResult(){
>> return new Foo();
>> }
>>
>>
>> When the remote consumer tries calling getResult via the service proxy it
>> gets this akin exception:
>> org.apache.cxf.interceptor.Fault: Could not determine how to read type:
>> {..some qname..} Foo
>>
>>
>> I tried to let aegis know about the extra type (Foo) customizing the
>> AegisConext object by putting the following code in
>> my_bundle/META-INF/spring/context.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="
>> http://cxf.apache.org/jaxws"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>> http://www.springframework.org/schema/context
>>
>> http://www.springframework.org/schema/context/spring-context-2.5.xsd
>> http://cxf.apache.org/core
>> http://cxf.apache.org/schemas/core.xsd
>> http://cxf.apache.org/jaxws
>> http://cxf.apache.org/schemas/jaxws.xsd"
>> default-autowire="byName">
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"
>> />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>
>> <bean id="aegisDatabinding"
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding">
>> <property name="aegisContext">
>> <bean class="org.apache.cxf.aegis.AegisContext">
>> <property name="writeXsiTypes"
>> value="true" />
>> <property name="rootClassNames">
>> <set>
>> <value>some.package.Foo</value>
>>
>> </set>
>> </property>
>> </bean>
>> </property>
>> </bean>
>> </beans>
>>
>> When debugging it seems this is picked up by spring, so an AegisContext
>> object is instantiated with the good values of writeXsiTypes and
>> rootClassNames props. Yet another instance of AegisDatabinding with the
>> "wrong" AegisContext is created, bound to my service then used when the
>> remote consumer is interacting with my osgi service through the proxy!
>>
>> Is this the right way to solve such problems under DOSGi? if so what am I
>> doing wrong?
>>
>> Please help, we're initially stuck at this very point while integrating
>> DOSGi with our osgi app.
>>
>>
>> - We are using DOSGi snapshot 1.1 with zooKeeper based discovery.
>> - The only point our osgi app comes in touch with Spring or cxf
>> webservices is through DOSGi.
>> - I didn't change any xml file in the META-INF/cxf/ of the Snapshot DSW.
>>
>> Any help is kindly appreciated :)
>> Many thanks.
>>
>>
>>
>>
>>
>>
>
>

Mime
View raw message