Hi Eugene,

I guess you are using the Java first method of writing your service. Generally this can be problematic if you use special classes like org.joda.time.DateTime. It seems JAXB can not automatically generate a service from this class that works.

If you want to stay with Java first then you should create a facade for the service that only uses classes that work for services. For example Date or Calendar for your date property.

Generally it is much better to use WSDL First like in the WSDl first example. If you have trouble directly writing the WSDL you can use the method I described in:
http://cxf.apache.org/docs/defining-contract-first-webservices-with-wsdl-generation-from-java.html

Greetings

Christian

Eugène Stassen schrieb:
Hello,

I have to call methods localized on a distant server. I can choose the API
for the communication. I followed a tutorial on the CXF site (
http://cxf.apache.org/docs/a-simple-jax-ws-service.html
http://cxf.apache.org/docs/a-simple-jax-ws-service.html ) and it works very
well. Unfortunately, one of my object has a member variable like this :

class MyObject
{
    org.joda.time.DateTime date;
}

When I look for the xml messages, the date field is transformed to this :
"<date />". I can't find the way to do the change xml <-> java myself. Is
there an easy way to do this (for example with annotations) ?

I precise that I don't use Spring or other things like that, juste what it
is said in the tutorial. And I am a noob in java entreprise applications.

Thanks !

Eugène Stassen

Reply via email to