apigee SOAP validation -


i'd validate soap request wrapped in mtom via apigee soap message validation against wsdl file.

when submit request header

content-type: multipart/related; type="application/xop+xml";start="http://tempuri.org/0";boundary="uuid:4fa9f99a-7f53-4ac6-84ff-05655e9af89c+id=22";start-info="text/xml"

the validation policy seems pass-through / not trigger. put bogus info envelope, not fail. i've seen post mentioned in order soap validation policy trigger, header must specify content-type: "application/xml". if so, mtom wrapping causes problems since request body not pure xml:

ex. mtom wrapper: --uuid:4fa9f99a-7f53-4ac6-84ff-05655e9af89c+id=22 content-id: http://tempuri.org/0 content-transfer-encoding: 8bit content-type: application/xop+xml;charset=utf-8;type="text/xml"

so, long-winded (sorry) way ask quesiton: how use soap message validation policy in apigee if expects pure xml , have mtom wrapper?

side note, tried extracting soap message/envelope variable (bodyvar) , having policy source defined variable, apigee complains variable not resolve message:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <messagevalidation async="false" continueonerror="false" enabled="true" name="wsdl_validation">     <displayname>wsdl_validation</displayname>     <faultrules/>     <properties/>     <soapmessage />   <element namespace="http://schemas.xmlsoap.org/soap/envelope/">body</element>     <source>bodyvar</source>     <resourceurl>wsdl://formrequest.wsdl</resourceurl> </messagevalidation> 

running give me fault: {"fault":{"faultstring":"variable env not resolve message","detail":{"errorcode":"steps.messagevalidation.nonmessagevariable"}}}

yes, soap message validation works if content-type application/xml. guessing need set content-type above mentioned value backend understands it. suggest this: - while sending message client, send application/xml - once soap message validated, can use assign message or javascript policy set content-type header desired, before sending target.

hopefully, approach works you.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -