使用变量时WSO2 BPS WS-Bpel编译错误

时间:2014-03-11 15:35:52

标签: wso2 bpel

嗨(抱歉可能是英文不好)。

我正在使用Wso2 Developer Studio构建Bpel工作流,在我的工作流中我需要调用几个Web服务,并且根据这些服务的输出采用不同的路径,为此我需要使用变量,但是我在wso2 bps中部署工作流程时出现编译错误:文件上传失败:BPEL编译失败!

我搜索过,有些人说这是命名空间问题,但我不知道如何解决这个问题。低于错误和bpel源。

TID: [0] [BPS] [2014-03-11 10:23:30,889] ERROR {org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor} -  File upload failed :BPEL Compilation Failure! {org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor}
java.lang.Exception: BPEL Compilation Failure!
    at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.validateBPELPackage(BPELUploadExecutor.java:295)
    at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.execute(BPELUploadExecutor.java:103)
    at org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor.executeGeneric(AbstractFileUploadExecutor.java:104)
    at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager$CarbonXmlFileUploadExecHandler.execute(FileUploadExecutorManager.java:392)
    at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager$FileUploadExecutionHandlerManager.startExec(FileUploadExecutorManager.java:276)
    at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager.execute(FileUploadExecutorManager.java:125)
    at org.wso2.carbon.ui.transports.FileUploadServlet.doPost(FileUploadServlet.java:57)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.ode.bpel.compiler.api.CompilationException: error: [CompilationErrors] Compilation completed with 2 error(s):
    file:/C:/WSO2BP~1.0/bin/../tmp/work/bpelTemp/1.394551410832569E12/TestVars_1.0.0/TestVars.bpel:42: error: [UndeclaredXsdType] Attempt to reference undeclared XSD type "{http://www.w3.org/2001/XMLSchema}string".
    file:/C:/WSO2BP~1.0/bin/../tmp/work/bpelTemp/1.394551410832569E12/TestVars_1.0.0/TestVars.bpel:68: error: [UndeclaredVariable] Attempt to reference undeclared variable "VarTest".

    at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:815)
    at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:278)
    at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:364)
    at org.apache.ode.store.DeploymentUnitDir$5.run(DeploymentUnitDir.java:221)
    at org.apache.ode.utils.InternPool.runBlock(InternPool.java:57)
    at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:218)
    at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:177)
    at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.validateBPELPackage(BPELUploadExecutor.java:292)
    ... 38 more

