我试图通过使用如代码所示的assign动作将bpel变量LVSProxyPLResponse推送到bpel进程的输出变量
<bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve"><tns:LVMathProxyResponse xmlns:tns="http://lvmathproxy.bpel.bps" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:Mathresult></tns:Mathresult>
</tns:LVMathProxyResponse>
</bpel:literal>
</bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="LVSProxyPLResponse">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
<![CDATA[result]]>
</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:Mathresult]]>
</bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
通过我的bpel进程中的调用操作调用ESB上的REST代理Web服务,我可以在BPS上读取输出变量LVSProxyPLResponse时验证。
输出变量有一个复杂的类型元素,如下面的代码所示
<element name="LVMathProxyResponse">
<complexType>
<sequence>
<element name="Mathresult" type="tns:LVMathType"></element>
</sequence>
</complexType>
</element>
出于某种原因,我无法将值推送到输出变量,因为我收到以下错误。
[2012-03-29 20:27:39,380] INFO - AxisService - The system is attempting to engage a module that is already engaged: ServerAdminModule
[2012-03-29 20:27:39,511] ERROR - BpelEngineImpl - Scheduled job failed; jobDetail=JobDetails( instanceId: null mexId: hqejbhcnphr75sbpnvnci6 processId: {http://lvmathproxy.bpel.bps}LVMathProxy-58 type: INVOKE_INTERNAL channel: null correlatorId: null correlationKeySet: null retryCount: null inMem: false detailsExt: {enqueue=false})
java.lang.IllegalArgumentException: null parent
at org.apache.ode.utils.DOMUtils.findChildByName(DOMUtils.java:776)
at org.apache.ode.utils.DOMUtils.findChildByName(DOMUtils.java:771)
at org.apache.ode.bpel.runtime.ASSIGN.evalQuery(ASSIGN.java:658)
at org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:207)
at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:386)
at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:89)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:879)
at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:205)
at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:309)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:250)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:305)
at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:458)
at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:553)
at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:445)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:537)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:531)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:284)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:239)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:531)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:515)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
我错过了什么或做错了什么?
我也收到以下错误
2012-03-30 20:21:09,062] ERROR - BPELProcessProxy - Timeout or execution error when waiting for response to MEX {MyRoleMex#hqejbhcnphr75w46k8n8wm [Client hqejbhcnphr75w46k8n8wl] calling {http://lvmathprocess.bpel.bps}LVMService.process(...)} java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture@1d1339b timed out(120000 ms) when waiting for a response!
java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture@1d1339b timed out(120000 ms) when waiting for a response! at org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture.get(MyRoleMessageExchangeImpl.java:250)
当我在BPS版本2.1.0上运行时,我看不到任何进程实例。但我可以在版本2.1.2上看到该实例并且可以查看相关变量,但在使用此服务时仍然会出现上述错误。
答案 0 :(得分:0)
好奇 - 您的输出内容是XSD?如果我是对的,它应该是XML格式。