I'm attempting to use the Generic Web Services SOAP API to change a file in WindChill and am running into a "Object "wt.doc.WTDocument>39760" is not persistent" error.
As per the [tiny] docs, I get the UFID of the content holder I want to update, call GetUploadHandles to get a URL to upload the content item to, upload the new revision of the file, and then call AddContent with the content holder's UFID and the handle returned by GetUploadHandles. The API always fails with the SOAP fault:
wt.util.WTException: wt.util.WTRuntimeException: Object "wt.doc.WTDocument>39760" is not persistent.
What's funny about this is the error appears to include an almost-but-not-quite-valid OBID. None of our Generic Web Services tasks have been modified, so I am wondering if this is a bug in the shipped tasks.
The only lead I have is from the Tomcat log, where I see what appears to be an error deserializing a SOAP call while parsing an integer, but it doesn't make sense because there are no integer fields in this method call:
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:470)
...
at com.infoengine.soap.util.sax.BodyDeserializer.startElement(BodyDeserializer.java:84)
...
at com.infoengine.soap.SoapRPCRouter.doPost(SoapRPCRouter.java:340)
...
at java.lang.Thread.run(Thread.java:619)
And since it says 'for input string ""', that makes me think some internal call is missing a parameter. The SOAP call is generated via soapUI, a Java client, and is valid. So...I dunno...
Other useful information:
1. Login is an admin user
2. Content holder is a WTDocument located in \cybernet_product called UAC with a single content item whose filename is UAC.pptx.
3. No errors uploading the file or in any of thepreceeding API calls.
4. File is not checked out.
5. I've tried calling AddContent with a contenthandle where the URL is the google logo, but that makes no difference.
6. I've tried changing the method in the contenthandle to GET, no difference.
7. Also tried setting the contenthandle url to just "uac.pptx", no difference.
If anyone has any insight or ideas, I'd appreciate your thoughts.