It is misleading to say soap message validation can be used for JSON validation!

Hi all,

Came across this video where it says we can use soap message validation for validating JSON.

Link : https://youtu.be/iO2CW6ymN7U

Note that soap message validation matches both semantics and syntaxes unlike the one shown in demonstration.

The best way to do JSON validation is to use JSON schema, so let me know if you have used any other alternative ways.

We have used Javascript for validations, recently a apigee engineer claimed that we can use soap message validation for JSON, it sounded incorrect but when I saw in the documentation there is a 4MVD video about it.

Thanks.

0 8 508
8 REPLIES 8

They should have different policy for validating JSON schema. This was always confusing to me until i found this can be used for both JSON and SOAP .

Can some one from APIGEE , comment on this ?

@shivaspk you can also check this article by @Kurt Kanaskie

to validate JSON schema with Open API and JavaScript

@Faij Ahmad & @shivaspk ,

Yes, That's correct. It's confusing & doesn't make sense. Actually, Just in the Policy Add UI it says "Soap Message Validation Policy " but when you actually see the XML root element of policy it says "Message Validation". So, It's more of UI error than Policy design.

Docs too says "Message Validation Policy". So, It's more or less we just need to change the label in the policy add UI Screen.

Also, Like mentioned in the video "Message Validation Policy" in JSON context can be used only to determine valid JSON or NOT. It doesn't validate against any schema. You need to use javascript policy for same.

I will open a ticket with Engineering / Product team regarding the label change in the policy add UI. Hope it helps.

Thank you so much @Anil Sagar

Hi Anil, I wanted to increase the limit of tracing section and I would like to know how can I increase the trace section for whole uniting testing. (It may take couple of hours)

@saigueunath Boggavaraou Please put this as a new question as this is not related to this question. Thanks

Not applicable

Yes, ShivaPSK, thanks for mentioning out here. I have also got same confusion by looking a that video and confused. It is just an UI error as Anil mentioned below. I have tried and got result for proper filed validation for JSON payload.

FYI, I updated the SOAP Message Validation Policy documentation to include examples that check JSON and XML for well-formedness (in addition to an XSD and SOAP validation examples). I think the video you mentioned should say "well-formedness" rather than "validation" for JSON.