0

wso2esb 4.7.0 と wso2dss3.0.1 を使用しています。適切なデータを取得していますが、クライアントに送信できません。この問題は、メッセージを変換できません。メッセージにエラーが表示されます。ローカル エントリは xslt ファイルです

    <?xml version="1.0" encoding="UTF-8"?>
    <localEntry xmlns="http://ws.apache.org/ns/synapse" key="emp_xslt">
       <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                       xmlns:f="http://ws.wso2.org/dataservice"
                       version="1.0">
          <xsl:output method="xml"/>
          <xsl:param name="eage"/>
          <xsl:param name="eno"/>
          <xsl:template match="/">
             <xsl:apply-templates select="/f:empCollection"/>
          </xsl:template>
          <f:for-each select="//f:emp">
             <tr>
                <eage>
                   <xsl:value-of select="eage"/>
                </eage>&gt;
              <eno>
                   <xsl:value-of select="eno"/>
                </eno>
             </tr>
          </f:for-each>
       </xsl:stylesheet>
       <description/>
</localEntry>

xslt構成は次のようになります

<sequence xmlns="http://ws.apache.org/ns/synapse" name="emp2">
   <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:s="http://ws.wso2.org/dataservice" name="eno" expression="//s:empCollection/s:emp/s:eno" scope="default" type="STRING"/>
   <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:s="http://ws.wso2.org/dataservice" name="eage" expression="//s:empCollection/s:emp/s:eage" scope="default" type="STRING"/>
   <log level="full">
      <property name="response" value="not working"/>
      <property xmlns:ns="http://org.apache.synapse/xsd" name="eno" expression="get-property('eno')"/>
      <property xmlns:ns="http://org.apache.synapse/xsd" name="eage" expression="get-property('eage')"/>
   </log>
   <xslt xmlns:f="http://ws.wso2.org/dataservice" xmlns:ns="http://org.apache.synapse/xsd" key="emp_xslt" source="/f:empCollection/f:emp">
      <property name="eno" expression="get-property('eno')"/>
      <property name="eage" expression="get-property('eage')"/>
   </xslt>
   <log level="full"/>
</sequence>

しかし、配列データ形式をクライアントに表示したいのですが、このようにesbからデータを取得しています

Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><empCollection xmlns="http://ws.wso2.org/dataservice"><emp><ename>faisal</ename><eno>5</eno><eage>26</eage></emp><emp><ename>suresh</ename><eno>6</eno><eage>26</eage></emp><emp><ename>prashant</ename><eno>7</eno><eage>28</eage></emp><emp><ename>anil</ename><eno>2</eno><eage>27</eage></emp><emp><ename xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><eno>0</eno><eage>0</eage></emp><emp><ename>-1</ename><eno>0</eno><eage>0</eage></emp></empCollection></soapenv:Body></soapenv:Envelope>

そして、私のesbログはコンソールで多くのエラーを評価しています.xpathエラーが表示されることがあります name=null 私のデータの配列を作成することは可能ですか

[2013-10-10 15:07:44,425]  INFO - LogMediator To: /services/xsltExmp, MessageID: urn:uuid:619c7f86-f0d1-4f57-935b-66b485f8fa08, Direction: request
[2013-10-10 15:07:44,440]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:9f8bf2a6-5736-48c9-bda5-c163c6c571d6, Direction: response, response = not working, eno = 567200, eage = 2626282700, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><empCollection xmlns="http://ws.wso2.org/dataservice"><emp><ename>faisal</ename><eno>5</eno><eage>26</eage></emp><emp><ename>suresh</ename><eno>6</eno><eage>26</eage></emp><emp><ename>prashant</ename><eno>7</eno><eage>28</eage></emp><emp><ename>anil</ename><eno>2</eno><eage>27</eage></emp><emp><ename xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><eno>0</eno><eage>0</eage></emp><emp><ename>-1</ename><eno>0</eno><eage>0</eage></emp></empCollection></soapenv:Body></soapenv:Envelope>
[2013-10-10 15:07:44,442] ERROR - XSLTMediator The evaluation of the XPath expression /f:empCollection/f:emp did not result in an OMNode : null
[2013-10-10 15:07:44,442] ERROR - XSLTMediator Unable to perform XSLT transformation using : Value {name ='null', keyValue ='emp_xslt'} against source XPath : /f:empCollection/f:emp reason : The evaluation of the XPath expression /f:empCollection/f:emp did not result in an OMNode : null
org.apache.synapse.SynapseException: The evaluation of the XPath expression /f:empCollection/f:emp did not result in an OMNode : null
    at org.apache.synapse.util.xpath.SourceXPathSupport.selectOMNode(SourceXPathSupport.java:100)
    at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:211)
    at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:191)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
[2013-10-10 15:07:44,444]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:9f8bf2a6-5736-48c9-bda5-c163c6c571d6, Direction: response, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Unable to perform XSLT transformation using : Value {name ='null', keyValue ='emp_xslt'} against source XPath : /f:empCollection/f:emp reason : The evaluation of the XPath expression /f:empCollection/f:emp did not result in an OMNode : null, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><empCollection xmlns="http://ws.wso2.org/dataservice"><emp><ename>faisal</ename><eno>5</eno><eage>26</eage></emp><emp><ename>suresh</ename><eno>6</eno><eage>26</eage></emp><emp><ename>prashant</ename><eno>7</eno><eage>28</eage></emp><emp><ename>anil</ename><eno>2</eno><eage>27</eage></emp><emp><ename xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><eno>0</eno><eage>0</eage></emp><emp><ename>-

100

4

1 に答える 1