
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Update requirement properties using the Web Services
Hello,
How can I access the Property Value class by using the requirement service (python)? I only have access to the class Requirements Service by using the web service /Services1.0/jaxws/requirements?wsdl.
I need this in order to update a requirement property based on its children properties

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @LauraMariaB,
You can use these methods from the requirements service:
getCustomProperties: get all custom properties in a project, includes the id
getProperty: get the property value (by id) for a requirement
updateProperty: change the property value
Regards,
Hubert

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello,
As I said, I am using the Python language and I need to create a PropertyValue object in order to update an existing property. What I did not know is that there is no need to have access to the PropertyValue class. I just need to create a dictionary with the same arguments that the Property Value classes defines.
This is different from Java where you have to import all the needed classes.
So, for anyone that might want to do something similar to this, to update a requirement property in Python you need to:
1. Instantiate the requirement service
self.req_client = zeep.Client(wsdl="http://IP:PORT/Services1.0/jaxws/requirements?wsdl)
1. Create the Property Object like a dictionary structure:
property_to_set = {"propertyId": prop_id, "requirementId": req_id, "value": "COVERAGE", "type": zeep.xsd.SkipValue, "modifyCounter": zeep.xsd.SkipValue }
2. Update the property:
self.req_client.service.updateProperty(project.session, req_id, property_to_set)
Note: Even if you do not need the "modifyCounter" or the "type" variable, you have to send them when calling the function, otherwise you will get an exception saying that the call misses an argument. Not sure why this is needed. Instead of "zeep.xsd.SkipValue" , you can send also an empty string and it will work.