2016-10-05 10 views
4

SOAPサービスはDELPHIで開発され、IISに公開されています。私たちがいくつかの奇妙な振る舞いを見つけたサービスをテストすると、間違ったパラメータ型の操作を呼び出した後にsoap応答構造が変化します。同じコールから異なる応答を返すSOAPサービスwebサービス

テストケースはシンプルで、我々は呼んでいるこの簡単な操作:

Test1_1(i:Integer; var s:string); 

コール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:WS_MCH_PrivadosIntf-IWS_MCH_Privados"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <numero xsi:type="xsd:int">1</numero> 
     </urn:Test1_1> 
    </soapenv:Body> 
</soapenv:Envelope> 

レスポンス:

<SOAP-ENV:Envelope 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> 
     <Test1_1Response xmlns="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados"> 
     <res xmlns="http://www.w3.org/2001/XMLSchema">TEST1_1 OK</res> 
     </Test1_1Response> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

コール2(間違ったパラメータの型)

要求:

<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:WS_MCH_PrivadosIntf-IWS_MCH_Privados"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <numero xsi:type="xsd:int">a</numero> 
     </urn:Test1_1> 
    </soapenv:Body> 
</soapenv:Envelope> 

応答:

<SOAP-ENV:Envelope 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> 
     <SOAP-ENV:Fault> 
     <faultcode>SOAP-ENV:Server</faultcode> 
     <faultstring>'a' is not a valid integer value</faultstring> 
     <faultactor/> 
     </SOAP-ENV:Fault> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

コール3(右のパラメータの型、および最初の呼び出しから、ここでの応答の変化)

要求:

<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:WS_MCH_PrivadosIntf-IWS_MCH_Privados"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <urn:Test1_1 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <numero xsi:type="xsd:int">1</numero> 
     </urn:Test1_1> 
    </soapenv:Body> 
</soapenv:Envelope> 

応答:

<SOAP-ENV:Envelope 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 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS1="urn:WS_MCH_PrivadosIntf-IWS_MCH_Privados"> 
     <NS1:Test1_1Response> 
     <res xsi:type="xsd:string">TEST1_1 OK</res> 
     </NS1:Test1_1Response> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

は、あなたが見ることができるように、最初の呼び出し3番目はまったく同じですが、応答が異なります。私が前に言ったように、それは間違ったパラメータタイプの呼び出しの後で変わる。 サービスのクライアントは、変更後の応答を認識しません。

この現象についての手がかりは? 私はサーバが常に同じ方法で答える必要があります。

答えて

1

Ideraに連絡してテストケースを送付する必要があります。

私は数ヶ月前にあなたの説明どおりに同様の問題があり、このエラーを解決できませんでした。私はIdera(Delphiの所有者)に連絡し、これをVCLエラーとして報告しました。

私は返信と修正を受けましたが、ホットフィックスをあなたと共有することができません。 (これについては私に連絡しないでください)

これはDelphi SeattleまたはUpdate 1のDelphi Berlinのホットフィックスです。

+0

なぜあなたはvclのバグだと思いますか?サーバーにはビジュアルコンポーネントはありません。 – Pablo

+0

エラーは、IdHttp、Soap.WebNode、Soapのソースコード内にあります(何か)System.Classes、System.Rtti。そのためには、Delphiの下位バージョンを使用している場合は、修正プログラムのためにIderaに連絡する必要があります。 – buttercup

関連する問題