commune
12 years agoNew Contributor
Patter Matching in Dynamic Script in response
I have a type defined in xsd as
<xs:simpleType name="Test_Type">
<xs:restriction base="xs:string">
<xs:annotation>
</xs:annotation>
<xs:pattern value="[0-9]{1,10}"/>
</xs:restriction>
</xs:simpleType>
I am trying to create a dynamic response through the script
Something like
context.testStoreId='9000015';
and using it in my response as
<v41:TestStoreId>${testStoreId}</v41:TestStoreId>
I am getting this error
line 10: string value '${testStoreId}' does not match pattern forTest_Type in namespace http://ecc.pdxinc.com/webservice/TestIn ... ice/xsd/v4
<xs:simpleType name="Test_Type">
<xs:restriction base="xs:string">
<xs:annotation>
</xs:annotation>
<xs:pattern value="[0-9]{1,10}"/>
</xs:restriction>
</xs:simpleType>
I am trying to create a dynamic response through the script
Something like
context.testStoreId='9000015';
and using it in my response as
<v41:TestStoreId>${testStoreId}</v41:TestStoreId>
I am getting this error
line 10: string value '${testStoreId}' does not match pattern forTest_Type in namespace http://ecc.pdxinc.com/webservice/TestIn ... ice/xsd/v4