bpel代码:

    <!-- TestVars BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="TestVars"
         targetNamespace="http://wso2.org/bps/sample"
         suppressJoinFailure="yes"
         xmlns:tns="http://wso2.org/bps/sample"
         xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://facade.uaecd.gov.co/" xmlns:xsd="http://facade.uaecd.gov.co/types/">

    <!-- Import the client WSDL -->
    <bpel:import namespace="http://facade.uaecd.gov.co/" location="WSVerificarRegistroPredio.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
    <bpel:import location="TestVarsArtifacts.wsdl" namespace="http://wso2.org/bps/sample" 
            importType="http://schemas.xmlsoap.org/wsdl/" />

    <!-- ================================================================= -->         
    <!-- PARTNERLINKS                                                      -->
    <!-- List of services participating in this BPEL process               -->
    <!-- ================================================================= -->         
    <bpel:partnerLinks>
        <!-- The 'client' role represents the requester of this service. -->
        <bpel:partnerLink name="client"
                     partnerLinkType="tns:TestVars"
                     myRole="TestVarsProvider"
                     />
        <bpel:partnerLink name="GPLWSCatastro" partnerLinkType="tns:PLTypeWSCatastro1" partnerRole="RoleWSCatastro1"></bpel:partnerLink>
    </bpel:partnerLinks>

    <!-- ================================================================= -->         
    <!-- VARIABLES                                                         -->
    <!-- List of messages and XML documents used within this BPEL process  -->
    <!-- ================================================================= -->         
    <bpel:variables>
        <!-- Reference to the message passed as input during initiation -->
        <bpel:variable name="input"
                  messageType="tns:TestVarsRequestMessage"/>

        <!-- 
          Reference to the message that will be returned to the requester
          -->
        <bpel:variable name="output"
                  messageType="tns:TestVarsResponseMessage"/>
        <bpel:variable name="VarTest" type="ns1:string"></bpel:variable>
        <bpel:variable name="GPLWSCatastroResponse" messageType="ns:WSVerificarRegistroPredio_getRegistroCatastroResponse"></bpel:variable>
        <bpel:variable name="GPLWSCatastroRequest" messageType="ns:WSVerificarRegistroPredio_getRegistroCatastro"></bpel:variable>
    </bpel:variables>

    <!-- ================================================================= -->         
    <!-- ORCHESTRATION LOGIC                                               -->
    <!-- Set of activities coordinating the flow of messages across the    -->
    <!-- services integrated within this business process                  -->
    <!-- ================================================================= -->         
    <bpel:sequence name="main">

        <!-- Receive input from requester. 
             Note: This maps to operation defined in TestVars.wsdl 
             -->
        <bpel:receive name="receiveInput" partnerLink="client"
                 portType="tns:TestVars"
                 operation="process" variable="input"
                 createInstance="yes"/>

        <!-- Generate reply to synchronous request -->
        <bpel:assign validate="no" name="Assign">
            <bpel:copy>
                <bpel:from>
                    <bpel:literal xml:space="preserve">0</bpel:literal>
                </bpel:from>
                <bpel:to variable="VarTest"></bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:assign validate="no" name="Assign1">


            <bpel:copy><bpel:from>
                    <bpel:literal xml:space="preserve"><ns:getRegistroCatastroElement xmlns:ns="http://facade.uaecd.gov.co/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ns:identificacion>ns:identificacion</ns:identificacion>
  <ns:chip>ns:chip</ns:chip>
  <ns:address>ns:address</ns:address>
  <ns:correousuario>ns:correousuario</ns:correousuario>
  <ns:pwd>ns:pwd</ns:pwd>
  <ns:ipRemoto>ns:ipRemoto</ns:ipRemoto>
</ns:getRegistroCatastroElement></bpel:literal>
                </bpel:from>
                <bpel:to part="parameters" variable="GPLWSCatastroRequest"></bpel:to>

            </bpel:copy>
            <bpel:copy><bpel:from part="payload" variable="input">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
                </bpel:from>
                <bpel:to part="parameters" variable="GPLWSCatastroRequest">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:chip]]></bpel:query>
                </bpel:to>

            </bpel:copy>
        </bpel:assign>
        <bpel:sequence name="Sequence">
            <bpel:invoke name="Invoke" partnerLink="GPLWSCatastro" operation="getRegistroCatastro" portType="ns:WSVerificarRegistroPredio" inputVariable="GPLWSCatastroRequest" outputVariable="GPLWSCatastroResponse"></bpel:invoke>
        </bpel:sequence>
        <bpel:assign validate="no" name="Assign2">
            <bpel:copy>
                <bpel:from><bpel:literal><tns:TestVarsResponse xmlns:tns="http://wso2.org/bps/sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tns:result>tns:result</tns:result>
</tns:TestVarsResponse>
</bpel:literal></bpel:from>
                <bpel:to variable="output" part="payload"></bpel:to>
            </bpel:copy>
            <bpel:copy>
                <bpel:from part="parameters" variable="GPLWSCatastroResponse">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:result/xsd:respuesta]]></bpel:query>
                </bpel:from>
                <bpel:to part="payload" variable="output">
                    <bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
                </bpel:to>
            </bpel:copy>
        </bpel:assign>
        <bpel:reply name="replyOutput" 
               partnerLink="client"
               portType="tns:TestVars"
               operation="process" 
               variable="output"
               />
    </bpel:sequence>
</bpel:process>

0 个答案:

没有答案