Hi,

I'm using cxf (2.0.3-incubator) ClientProxyFactoryBean to call a XFire Web Service. The Web Service returns a PrivateCustomer:

package common.framework;

public abstract class Data implements Serializable {
        protected boolean status;

        <getters and setters)

}


package com.test.services.domain;

public abstract class Customer extends Data {
        private Long customerNumber;

        <getters and setters)

}

package com.test.services.domain;

public class PrivateCustomer extends Customer {
        private String socialSecurityNumber;

        <getters and setters)

}

I have added the properties "writeXsiType" and "overrideTypesList" in the services.xml file and the wsdl seems right. The problem is that the Data class exist in another package and has another namespace than Customer and PrivateCustomer. When I try to call the Web Service I get the following exception:

Caused by: org.apache.cxf.aegis.DatabindingException: Couldn't set property {http://framework.common}status on <com.test.services.domain.PrivateCustomerDO>
  <status>false</status>
  <customerNumber>5</customerNumber>
  <socialSecurityNumber>x</socialSecurityNumber>
</com.test.services.domain.PrivateCustomerDO>. null. Nested exception is java.lang.NullPointerException: null at org.apache.cxf.aegis.type.basic.BeanType.writeProperty(BeanType.java: 254) at org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:163) at org .apache .cxf .aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:90)
                ... 41 more
Caused by: java.lang.NullPointerException
at org.apache.cxf.aegis.type.basic.BeanType.writeProperty(BeanType.java: 232)
                ... 43 more


When I debug I see that cxf/aegis expects "status" to be in the same namespace as "Customer" and "PrivateCustomer", "http://domain.services.test.com ".. Anyone has any idea what I'm doing wrong? Do I need to create a custom mapping to handle it?

Regards,

Kjartan


Reply via email to