使用wso2bps-3.5.1
我的Assign活动中的节点的count()被分配给Integer类型的元素(verifyTerminationRequest / connections):
<bpel:copy>
<bpel:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[count($closeAccountResponse.closeAccountResponsePart/xclac:accountConnections/xcom:accountConnection)]]>
</bpel:from>
<bpel:to part="parameters" variable="verifyTerminationRequest">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[wvete:verifyTerminationRequestMessage[1]/wvete:connections]]></bpel:query>
</bpel:to>
</bpel:copy>
由于某种原因,生成的消息如下所示:
<verifyTerminationRequest xmlns="http://seb.se/ops/ica/vete/wsdl">
<ax2410:verifyTerminationRequestMessage xmlns:ax2410="http://seb.se/ops/ica/vete/wsdl">
<ax2410:connections>2.0</ax2410:connections>
</ax2410:verifyTerminationRequestMessage>
</verifyTerminationRequest>
verifyTerminationRequestMessage / connections = 2.0抛出异常:
Fault Name {http://seb.se/ops/ica/vete/wsdl}UnknownFault
Fault Data
<?xml version="1.0" encoding="UTF-8"?><message>
<Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>java.lang.NumberFormatException: For input string: "2.0"</faultstring>
</Fault>
</message>
Error Line 356
为什么?
我尝试过圆(count(...))但没有成功。
答案 0 :(得分:0)
尝试数字功能 - 数字(count())对我有用。