基于工作SoapUI查询的Talend tSoap-“;参数中存在一个或多个错误。”;
我在SoapUI中有一个工作SOAP请求: 在wsdl中,我有关于函数的以下信息:基于工作SoapUI查询的Talend tSoap-“;参数中存在一个或多个错误。”;,soap,talend,Soap,Talend,我在SoapUI中有一个工作SOAP请求: 在wsdl中,我有关于函数的以下信息: <operation name="Pers_List"> <soap:operation soapAction="urn:server#Pers_ListMin" style="rpc"/> <input> <soap:body use="encoded" namespace="u
<operation name="Pers_List">
<soap:operation soapAction="urn:server#Pers_ListMin" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:server" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:server" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
我确实想使用tSOAP组件在Talend中调用它:
”
2021-04-27
2021-04-27
"
执行时,我收到以下错误消息:
[statistics] connected
|<ns1:Pers_ListMinResponse xmlns:ns1="urn:server"><return type="tns:ListPersMin_Response"><Response type="tns:Response"><ResponseCode type="xsd:int">503</ResponseCode><ResponseMessage type="xsd:string">One or more errors are present in parameters.</ResponseMessage><ExecutionTime type="xsd:int">0</ExecutionTime></Response><Pers arrayType="tns:PersMin[0]" type="SOAP-ENC:Array" /></return></ns1:Pers_ListMinResponse>|
[statistics] disconnected
[统计]已连接
|503参数中存在一个或多个错误。0|
[统计]断开连接
在soap消息中插入身份验证数据时,我确实得到了相同的响应:
<Auth xsi:type=\"dsk:Auth\" xmlns:dsk=\"DSK_SOAP_API\">
<!--You may enter the following 2 items in any order-->
<Login xsi:type=\"xsd:string\">SOAP</Login>
<Password xsi:type=\"xsd:string\">x</Password>
</Auth>
肥皂
x
因为我对SOAP非常陌生,所以可能会错过一个小错误。
在选择SOAP1.1或1.2时,我也有同样的问题
根据@Bogdan的建议,我添加了TcpMon用于调试: 我在SoapUI上的帖子如下所示:
POST /soap/DSK_WS.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:server#Pers_List"
Content-Length: 954
Host: 192.168.119.46:8888
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:server">
<soapenv:Header/>
<soapenv:Body>
<urn:Pers_List soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<Auth xsi:type="dsk:Auth" xmlns:dsk="DSK_SOAP_API">
<!--You may enter the following 2 items in any order-->
<Login xsi:type="xsd:string">SOAP</Login>
<Password xsi:type="xsd:string">x</Password>
</Auth>
<Period xsi:type="dsk:Period" xmlns:dsk="DSK_SOAP_API">
<!--You may enter the following 2 items in any order-->
<StartDate xsi:type="xsd:string">2021-04-27</StartDate>
<EndDate xsi:type="xsd:string">2021-04-27</EndDate>
</Period>
</urn:Pers_List>
</soapenv:Body>
</soapenv:Envelope>
POST/soap/DSK_WS.php HTTP/1.1
接受编码:gzip,deflate
内容类型:text/xml;字符集=UTF-8
SOAPAction:“urn:server#Pers_列表”
内容长度:954
主持人:192.168.119.46:8888
连接:保持活力
用户代理:ApacheHttpClient/4.5.5(Java/12.0.1)
肥皂
x
2021-04-27
2021-04-27
通过tSOAP发布的帖子:
POST /soap/DSK_WS.php HTTP/1.1
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: urn:server#Pers_List
Content-Type: application/soap+xml; charset=utf-8
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.8.0_161
Host: 192.168.119.46:8888
Connection: keep-alive
Content-Length: 966
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:server">
<soapenv:Header/>
<soapenv:Body>
<urn:Pers_List soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<Auth xsi:type="dsk:Auth" xmlns:dsk="DSK_SOAP_API">
<!--You may enter the following 2 items in any order-->
<Login xsi:type="xsd:string">SOAP</Login>
<Password xsi:type="xsd:string">x</Password>
</Auth>
<Period xsi:type="dsk:Period" xmlns:dsk="DSK_SOAP_API">
<!--You may enter the following 2 items in any order-->
<StartDate xsi:type="xsd:string">2021-04-27</StartDate>
<EndDate xsi:type="xsd:string">2021-04-27</EndDate>
</Period>
</urn:Pers_List>
</soapenv:Body>
</soapenv:Envelope>
POST/soap/DSK_WS.php HTTP/1.1
接受:application/soap+xml、text/html、image/gif、image/jpeg、*;q=.2,*/*;q=.2
SOAPAction:urn:server#Pers_列表
内容类型:应用程序/soap+xml;字符集=utf-8
缓存控制:没有缓存
Pragma:没有缓存
用户代理:Java/1.8.0_161
主持人:192.168.119.46:8888
连接:保持活力
内容长度:966
肥皂
x
2021-04-27
2021-04-27
我看到的唯一区别是:
Accept-Encoding: gzip,deflate
=>
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;charset=UTF-8
=>
Content-Type: application/soap+xml; charset=utf-8
<No cache>
=>
Cache-Control: no-cache
POST /soap/DSK_WS.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:server#Pers_List"
接受编码:gzip,deflate
=>
接受:application/soap+xml、text/html、image/gif、image/jpeg、*;q=.2,*/*;q=.2
内容类型:text/xml;字符集=UTF-8
=>
内容类型:应用程序/soap+xml;字符集=utf-8
=>
缓存控制:没有缓存
注意:我确实尝试过Pers_ListMin和Pers_List,它们都给出了相同的结果。Thx@Bogdan,感谢您再次要求我使用TCPMon 我确实在上面的问题中添加了来自TCPMon的请求 我发现使用SoapUI发送以下内容:
Accept-Encoding: gzip,deflate
=>
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;charset=UTF-8
=>
Content-Type: application/soap+xml; charset=utf-8
<No cache>
=>
Cache-Control: no-cache
POST /soap/DSK_WS.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:server#Pers_List"
Talend与tSOAP和SOAP版本1.2兼容:
POST /soap/DSK_WS.php HTTP/1.1
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: "urn:server#Pers_List"
Content-Type: application/soap+xml; charset=utf-8
POST /soap/DSK_WS.php HTTP/1.1
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: "urn:server#Pers_List"
Content-Type: text/xml; charset=utf-8
使用tSOAP和SOAP 1.1版的Talend:
POST /soap/DSK_WS.php HTTP/1.1
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: "urn:server#Pers_List"
Content-Type: application/soap+xml; charset=utf-8
POST /soap/DSK_WS.php HTTP/1.1
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
SOAPAction: "urn:server#Pers_List"
Content-Type: text/xml; charset=utf-8
所以这里的问题是SOAP版本。即使如此,对于1.1版,我也有其他的例外,这让我觉得我在这方面完全错了。你应该看看电线上的信息,看看发生了什么。如果来自SoapUI的请求有效,那么来自Talend的消息很可能在某种程度上存在格式错误。它可能与“Authentifizierung erforderlich”复选框或其他内容有关。我建议您添加一个HTTP监视器来查看正在交换的消息,并查看与工作的消息有什么不同。SoapUI可以帮助您:tx@Bogdan我确实在描述中添加了来自TCPMon的详细信息。