proper syntax for bpel bpel:doXslTransform

心已入冬 提交于 2019-12-11 03:37:54

问题


I am trying to do an XSL transform on an xml structure in a bpel assignment statement. There is a syntax problem, but I am having trouble finding official documentation. There are examples all over the internet but I have not found a clear explanation. Here is my best shot. What do the last two parameters do? Why is eclipse saying the first argument must be a literal, even though test3.xsl is a string?

<bpel:assign validate="yes" name="Assign">
    <bpel:copy keepSrcElementName="no">
        <bpel:from>
            <![CDATA[bpel:doXslTransform("test3.xsl", $personalInfoServiceOutput.parameters), "middle", $positionSkillManagementInput]]>
        </bpel:from>
        <bpel:to variable="positionSkillManagementInput"></bpel:to>
    </bpel:copy>
</bpel:assign>

回答1:


The signature of doXSLTransform looks as follows:

object bpel:doXslTransform(string, node-set, (string, object)*)

The first parameter is the name of the XSLT script, the second parameter is an XPath identifying the source document (e.g. a variable, part, nodeset, node). The third and the fourth parameter is a key-value pair, the string is the key and the object is the value. Those pairs are mapped into the script's parameter context so that you can access these values by their name in the script. There can be any number of these pairs.

The best resource to look up such things is the WS-BPEL 2.0 specification, doXSLTransform is described in Sect. 8.4




回答2:


When I use the following code :

<bpel:copy keepSrcElementName="no">
<bpel:from>
<![CDATA[bpel:doXslTransform("parseSample.xsl", $output.payload)]]>
</bpel:from>
<bpel:to variable="output"></bpel:to>
</bpel:copy>

I also get the error, that first argument must be literal string.

But, when I deploy my service (with error) to wso2 bps, it works fine.

You can try with this.




回答3:


I faced the same issue. Agree with NGoyal. Shows error in BPEL but works when deployed.



来源:https://stackoverflow.com/questions/16161204/proper-syntax-for-bpel-bpeldoxsltransform

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!