views:

35

answers:

1

I have a Web Service deployed on JBoss 4.2.3. The Web Service is created using the EJB3 @WebService annotation. One of the method requires an object which has a java.util.Date property

public void createUser(UserDTO dto) throws FancyException{
    //-- do some work here
}

class UserDTO {
    .....
    private Date joined;

    //-- appropriate setters
}

I have 2 clients, Axis generated client and ASP.NET generated client.

Calls from the Axis client are Ok, i.e. the date object has the value set by the client.

Calls from the ASP.NET client do not send the date set by the client, i.e. joined is null.

A: 

Non primitive datatypes have the option of being nullable, maybe for performance reasons. An extra boolean property propertySpecified is added that will instruct ASP.NET to include the attribute when serializing it down the wire. By setting this to true the corresponding variable is serialized as well.

Included are some links you might find useful on the same subject.

Another way would be to make sure the attributes are required.

n002213f