0
私はBPELプロセスを使用して2つのWebサービスを編成しています。基本的に、これら2つのWebサービスはブックオブジェクトを返します。 最初のWebサービス、次のデータ形式を返します。第二には、次のフォーマットを返しXSLTを使用してデータ形式を変更する
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<searchBooksResponse xmlns="urn:soft.xyz.ac.be/">
<book xmlns="">
<author>Robert Ludlum</author>
<year>2004</year>
<isbn>95248457</isbn>
<language>fr</language>
<publisher>Orion</publisher>
<title>La Mémoire dans la peau (SOFT Library)</title>
</book>
<book xmlns="">
<author>Douglas Adams</author>
<year>2002</year>
<isbn>60184547</isbn>
<language>fr</language>
<publisher>Del Rey</publisher>
<title>Le Guide du Voyageur Galactique (SOFT Library)</title>
</book>
</searchBooksResponse>
</soapenv:Body>
</soapenv:Envelope>
:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<searchForBooksResponse xmlns="http://library.be">
<searchForBooksReturn>
<author>James, E. L.</author>
<date>3914-01-10T23:00:00.000Z</date>
<isbn>0345803485</isbn>
<language>English</language>
<publisher>Vintage Books</publisher>
<title>50 Shades of Grey (National Library)</title>
</searchForBooksReturn>
<searchForBooksReturn>
<author>James Dashner</author>
<date>3914-04-20T22:00:00.000Z</date>
<isbn>0385388896</isbn>
<language>English</language>
<publisher>The Maze Runner Series</publisher>
<title>The Maze Runner Series (National Library)</title>
</searchForBooksReturn>
</searchForBooksResponse>
</soapenv:Body>
</soapenv:Envelope>
結果をマージするために、私はXLSファイルに次のBPELコマンドを使用します。ここ
<![CDATA[bpel:doXslTransform("books.xsl", $sl_searchBooksResponse.parameters, "second", $nl_searchForBooksResponse.parameters/*)]]>
とXSLファイルされる:次のよう
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL
/Transform" xmlns="urn:soft.librarysearch" xmlns:tns="urn:soft.librarysearch" xmlns:nl="http://library.be">
<xsl:param name="second">
foo
</xsl:param>
<xsl:template match="/">
<root>
<xsl:apply-templates />
<xsl:copy-of select="$second"/>
</root>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:template> -->
</xsl:stylesheet>
しかし、結果は矛盾が示しています。ここBPELコマンドがある
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body>
<LibrarySearchResponse xmlns="urn:soft.librarysearch" xmlns:tns="urn:soft.librarysearch">
<tns:query/>
<tns:books xmlns:nl="http://library.be">
<searchBooksResponse xmlns="urn:soft.xxx.ac.be/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<book xmlns="">
<author>Robert Ludlum</author>
<year>2004</year>
<isbn>95248457</isbn>
<language>fr</language>
<publisher>Orion</publisher>
<title>La Mémoire dans la peau (SOFT Library)</title>
</book>
<book xmlns="">
<author>Douglas Adams</author>
<year>2002</year>
<isbn>60184547</isbn>
<language>fr</language>
<publisher>Del Rey</publisher>
<title>Le Guide du Voyageur Galactique (SOFT Library)</title>
</book>
</searchBooksResponse>
<searchForBooksReturn xmlns="http://library.be" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<author>James, E. L.</author>
<date>3914-01-10T23:00:00.000Z</date>
<isbn>0345803485</isbn>
<language>English</language>
<publisher>Vintage Books</publisher>
<title>50 Shades of Grey (National Library)</title>
</searchForBooksReturn>
<searchForBooksReturn xmlns="http://library.be" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<author>James Dashner</author>
<date>3914-04-20T22:00:00.000Z</date>
<isbn>0385388896</isbn>
<language>English</language>
<publisher>The Maze Runner Series</publisher>
<title>The Maze Runner Series (National Library)</title>
</searchForBooksReturn>
</tns:books>
</LibrarySearchResponse> </soapenv:Body> </soapenv:Envelope>
私が使用しているすべてのブックオブジェクトをしたいです同じタグ「本」を削除して同じレベルに配置する必要があります。「searchBooksResponse "。たとえば、「searchForBooksReturn」を「本」に変更します。どうやってやるの?私の非常に長い質問に患者に感謝します。
ありがとうございました、それだけで2つのWebサービス(国立図書館)のいずれかからデータを返します。ここで返されるデータの形式は次のとおりです。 ... searchForBooksReturn> ... searchForBooksResponse > soapenv:Body> –
lenhhoxung
@lenhhoxung私はあなたのコメントを理解していません。私はあなたの質問に投稿した "返されたデータの*形式"を使ってこれをテストしました(私は "2番目"の応答の代わりにファイルを使いました)。 –
@ michael.hork257k:xlsファイルを使用すると、SOFT LIBRARYとNATIONAL LIBRARYの両方のWebサービスからデータが返されます。 xlsファイルを使用すると、NATIONAL LIBRARYからのデータのみが受信されます。 NATIONAL LIBRARYのデータは、常に searchForBooksResponse> –
lenhhoxung