Set the page contents of a bodycopy using SOAP
Hey mate, could be a number of things, one thing to check is your GlobalPreferences settings. There should be a "Filter Front End User Input" option, is it disabled?
I did extensive SOAP API work, including setting HTML as an Attribute, but I never ran into this. Are you sure that whatever method you are using to send the request, that it isn't converting those? How are you in fact sending the request?
Thanks for your responses!
Jeremy, I don't seem to have access to the GlobalPreferences settings - we're being hosted by Squiz, so perhaps that's locked down? We're also on an older version (4.18.0) so perhaps the settings aren't in the same place as mentioned in the documentation.
Nic, I'm *pretty sure* that I have ruled out my client as escaping the html (I'm using the PHP SoapClient). It was originally, i can see the last request using SoapClient::__getLastRequest, but then i found a different way to add the attribute values using SoapVar, and __getLastRequest now returns the request as shown in my first post. Here is a snippet of the test code that i'm using to call the service:
I appreciate your input!
Yeah, I am not sure. I would use a SOAP Client app to test the function first, and if all goes well, then you can trace back to the issue being caused by the PHP SoapClient.
What about trying:
$response = $client->SetAttributeValue(array('AssetID' => '25336', 'AttributeName' => 'html', 'AttributeValue' => '<h2>testing 9!</h2>'));
Maybe it could be forming with \SoapParam and \SoapVar that is the problem?
Hi Benjamin, that was how i was originally using the SoapClient, but tried using SoapVar as the SoapClient appeared to be escaping the request.
I believe i have confirmed the problem is with Squiz, as i have replicated the issue using Curl to send up a raw soap request. I'll submit a support request to look into the global preferences that Jeremy suggested.
Jeremy, you hit the nail on the head. The "Filter Front End User Input" preference does effect soap api calls, so i'm going to look at a couple of options to see what i can do (preferring not to change that setting for security reasons)
You can create a User Group and set the preferences to turn that feature off for just those set users.