gpt4 book ai didi

xsd - SOAPUI - 缺少带有名称的消息部分 - 架构合规性错误

转载 作者:行者123 更新时间:2023-12-05 06:44:06 24 4
gpt4 key购买 nike

这是带有内联模式的 wsdl 文件。我在本地调用了实际的 wsdl 文件,也就是 localhost/wsdl/。

<wsdl:definitions xmlns="http://soap.company.com/fetch_n_pay"
xmlns:tns="http://soap.company.com/fetch_n_pay"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://soap.company.com/fetch_n_pay">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://soap.company.com/fetch_n_pay">
<s:complexType name="fetchBookingDetailsRequType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="siteUrl" type="s:string"/>
<s:element name="confirmationCode" type="s:string"/>
<s:element name="vendorCode" type="s:string"/>
</s:all>
</s:complexType>
<s:complexType name="fetchBookingDetailsRespType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="isSuccess" type="s:boolean"/>
<s:element name="responseCode" type="s:int"/>
<s:element name="errorMessage" type="s:string"/>
<s:element name="sailingDate" type="s:date"/>
<s:element name="sailingName" type="s:string"/>
<s:element name="cruiselineName" type="s:string"/>
<s:element name="cruiselineId" type="s:string"/>
<s:element name="cabinNumber" type="s:string"/>
<s:element name="roomType" type="s:string"/>
<s:element name="shipName" type="s:string"/>
<s:element name="departingFrom" type="s:string"/>
<s:element name="returnDate" type="s:date"/>
<s:element name="numberOfAdults" type="s:int"/>
<s:element name="numberOfChildren" type="s:int"/>
<s:element name="numberOfSeniors" type="s:int"/>
<s:element name="numberOfInfants" type="s:int"/>
<s:element name="confirmationNumber" type="s:string"/>
<s:element name="balanceDueDate" type="s:dateTime"/>
<s:element name="depositDueDate" type="s:dateTime"/>
<s:element name="depositCollectedByCruiseline" type="s:boolean"/>
<s:element name="wasBookedSuccess" type="s:boolean"/>
<s:element name="shipImageUrl" type="s:string"/>
<s:element name="isCancelled" type="s:boolean"/>
<s:element name="insuranceAmount" type="s:double"/>
<s:element name="customerTitle" type="s:string"/>
<s:element name="customerFirstName" type="s:string"/>
<s:element name="customerLastName" type="s:string"/>
<s:element name="customerPhone" type="s:string"/>
<s:element name="customerEmail" type="s:string"/>
</s:all>
</s:complexType>
<s:element name="fetchBookingDetailsRequElement" type="tns:fetchBookingDetailsRequType" />
<s:element name="fetchBookingDetailsRespElement" type="tns:fetchBookingDetailsRespType" />
</s:schema>
</wsdl:types>

<wsdl:message name="fetchBookingDetailsSoapIn">
<wsdl:part name="banana1" element="tns:fetchBookingDetailsRequElement"/>
</wsdl:message>
<wsdl:message name="fetchBookingDetailsSoapOut">
<wsdl:part name="banana2" element="tns:fetchBookingDetailsRespElement"/>
</wsdl:message>


<wsdl:portType name="FetchAndPaySoap">
<wsdl:operation name="fetchBookingDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Gets Information for booking.
</wsdl:documentation>
<wsdl:input message="tns:fetchBookingDetailsSoapIn"/>
<wsdl:output message="tns:fetchBookingDetailsSoapOut"/>
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="FetchAndPaySoap" type="tns:FetchAndPaySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="fetchBookingDetails">
<soap:operation soapAction="http://soap.company.com/fetchBookingDetails" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="FetchAndPay">
<wsdl:port name="FetchAndPaySoap" binding="tns:FetchAndPaySoap">
<soap:address location="localhost/wsdl/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

1) 由于某种原因,请求 soap 添加到“fet:”命名空间

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fet="http://soap.company.com/fetch_n_pay">
<soapenv:Header/>
<soapenv:Body>
<fet:fetchBookingDetailsRequElement>
<!--You may enter the following 5 items in any order-->
<fet:version>?</fet:version>
<fet:timestamp>?</fet:timestamp>
<fet:siteUrl>?</fet:siteUrl>
<fet:confirmationCode>?</fet:confirmationCode>
<fet:vendorCode>?</fet:vendorCode>
</fet:fetchBookingDetailsRequElement>
</soapenv:Body>
</soapenv:Envelope>

2) SOAP 响应有效但架构合规性失败。这是错误:

这是响应:

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<fetchBookingDetailsResponse
xmlns="http://soap.company.com/fetch_n_pay">
<version>0.1.0</version>
<timestamp>2015-06-18T13:37:08-04:00</timestamp>
<isSuccess>false</isSuccess>
<responseCode>47</responseCode>
<errorMessage>No results were found.</errorMessage>
</fetchBookingDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

我正在尝试符合架构,以便可以对其进行解析。

任何东西都将不胜感激。谢谢!

最佳答案

您的验证引擎已经给了您答案,不是fetchBookingDetailsResponse,而是fetchBookingDetailsRespElement

关于xsd - SOAPUI - 缺少带有名称的消息部分 - 架构合规性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30923305/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com