我正在模拟一个肥皂网络服务,无论请求正文如何,我都只能返回默认的第一个响应。
我的尝试基于文档Multiple Transaction Examples并且我对自己做错了什么感到困惑。
举个例子:
+ Request
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="">
<SOAP-ENV:Body>
<m:transaction-identity-verification xmlns:m="">
</m:transaction-identity-verification>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
+ Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="">
<env:Header />
<env:Body>
<java:transaction-response xmlns:java="j">
<transaction-status>
<transaction-id>third_8020750179321</transaction-id>
<transaction-request-id>george_8020860578800</transaction-request-id>
<accounts-transaction-id>13</accounts-transaction-id>
<reference-id>13</reference-id>
<transaction-result>questions</transaction-result>
</transaction-status>
</java:transaction-response>
</env:Body>
</env:Envelope>
+ Request
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="">
<SOAP-ENV:Body>
<m:transaction-continue xmlns:m="">
</m:transaction-continue>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
+ Response
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="">
<env:Header/>
<env:Body>
<java:transaction-response xmlns:java="">
<transaction-status>
<transaction-id>cont_1_11020785803682</transaction-id>
<transaction-request-id>11020943348626</transaction-request-id>
<accounts-transaction-id>0</accounts-transaction-id>
<transaction-result>passed</transaction-result>
</transaction-status>
</java:transaction-response>
</env:Body>
</env:Envelope>
在上面的示例中,即使我发布了两个不同的请求,我也只会收到第一个响应。根据链接的文档,这应该是可能的。