4
シナリオ:SOAP :: Liteでネームスペースの生成をマングルするにはどうすればよいですか?
- クライアントがSOAP::Liteを使ってPerlスクリプトです。
- サーバーは、SpringとCXFを使用するJavaベースのアプリケーションです。
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <createFolder xmlns="http://xyz.com/"> <parentId xsi:type="xsd:string">1</parentId> <folderName xsi:type="xsd:string">Test</folderName> </createFolder> </soap:Body> </soap:Envelope>
この要求はCXFに対して失敗します:
私のクライアントは、WSDL、次のSOAP要求に基づいて生成されます。
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xyz="http://xyz.com/">
<soap:Body>
<xyz:createFolder>
<parentId xsi:type="xsd:string">1</parentId>
<folderName xsi:type="xsd:string">Test</folderName>
</xyz:createFolder>
</soap:Body>
</soap:Envelope>
差が要素createFolder
の名前空間の定義です:いくつかの調査の後、私は、次の手動作成した依頼が動作することが分かりました。
私の質問はSOAPリクエストを作成するためにSOAPLiteを設定するにはどうすればよいですか?
またはその逆:SOAP :: Lite要求スタイルを受け入れるようにCXFを設定するにはどうすればよいですか?
CXFの構成上の問題でもあります。 – Philipp