Contributions
SOAP UI Dynamic Mock response
Hi I was trying some scripting in Dynamic mock response for some web service request. I got most part of it, however i am stuck with the data type other than String. For example: I have this in my xsd: <xs:complexType name="StoreInformation_Type"> <xs:sequence> <xs:element name="StoreNumber" type="xs:string"/> <xs:element name="NhinStoreId" type="NhinId_Type"/> </xs:sequence> </xs:complexType> <xs:simpleType name="NhinId_Type"> <xs:restriction base="xs:string"> <xs:annotation> </xs:annotation> <xs:pattern value="[0-9]{1,10}"/> </xs:restriction> </xs:simpleType> Now i want to create a mock response : Something like this <v41:StoreNumber>${storeId}</v41:StoreNumber> <v41:NhinStoreId>${NhinStoreId}</v41:NhinStoreId> for which i get an error as line 10: string value '${NhinStoreId}}' does not match pattern for NhinId_Type in namespace http://ecc.pdxinc.com/webservice/StoreI ... ice/xsd/v4 and my sample script is def request = new XmlSlurper().parseText(mockRequest.requestContent); context.storeId = request.Body.getStoreInformation.StoreInformationRequest.StoreNumber.toString(); context.nhinid = request.Body.getStoreInformation.StoreInformationRequest.NhinStoreId.toString(); if (context.storeId =='114') { context.storeId ='114'; context.NhinStoreId='9000015'; } Will really appreciate if someone can anyone help me out with the thing i am missing over here.1.5KViews0likes0CommentsPatter 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/v412 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0Comments