Posted on 03-01-2015 11:12 PM
Anyone else seeing this? It's happened before apparently...
https://jamfnation.jamfsoftware.com/discussion.html?id=7673
Since upgrading our (windows) JSS to 9.65, data returned from the api is in json rather than XML.
That breaks patchoo and some of my other scripts that interact with the API. Pushing fixes up soon if you are using them
Solved! Go to Solution.
Posted on 03-03-2015 02:45 PM
Pushed a fix if you have the issue with patchoo or asucatalogset.sh.
https://github.com/patchoo/patchoo/commit/b88276673c17c6cd628cc455a5595286d573d6e6
Posted on 03-02-2015 07:20 AM
Yep, its not just since 9.65 though. We saw it when we upgraded our 8.x environment to 9.61, though I don't know how far back the problem existed. I had to change all of my API scripts to force xml output instead of JSON to make them work again.
I'm not certain if this issue is universal, as in, everyone using Casper Suite 9.6x would see it, or only when the JSS is hosted on certain platform(s) We run on a virtualized Windows Server environment and see it. Not sure about those on Mac or Linux servers.
Posted on 03-02-2015 09:29 AM
As far as I remember it has to deal with certain versions of Java on certain platforms that makes the webapp default to json instead of xml. For instance I see it on my Linux JSS in the DMZ but not my Windows JSS inside our network.
Posted on 03-02-2015 01:50 PM
I have only ever seen this happen in specific environments like my post you linked stated. It sure is a strange one. When I encountered the problem originally I could only reproduce it on RHEL and CentOS boxes. Debian based Linux did not have that issue with Open JDK/JRE and Oracle JDK/JRE as well. On top of that it was specific versions of Java and the Redhat based Linux distro. I think I tried it on a BSD box too (it was a couple years ago hard to remember all the details) and it worked as expected there.
I have personally not seen this happen in Windows Server or OS X Server, but I suspect if it can happen in one platform it could happen in another. In your scenario did you also update Java recently, or simply just the JSS? I would suggest we open a support ticket to investigate why this is happening. I can test it out on my end as well.
I spun up a test cloud instance and curl'd down computer ID 1 and the results returned to me in XML by default. Of course a cloud hosted JSS is not the same platform as your on premise Windows environment. I would still open a ticket so we can investigate this further. I have seen this in the past and it is typically environment specific. Hopefully we can determine what the issue is.
As a work around you can force the header response in curl commands to only accept XML formats. If you were coding this for Patchoo it may be a good idea to investigate that method as well, since you could never know what a user's environment is when using Patchoo. Also, keep up the good work, digging your stuff man!
Thanks,
Tom
Posted on 03-02-2015 03:22 PM
Thanks, I will open a ticket! I only updated the JSS to 9.65, Windows 2012R2 - Java 7 -update 75
Agreed, I am updating all my scripts that interact with the API to force xml, to be sure to be sure to be sure.
Will push some commits to github soon(ish).
Posted on 03-03-2015 02:45 PM
Pushed a fix if you have the issue with patchoo or asucatalogset.sh.
https://github.com/patchoo/patchoo/commit/b88276673c17c6cd628cc455a5595286d573d6e6