Ich habe Web-Service-Projekt erstellt. Im Anschluss wird das Script meines Test Case, das Element Text überprüft, wie in der documentation gezeigt:Katalon Studio: Wie erstelle ich VerifyElementText Test Case für MTOM-fähige SOAP Web Services?
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
def response = WS.sendRequest(findTestObject('ProductById'))
WS.verifyElementText(response, "Product.Reference", "MyReference")
Wenn ich diesen Testfall renne ich den Fehler bin immer: [FAILED] - Unable to verify element text (Root cause: org.xml.sax.SAXParseException: Content is not allowed in prolog.)
Dann habe ich verwendet : com.kms.katalon.core.util.KeywordUtil#logInfo
die response.responseText
, habe ich erhalten, um zu sehen, was war:
--uuid:4e39ea48-6560-46b7-a30c-201dfaf98f51
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getProductResponse xmlns:ns2="http://mycompany.com/"><Product><Reference>VW3A8306R</Reference></Product></ns2:getProductResponse></soap:Body></soap:Envelope>
--uuid:4e39ea48-6560-46b7-a30c-201dfaf98f51--
die Web-Service-I-Tests sind MTOM
aktiviert. Aus diesem Grund hat der Antworttext dieses Format.
Wie Testfall in diesem Fall erstellen?