Hi,

We are using REST http-binding, and we've just upgraded from 2.2.3 to 2.2.7
and we have a new error when parsing the xml.

We have this method/service

@Post
    @HttpResource(location = "/projects")
    @WebMethod
    WSProject create(@WebParam(name = "containerType") int containerType,
            @WebParam(name = "containerID") long containerID, @WebParam(name
= "name") String name,
            @WebParam(name = "description") String description,
@WebParam(name = "userID") long userID,
            @WebParam(name = "checkPoints") WSCheckPoint[] checkpoints,
@WebParam(name = "startDate") Date startDate,
            @WebParam(name = "dueDate") Date dueDate) 


And this xml to do the post

<create>
    <containerType>${project.parentContainer.objectType?c}</containerType>
    <containerID>${project.parentContainer.ID?c}</containerID>
    <name>${project.name}</name>
    <description>${project.description}</description>
    <userID>${project.user.ID?c}</userID>
    <checkPoints>
        <CheckPoint>
            <ID>${checkPoint.ID?c}</ID>
            <description>${checkPoint.description}</description>
            <name>${checkPoint.name}</name>
            <dueDate>${checkPoint_dueDate}</dueDate>
            <creationDate>${checkPoint_creationDate}</creationDate>
           
<modificationDate>${checkPoint_modificationDate}</modificationDate>
        </CheckPoint>
    </checkPoints>
    <startDate>${startDate}</startDate>
    <dueDate>${dueDate}</dueDate>
</create>

The problem is with the checkpoints, we get this error

DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"",
local:"CheckPoint"). Expected elements are
<{}creationDate>,<{}description>,<{}name>,<{}ID>,<{}uuid>,<{}modificationDate>,<{}objectType>,<{}dueDate>,<{}version>
 
Location: line 0

It seems that it's expecting something like

<checkPoints>
            <ID>${checkPoint.ID?c}</ID>
            <description>${checkPoint.description}</description>
            <name>${checkPoint.name}</name>
            <dueDate>${checkPoint_dueDate}</dueDate>
            <creationDate>${checkPoint_creationDate}</creationDate>
           
<modificationDate>${checkPoint_modificationDate}</modificationDate>
    </checkPoints>

This worked with 2.2.3 but isn't working with 2.2.7.

There are two problems with this. One is that the format of the xml has
changed and we need to keep backward compatibility. And the other one is
that without <CheckPoint> we won't be able to send several checkpoints.

Any ideas of what is going on?

Thanks in advance.

Gabriel
-- 
View this message in context: 
http://old.nabble.com/XML-format-change-from-2.2.3-to-2.2.7-tp28287925p28287925.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to