我使用Spyne创建简单的webservie,当我调用该示例服务时,我得到以下错误:
faultType: <Fault senv:Client.SchemaValidationError: :10:0:ERROR:SCHEMASV:SCHEMAV_CVC_ELT_1: Element 'testMethod': No matching global declaration available for the validation root.>
***********************************************************
我是Python新手&尝试提取XML属性。下面是我尝试过的代码。
import xml.etree.ElementTree as ET
a = '''<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<checkVatResponse xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
我需要从XML文件中读取元素。文件中的内容具有SOAP内容。在从文件中读取元素时,XPath定义的错误如下所示:
致命: localhost:=> {“已更改”:false,"msg":“/x:soap:Envelope/x:soap:Body/z:WebService\_Response/z:WebService\_GenericResult/ (无效表达式)中的语法错误”}
不可接受的任务:
- name: read value from the ayehu xml
xml:
path: ./ayehu_rest_out.xml
xpath: /