You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by su...@apache.org on 2011/02/07 09:07:30 UTC
svn commit: r1067872 - in /synapse/trunk/java:
modules/core/src/main/java/org/apache/synapse/config/xml/
modules/core/src/main/java/org/apache/synapse/mediators/
modules/core/src/main/java/org/apache/synapse/mediators/builtin/
modules/core/src/main/jav...
Author: supun
Date: Mon Feb 7 08:07:29 2011
New Revision: 1067872
URL: http://svn.apache.org/viewvc?rev=1067872&view=rev
Log:
applying SYNAPSE-718, thanks Ranga for the contribution
Added:
synapse/trunk/java/repository/conf/sample/resources/validate/validate3.xsd
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/KeyFactory.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorSerializer.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorSerializer.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/Key.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/ValidateMediator.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java
synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/ValidateMediatorTest.java
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/KeyFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/KeyFactory.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/KeyFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/KeyFactory.java Mon Feb 7 08:07:29 2011
@@ -48,10 +48,11 @@ public class KeyFactory {
public Key createKey(OMElement elem) {
Key key = null;
- OMAttribute attXslt = elem.getAttribute(ATT_KEY);
- if (attXslt != null) {
- String attributeValue = attXslt.getAttributeValue();
+ OMAttribute attKey = elem.getAttribute(ATT_KEY);
+
+ if (attKey != null) {
+ String attributeValue = attKey.getAttributeValue();
if (isDynamicKey(attributeValue)) {
/** dynamic key */
SynapseXPath synXpath = createSynXpath(elem, attributeValue);
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorFactory.java Mon Feb 7 08:07:29 2011
@@ -22,6 +22,7 @@ package org.apache.synapse.config.xml;
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMElement;
import org.apache.synapse.Mediator;
+import org.apache.synapse.mediators.Key;
import org.apache.synapse.mediators.builtin.ValidateMediator;
import org.jaxen.JaxenException;
import org.xml.sax.SAXException;
@@ -55,7 +56,7 @@ public class ValidateMediatorFactory ext
ValidateMediator validateMediator = new ValidateMediator();
// process schema element definitions and create DynamicProperties
- List<String> schemaKeys = new ArrayList<String>();
+ List<Key> schemaKeys = new ArrayList<Key>();
Iterator schemas = elem.getChildrenWithName(SCHEMA_Q);
while (schemas.hasNext()) {
@@ -64,7 +65,11 @@ public class ValidateMediatorFactory ext
OMElement omElem = (OMElement) o;
OMAttribute keyAtt = omElem.getAttribute(ATT_KEY);
if (keyAtt != null) {
- schemaKeys.add(keyAtt.getAttributeValue());
+ // KeyFactory for creating dynamic or static Key
+ KeyFactory keyFac = new KeyFactory();
+ // create dynamic or static key based on OMElement
+ Key generatedKey = keyFac.createKey(omElem);
+ schemaKeys.add(generatedKey);
} else {
handleException("A 'schema' definition must contain a local property 'key'");
}
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorSerializer.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorSerializer.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorSerializer.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/ValidateMediatorSerializer.java Mon Feb 7 08:07:29 2011
@@ -21,8 +21,9 @@ package org.apache.synapse.config.xml;
import org.apache.axiom.om.OMElement;
import org.apache.synapse.Mediator;
-import org.apache.synapse.mediators.builtin.ValidateMediator;
+import org.apache.synapse.mediators.Key;
import org.apache.synapse.mediators.MediatorProperty;
+import org.apache.synapse.mediators.builtin.ValidateMediator;
import java.util.List;
@@ -47,9 +48,11 @@ public class ValidateMediatorSerializer
SynapseXPathSerializer.serializeXPath(mediator.getSource(), validate, "source");
}
- for (String key : mediator.getSchemaKeys()) {
+ for (Key key : mediator.getSchemaKeys()) {
OMElement schema = fac.createOMElement("schema", synNS, validate);
- schema.addAttribute(fac.createOMAttribute("key", nullNS, key));
+ // Serialize Key using KeySerializer
+ KeySerializer keySerializer = new KeySerializer();
+ keySerializer.serializeKey(key, schema);
}
ResourceMapSerializer.serializeResourceMap(validate, mediator.getResourceMap());
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorSerializer.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorSerializer.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorSerializer.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/XSLTMediatorSerializer.java Mon Feb 7 08:07:29 2011
@@ -47,7 +47,7 @@ public class XSLTMediatorSerializer exte
OMElement xslt = fac.createOMElement("xslt", synNS);
if (mediator.getXsltKey() != null) {
- //xslt.addAttribute(fac.createOMAttribute("key", nullNS, mediator.getXsltKey()));
+ // Serialize Key using KeySerializer
KeySerializer keySerializer = new KeySerializer();
keySerializer.serializeKey(mediator.getXsltKey(), xslt);
} else {
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/Key.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/Key.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/Key.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/Key.java Mon Feb 7 08:07:29 2011
@@ -34,7 +34,7 @@ import org.apache.synapse.util.xpath.Syn
public class Key {
private static final Log log = LogFactory.getLog(Key.class);
/**
- * The static key value or generated key value for dynamic key
+ * The static key value
*/
private String keyValue = null;
/**
@@ -90,9 +90,8 @@ public class Key {
//if static kry: return static key
return keyValue;
} else if (expression != null) {
- //if dynamic key: set key value and return key value
- keyValue = expression.stringValueOf(synCtx);
- return keyValue;
+ //if dynamic key return evaluated value
+ return expression.stringValueOf(synCtx);
} else {
handleException("Can not evaluate the key: " +
"key should be static or dynamic key");
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/ValidateMediator.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/ValidateMediator.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/ValidateMediator.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/ValidateMediator.java Mon Feb 7 08:07:29 2011
@@ -27,6 +27,7 @@ import org.apache.synapse.SynapseLog;
import org.apache.synapse.config.Entry;
import org.apache.synapse.config.SynapseConfigUtils;
import org.apache.synapse.mediators.AbstractListMediator;
+import org.apache.synapse.mediators.Key;
import org.apache.synapse.mediators.MediatorProperty;
import org.apache.synapse.util.AXIOMUtils;
import org.apache.synapse.util.jaxp.SchemaResourceResolver;
@@ -59,8 +60,9 @@ public class ValidateMediator extends Ab
/**
* A list of property keys, referring to the schemas to be used for the validation
+ * key can be static or dynamic(xpath) key
*/
- private List<String> schemaKeys = new ArrayList<String>();
+ private List<Key> schemaKeys = new ArrayList<Key>();
/**
* A list of property keys, referring to the external schema resources to be used for the validation
@@ -112,7 +114,9 @@ public class ValidateMediator extends Ab
// flag to check if we need to initialize/re-initialize the schema
boolean reCreate = false;
// if any of the schemas are not loaded, or have expired, load or re-load them
- for (String propKey : schemaKeys) {
+ for (Key schemaKey : schemaKeys) {
+ // Derive actual key from message context
+ String propKey = schemaKey.evaluateKey(synCtx);
Entry dp = synCtx.getConfiguration().getEntryDefinition(propKey);
if (dp != null && dp.isDynamic()) {
if (!dp.isCached() || dp.isExpired()) {
@@ -131,7 +135,9 @@ public class ValidateMediator extends Ab
factory.setErrorHandler(errorHandler);
StreamSource[] sources = new StreamSource[schemaKeys.size()];
int i = 0;
- for (String propName : schemaKeys) {
+ for (Key schemaKey : schemaKeys) {
+ // Derive actual key from message context
+ String propName = schemaKey.evaluateKey(synCtx);
sources[i++] = SynapseConfigUtils.getStreamSource(synCtx.getEntry(propName));
}
@@ -313,7 +319,7 @@ public class ValidateMediator extends Ab
*
* @param schemaKeys list of local property names
*/
- public void setSchemaKeys(List<String> schemaKeys) {
+ public void setSchemaKeys(List<Key> schemaKeys) {
this.schemaKeys = schemaKeys;
}
@@ -345,7 +351,7 @@ public class ValidateMediator extends Ab
* The keys for the schema resources used for validation
* @return schema registry keys
*/
- public List<String> getSchemaKeys() {
+ public List<Key> getSchemaKeys() {
return schemaKeys;
}
Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/transform/XSLTMediator.java Mon Feb 7 08:07:29 2011
@@ -228,7 +228,7 @@ public class XSLTMediator extends Abstra
synchronized (transformerLock) {
// only first thread should create the template
if (isCreationOrRecreationRequired(synCtx)) {
- cachedTemplates = createTemplate(synCtx, synLog);
+ cachedTemplates = createTemplate(synCtx, synLog, generatedXsltKey);
}
}
}
@@ -347,9 +347,10 @@ public class XSLTMediator extends Abstra
* Create a XSLT template object and assign it to the cachedTemplates variable
* @param synCtx current message
* @param synLog logger to use
+ * @param generatedXsltKey evaluated xslt key(real key value) for dynamic or static key
* @return cached template
*/
- private Templates createTemplate(MessageContext synCtx, SynapseLog synLog) {
+ private Templates createTemplate(MessageContext synCtx, SynapseLog synLog, String generatedXsltKey) {
// Assign created template
Templates cachedTemplates = null;
@@ -358,8 +359,6 @@ public class XSLTMediator extends Abstra
// Allow xsl:import and xsl:include resolution
transFact.setURIResolver(new CustomJAXPURIResolver(resourceMap,
synCtx.getConfiguration()));
- // Derive actual key from message context
- String generatedXsltKey = xsltKey.evaluateKey(synCtx);
try {
cachedTemplates = transFact.newTemplates(
Modified: synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/ValidateMediatorTest.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/ValidateMediatorTest.java?rev=1067872&r1=1067871&r2=1067872&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/ValidateMediatorTest.java (original)
+++ synapse/trunk/java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/ValidateMediatorTest.java Mon Feb 7 08:07:29 2011
@@ -23,15 +23,17 @@ import junit.framework.TestCase;
import org.apache.commons.lang.mutable.MutableInt;
import org.apache.synapse.MessageContext;
import org.apache.synapse.TestMessageContextBuilder;
-import org.apache.synapse.config.xml.ValidateMediatorFactory;
import org.apache.synapse.config.SynapseConfigUtils;
+import org.apache.synapse.config.xml.ValidateMediatorFactory;
+import org.apache.synapse.mediators.Key;
import org.apache.synapse.mediators.TestMediateHandler;
import org.apache.synapse.mediators.TestMediator;
import org.apache.synapse.util.xpath.SynapseXPath;
import org.jaxen.JaxenException;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.Collections;
+import java.util.List;
import java.util.Properties;
public class ValidateMediatorTest extends TestCase {
@@ -120,6 +122,11 @@ public class ValidateMediatorTest extend
" </on-fail>" +
"</validate>";
+ private static final String DYNAMIC_KEY_ENVELOPE =
+ "<m0:CheckPriceRequest xmlns:m0=\"http://services.samples/xsd\">\n" +
+ "<m0:DynamicXsdKey>DynamicXsdKey</m0:DynamicXsdKey>\n" +
+ "</m0:CheckPriceRequest>\n" ;
+
private SynapseXPath createXPath(String expression) throws JaxenException {
SynapseXPath xpath = new SynapseXPath(expression);
xpath.addNamespace("m0", "http://services.samples/xsd");
@@ -153,7 +160,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Collections.singletonList("xsd-key"));
+ validate.setSchemaKeys(createKeyListFromStaticKey("xsd-key"));
validate.setSource(createXPath("//m0:CheckPriceRequest"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -169,7 +176,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Arrays.asList("xsd-key-1", "xsd-key-2"));
+ validate.setSchemaKeys(createKeyListFromMoreKeys("xsd-key-1", "xsd-key-2"));
validate.setSource(createXPath("//m1:Outer"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -186,7 +193,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Arrays.asList("xsd-key-1", "xsd-key-2"));
+ validate.setSchemaKeys(createKeyListFromMoreKeys("xsd-key-1", "xsd-key-2"));
validate.setSource(createXPath("//m1:Outer"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -203,7 +210,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Collections.singletonList("xsd-key-1"));
+ validate.setSchemaKeys(createKeyListFromStaticKey("xsd-key-1"));
validate.setSource(createXPath("//m0:CheckPriceRequest"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -219,7 +226,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Collections.singletonList("xsd-key-1"));
+ validate.setSchemaKeys(createKeyListFromStaticKey("xsd-key-1"));
validate.setSource(createXPath("//m0:CheckPriceRequest"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -235,7 +242,7 @@ public class ValidateMediatorTest extend
ValidateMediator validate = new ValidateMediator();
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Collections.singletonList("xsd-key-1"));
+ validate.setSchemaKeys(createKeyListFromStaticKey("xsd-key-1"));
validate.setSource(createXPath("//m0:CheckPriceRequest"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -273,7 +280,7 @@ public class ValidateMediatorTest extend
private void makeValidInvocation(ValidateMediator validate) throws Exception {
// set the schema url, source xpath and any name spaces
- validate.setSchemaKeys(Collections.singletonList("xsd-key-1"));
+ validate.setSchemaKeys(createKeyListFromStaticKey("xsd-key-1"));
validate.setSource(createXPath("//m0:CheckPriceRequest"));
MessageContext synCtx = new TestMessageContextBuilder()
@@ -284,5 +291,114 @@ public class ValidateMediatorTest extend
test(validate, synCtx, false);
}
+ /**
+ * Test that the Validator mediator is able to handle static and dynamic keys
+ * Xpath expression can be used to generate real key dynamically
+ *
+ * @throws Exception Exception in case of an error in tests
+ */
+ public void testWithStaticDynamicKeys() throws Exception {
+ for (int i = 0; i < 2; i++) {
+ testMultipleKeys(i);
+ }
+ }
+
+ /**
+ * Test with multiple keys including static and dynamic keys
+ *
+ * @param num number from 0 to 1
+ * @throws Exception Exception in case of an error in tests
+ */
+ private void testMultipleKeys(int num) throws Exception {
+
+ String xsdKeyValue = null;
+
+ String path;
+
+ SynapseXPath xpath;
+
+ // create a validate mediator
+ ValidateMediator validate = new ValidateMediator();
+
+ //default source, xsdFile, and state of key (dynamic or static)
+ String source = "";
+ String xsdFile = "";
+ boolean isDynamicKey = true;
+
+ // based on source, different xsdFiles can be used
+ if (num == 0) {
+ source = VALID_ENVELOPE;
+ xsdKeyValue = "xsd-key";
+ isDynamicKey = false;
+ xsdFile = "validate";
+
+ } else if (num == 1) {
+ source = DYNAMIC_KEY_ENVELOPE;
+ // xsdFile = "dynamic_key1.xsd";
+ xsdKeyValue = "DynamicXsdKey";
+ isDynamicKey = true;
+ xsdFile = "validate3";
+ }
+
+ if (isDynamicKey) {
+ // set the schema url using dynamic key (Xpath)
+ path = "//m0:CheckPriceRequest/m0:" + xsdKeyValue;
+ xpath = new SynapseXPath(path);
+ xpath.addNamespace("m0", "http://services.samples/xsd");
+ validate.setSchemaKeys(createKeyListFromDynamicKey(xpath));
+ } else {
+ // set the schema url using static key
+ validate.setSchemaKeys(createKeyListFromStaticKey(xsdKeyValue));
+ }
+
+ MessageContext synCtx = new TestMessageContextBuilder()
+ .addFileEntry(xsdKeyValue, "./../../repository/conf/sample/resources/validate/" + xsdFile + ".xsd")
+ .setBodyFromString(source).build();
+
+ test(validate, synCtx, false);
+ }
+
+ /**
+ * Create a Key list which consists with one static element
+ *
+ * @param keyName String key value (static key) to create Key object
+ * @return immutable Key list with one Key element
+ */
+ private List<Key> createKeyListFromStaticKey(String keyName) {
+ // create static key using given string key name
+ Key xsdKey = new Key(keyName);
+ return Collections.singletonList(xsdKey);
+ }
+
+ /**
+ * Create a Key list which consists with one dynamic element
+ *
+ * @param xpath String key value (static key) to create Key object
+ * @return immutable Key list with one Key element
+ */
+ private List<Key> createKeyListFromDynamicKey(SynapseXPath xpath) {
+ // create static key using given string key name
+ Key xsdKey = new Key(xpath);
+ return Collections.singletonList(xsdKey);
+ }
+
+
+ /**
+ * Create a Key list with given set of static keys
+ *
+ * @param keyNames Set of static keys to create list
+ * @return Key list
+ */
+ private List<Key> createKeyListFromMoreKeys(String... keyNames) {
+ List<Key> keyList = new ArrayList<Key>();
+ for (String keyName : keyNames) {
+ // create static key using given string key name
+ Key xsdKey = new Key(keyName);
+ keyList.add(xsdKey);
+
+ }
+ return keyList;
+ }
+
}
Added: synapse/trunk/java/repository/conf/sample/resources/validate/validate3.xsd
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/resources/validate/validate3.xsd?rev=1067872&view=auto
==============================================================================
--- synapse/trunk/java/repository/conf/sample/resources/validate/validate3.xsd (added)
+++ synapse/trunk/java/repository/conf/sample/resources/validate/validate3.xsd Mon Feb 7 08:07:29 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://services.samples/xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://services.samples/xsd">
+ <xs:element name="CheckPriceRequest">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DynamicXsdKey" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>