SOAP faults - Metadata service


(jtris) #1

Hi all,

Running:
Squiz Matrix v5.4.0.3 (Latest as of 6 Feb 2017)

I had a bash with the SOAP service over the weekend and while most items ran smoothly, I ran into a couple of issues.

1 - GetMetadataFieldValues always returns the first value, even when requesting with no caching.

This function seems to never update. Even after setting new values for meta fields on assets, the SOAP request GetMetadataFieldValues always returns the first value it ever returned on the asset.

So far I’ve tried disabling wsdl caching in php.ini, and deleting the wsdl file in /tmp, creating a new SOAP server, throwing random variables in with the request - all with no luck.

No matter what I do, the first value ever seen by the SOAP service is always returned. No other services behave this way with status, attributes, etc always showing the correct values at the time of request.

2 - I can’t get GetMetadataFieldsDetailOfSchema to work. I’ve tested this with multiple schemas, some empty, some with a few fields/sections, some with just one field, and the fault returned is always the same, whether authenticating as a system admin, or the root user.

This request:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <GetMetadataFieldsDetailOfSchema xmlns="http://xxxx.com/_web_services/soap">
         <SchemaID>XXXXX</SchemaID>
      </GetMetadataFieldsDetailOfSchema>
   </soap:Body>
</soap:Envelope>

Always returns:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
   <env:Body>
      <env:Fault>
         <env:Code>
            <env:Value>env:Receiver</env:Value>
         </env:Code>
         <env:Reason>
            <env:Text>Cannot use string offset as an array</env:Text>
         </env:Reason>
      </env:Fault>
   </env:Body>
</env:Envelope>

It would be amazing if I could get pointed in the right direction, so far the service is great, and it would be perfect if I could get these features to work.


(jtris) #2

Results of further testing on 4.18, 5.3.1, and 5.4.0.3…

Item 1 behaved the same across all systems. Not sure if problem with server settings, or bug with SOAP metadata service. It’s strange that only the metadata values cache - nothing else caches on any of the systems tested, only metadata.

Item 2 only occurred in 5.4.0.3, with 4.18 and 5.3.1 both executing GetMetadataFieldsDetailOfSchema without any changes to the call, so I’d say this feature might not work in 5.4.0.3 - can anyone with access to other instances test and confirm?


(Chiranjivi Upreti) #3

Thanks jtris, I have reported the issue with GetMetadataFieldsDetailOfSchema as a bug and we’ll work to get it fixed soon.

However I am not able replicate the other issue with GetMetadataFieldValues. Are you are regenerating the metadata (SOAP function RegenerateMetadataSchema) after the metadata values update?

Chiran