To avoid the name space related error you must explicitly turn the "HACK" on
as follows:
public <service interface name> createServiceClient()
{
//Create a metadata of the service
Service serviceModel = new
XmlBeansServiceFactory().create(<service interface name>.class);
// XMLBeans 2.X does not support DOM Level 3 namespace related
atributes access during writing
// so register hack for writing...
serviceModel.setProperty(XmlBeansType.XMLBEANS_NAMESPACE_HACK,
"true");
//Create a proxy for the deployed service
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
return (<service interface name>) factory.create(serviceModel,
<service endpoint url>);
}
geek.shrek wrote:
>
> Hi Matt,
>
> I'm having the same problem as yours, did you find the solution?
>
>
> Cheers,
> geek.shrek
>
>
> Matthew Young wrote:
>>
>> using XFire 1.2.6 and getting the following error:
>>
>> "org.codehaus.xfire.XFireRuntimeException: Couldn't get property
>> {http://dom.w3c.org}baseURI from bean
>> [EMAIL PROTECTED] Nested exception
>> is java.lang.reflect.InvocationTargetException: null"
>>
>> have services which return POJO that contain XMLBean properties (ie. a
>> property to POJO that is a XmlObject document). a little latter in the
>> logging the following pops up "DOM Level 3 Not implemented". using the
>> XMLBeans 2.2.0 delivery (xbean.jar) rather than the jar part of the XFire
>> package but the versions are the same. wondering if this a bug with
>> XMLBeans? what kicks the DOM Level 3 in place? any ideas?
>>
>> noticed prior to the initial property error during the send phase
>> (org.codehaus.xfire.handler.OutMessageSender) Xfire is looking for aegis
>> mapping files. haven't put any time into looking over how Aegis works
>> but spider-senses say that I am not handling my return messages right.
>> only got a handler for input:
>>
>> [code]
>> <bean name="environmentWebService"
>> class="org.codehaus.xfire.spring.ServiceBean">
>> <property name="serviceBean" ref="environmentService"/>
>> <property name="serviceClass"
>> value="matrix.v.dataaccess.services.resource.EnvironmentService"/>
>> <property name="inHandlers">
>> <list>
>> <ref bean="addressingHandler"/>
>> </list>
>> </property>
>> </bean>
>>
>> <bean id="addressingHandler"
>> class="org.codehaus.xfire.addressing.AddressingInHandler"/>
>> [code]
>>
>
>
--
View this message in context:
http://www.nabble.com/Error-with-POJO-containing-XMLBean-properties-tf3809834.html#a12150291
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email