Page 1 of 1

Update template using webservices

Posted: Mon Jan 21, 2013 3:46 pm
by walter.guerra
Hi,

I'm trying to update a template using webservice but I'm not able to do it if the template has a field of type "preset string". For example, if I have one WSAttribute like this:

(wsAttribute){
editor = 1
label = "test"
mandatory = 0
name = "test"
position = 0
stringValue = "a, b, c, d"
type = 0
value = "a, b, c, d"
},

I have the following error:

Server raised fault: 'org.apache.xerces.dom.ElementNSImpl cannot be cast to javax.xml.datatype.XMLGregorianCalendar'

If I delete the "value" field, it works ok, but them the field becomes a common string, not a "preset" one.

My use case is: get a template, change the possible values of a "preset string" attribute, update the template.

Is it a bug in LogicalDoc or am I doing something wrong?

Thanks,
Walter

Re: Update template using webservices

Posted: Mon Feb 10, 2014 8:43 pm
by agaspa
what kind of programming language you are using to do this?

Re: Update template using webservices

Posted: Wed Feb 12, 2014 3:56 pm
by agaspa
Hi Walter,

I prepared for you an example in Java, you can find it in the zip attached.
Essentially it is very simple, just change the attribute Value of a WSAttribute and then save back the template

I guess if you are using other languages ​​(PHP it might be a bit more complicated)
In this case, let me know how it goes