Update template using webservices

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

walter.guerra
Posts: 1
Joined: Mon Jan 21, 2013 3:39 pm

Update template using webservices

Mon Jan 21, 2013 3:46 pm

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
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: Update template using webservices

Mon Feb 10, 2014 8:43 pm

what kind of programming language you are using to do this?
agaspa
Posts: 714
Joined: Tue Apr 20, 2010 8:24 am

Re: Update template using webservices

Wed Feb 12, 2014 3:56 pm

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
Attachments
Main.zip
Java class example
(815 Bytes) Downloaded 576 times

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 36 guests