在调用我的 JDBC 连接器之前,我试图在 Mule 中转换 XML,但是转换失败:
错误 2013-02-05 14:43:53,989 [WrapperListener_start_runner] org.mule.module.launcher.application.DefaultMuleApplication: null org.xml.sax.SAXParseException: prolog 中不允许有内容。在 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(未知来源)
这甚至在我传入 XML 之前,这里是 Mule 配置:
<jms:inbound-endpoint topic="${topic.logTopic}" connector-ref="jmsConnector" doc:name="JMS">
<jms:transaction action="NONE" timeout="${queue.transaction.timeout}" />
</jms:inbound-endpoint>
<mule-xml:xslt-transformer outputEncoding="UTF-8" ignoreBadInput="false" encoding="UTF-8">
<mule-xml:xslt-text>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="ZLOIPRO1" >
<table>
<th><td>ZLOIPRO1</td></th>
<xsl:apply-templates select="data"/>
</table>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="TABNAME">
<xsl:value-of select="$TABNAM"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="MANDT">
<xsl:value-of select="$MANDT"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="DOCNUM">
<xsl:value-of select="$DOCNUM"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="DOCREL">
<xsl:value-of select="$DOCREL"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="STATUS">
<xsl:value-of select="$STATUS"/>
</xsl:attribute>
</xsl:template>
<xsl:template match="data" >
<xsl:attribute name="DIRECT">
<xsl:value-of select="$DIRECT"/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
</mule-xml:xslt-text>
</mule-xml:xslt-transformer>
<object-to-string-transformer/>
<jdbc:xml-to-maps-transformer name="XMLToMaps"/>
<jdbc:outbound-endpoint queryKey="insertion" connector-ref="insertionConnector">
这是我的 XML:
<ZLOIPRO1>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<MANDT>300</MANDT>
<DOCNUM>0000000000705856</DOCNUM>
<DOCREL>640</DOCREL>
<STATUS>30</STATUS>
<DIRECT>1</DIRECT>
<OUTMOD>2</OUTMOD>
<EXPRSS />
<TEST />
<IDOCTYP>LOIPRO01</IDOCTYP>
<CIMTYP>ZLOIPRO1</CIMTYP>
<MESTYP>LOIPRO</MESTYP>
<MESCOD />
<MESFCT />
<STD />
<STDVRS />
<STDMES />
<SNDPOR>SAPR3P</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPFC />
<SNDPRN>R3PCLNT300</SNDPRN>
<SNDSAD />
<SNDLAD />
<RCVPOR>5555</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPFC />
<RCVPRN>SBCR3P300</RCVPRN>
<RCVSAD />
<RCVLAD />
<CREDAT>20120512</CREDAT>
<CRETIM>182139</CRETIM>
<REFINT />
<REFGRP />
<REFMES />
<ARCKEY />
<SERIAL>20120512182139</SERIAL>
</EDI_DC40>
<E1AFKOL SEGMENT="1">
<AUFNR>8390</AUFNR>
<APROZ>0.00</APROZ>
<AUART>ZP01</AUART>
<AUFLD>20120605</AUFLD>
<AUTYP>10</AUTYP>
<BAUMNG>1.0000</BAUMNG>
<BMEINS>EA</BMEINS>
<BMENGE>1.0000</BMENGE>
<CY_SEQNR>00000000000000</CY_SEQNR>
<DISPO>401</DISPO>
<FHORI>000</FHORI>
<FREIZ>000</FREIZ>
<FTRMI>00000000</FTRMI>
<FTRMS>20120619</FTRMS>
<GAMNG>1.0000</GAMNG>
<GASMG>1.0000</GASMG>
<GETRI>00000000</GETRI>
<GEUZI>000000</GEUZI>
<GLTRI>00000000</GLTRI>
<GLTRP>20120619</GLTRP>
<GLTRS>20120619</GLTRS>
<GLUZP>000000</GLUZP>
<GLUZS>000000</GLUZS>
<GMEIN>EA</GMEIN>
<GSTRI>00000000</GSTRI>
<GSTRP>20120619</GSTRP>
<GSTRS>20120619</GSTRS>
<GSUZP>000000</GSUZP>
<GSUZS>000000</GSUZS>
<IASMG>0.000</IASMG>
<IGMNG>0.000</IGMNG>
<LODIV>0.000</LODIV>
<MATNR>1007012-04-C</MATNR>
<PLAUF>20120605</PLAUF>
<PLNAL>1</PLNAL>
<PLNME>EA</PLNME>
<PLNNR>50000147</PLNNR>
<PLNTY>N</PLNTY>
<PLSVB>99999999.000</PLSVB>
<PLSVN>1.000</PLSVN>
<PSPEL>00000000</PSPEL>
<RMNGA>0.000</RMNGA>
<SBMNG>0.000</SBMNG>
<SICHZ>000</SICHZ>
<SLSBS>0.000</SLSBS>
<SLSVN>0.000</SLSVN>
<TERKZ>2</TERKZ>
<VORGZ>000</VORGZ>
<WERKS>3100</WERKS>
<E1JSTKL SEGMENT="1">
<STAT>E0006</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0001</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0016</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0028</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0115</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0215</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0291</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0361</STAT>
</E1JSTKL>
<E1JSTKL SEGMENT="1">
<STAT>I0420</STAT>
</E1JSTKL>
<E1AFFLL SEGMENT="1">
<APLZL>00000001</APLZL>
<AUSCHL>2</AUSCHL>
<FLGAT>0</FLGAT>
<PLNFL>0</PLNFL>
<E1AFVOL SEGMENT="1">
<VORNR>0010</VORNR>
<ABRUE>0.000000000000000E+00</ABRUE>
<ANZZL>0</ANZZL>
<ARBEI>0.0</ARBEI>
<ARBID>10000031</ARBID>
<ARUZE>HUR</ARUZE>
<AUFAK>0.000</AUFAK>
<BEARZ>0.000000000000000E+00</BEARZ>
<BEAZE>HUR</BEAZE>
<BMSCH>1.000</BMSCH>
<CY_SEQNRV>00000000000000</CY_SEQNRV>
<DAUNO>0.0</DAUNO>
<DAUMI>0.0</DAUMI>
<FSAVD>20120619</FSAVD>
<FSAVZ>000000</FSAVZ>
<FSEDD>20120619</FSEDD>
<FSEDZ>000000</FSEDZ>
<FSELD>20120619</FSELD>
<FSELZ>000000</FSELZ>
<FSEVD>20120619</FSEVD>
<FSEVZ>000000</FSEVZ>
<FSSAD>20120619</FSSAD>
<FSSAZ>000000</FSSAZ>
<FSSBD>20120619</FSSBD>
<FSSBZ>000000</FSSBZ>
<FSSLD>20120619</FSSLD>
<FSSLZ>000000</FSSLZ>
<KALID>US</KALID>
<LAR01>LAB02</LAR01>
<LAR02>LAB01</LAR02>
<LIEGZ>0.000000000000000E+00</LIEGZ>
<LMNGA>0.000</LMNGA>
<LTXA1>General Assembly</LTXA1>
<MEINH>EA</MEINH>
<MINWE>0.000</MINWE>
<MGVRG>1.000</MGVRG>
<PEINH>0</PEINH>
<PREIS>0.00</PREIS>
<PRZNT>0</PRZNT>
<RMNGA>0.000</RMNGA>
<RSTZE>HUR</RSTZE>
<RUEST>0.000000000000000E+00</RUEST>
<SPLIM>0</SPLIM>
<SSAVD>20120619</SSAVD>
<SSAVZ>000000</SSAVZ>
<SSEDD>20120619</SSEDD>
<SSEDZ>000000</SSEDZ>
<SSELD>20120619</SSELD>
<SSELZ>000000</SSELZ>
<SSEVD>20120619</SSEVD>
<SSEVZ>000000</SSEVZ>
<SSSAD>20120619</SSSAD>
<SSSAZ>000000</SSSAZ>
<SSSBD>20120619</SSSBD>
<SSSBZ>000000</SSSBZ>
<SSSLD>20120619</SSSLD>
<SSSLZ>000000</SSSLZ>
<STEUS>PP03</STEUS>
<TRANZ>0.000000000000000E+00</TRANZ>
<USR04>0.000</USR04>
<USR05>0.000</USR05>
<VGE01>HUR</VGE01>
<VGE02>HUR</VGE02>
<VGW01>0.000</VGW01>
<VGW02>5.000</VGW02>
<VGW03>0.000</VGW03>
<VGW04>0.000</VGW04>
<VGW05>0.000</VGW05>
<VGW06>0.000</VGW06>
<VGWTS>Z001</VGWTS>
<WARTZ>0.000000000000000E+00</WARTZ>
<XMNGA>0.000</XMNGA>
<ZLPRO>0.000</ZLPRO>
<ZMINB>0.000</ZMINB>
<ZMINU>0.000</ZMINU>
<ZTMIN>0.000</ZTMIN>
<ZWMIN>0.000</ZWMIN>
<ZWNOR>0.000</ZWNOR>
<ISAVD>00000000</ISAVD>
<IEAVD>00000000</IEAVD>
<ISDD>00000000</ISDD>
<ISDZ>000000</ISDZ>
<IEDD>00000000</IEDD>
<IEDZ>000000</IEDZ>
<ANZMA>0.00</ANZMA>
<E1JSTVL SEGMENT="1">
<STAT>I0001</STAT>
</E1JSTVL>
</E1AFVOL>
</E1AFFLL>
<E1AFPOL SEGMENT="1">
<POSNR>0001</POSNR>
<AMEIN>EA</AMEIN>
<BMENG>0.000</BMENG>
<KDAUF>1000021859</KDAUF>
<KDEIN>0000</KDEIN>
<KDPOS>000010</KDPOS>
<MATNR>1007012-04-C</MATNR>
<MEINS>EA</MEINS>
<PLNUM>2718553</PLNUM>
<PSAMG>0.000</PSAMG>
<PSMNG>1.000</PSMNG>
<UMREN>1</UMREN>
<UMREZ>1</UMREZ>
<WEBAZ>0</WEBAZ>
<WEMNG>0.000</WEMNG>
<ZE1AFPO SEGMENT="1">
<ZATWTB>IZMT</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>IDCF</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>PPSR</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>PF01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>RFPO</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>TR01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWT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
<ZE1AFPO SEGMENT="1">
<ZATWTB>RFPO</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>SC01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>SU01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>TM01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>TP01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>TR01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>WT21</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>SC01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>HP01</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X013</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X001</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X007</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X011</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X003</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X015</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X005</ZATWTB>
</ZE1AFPO>
<ZE1AFPO SEGMENT="1">
<ZATWTB>X009</ZATWTB>
</ZE1AFPO>
</E1AFPOL>
</E1AFKOL>
</IDOC>
</ZLOIPRO1>
有什么建议么?
问候斯里