ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammo van Lessen <tvanles...@gmail.com>
Subject Re: Initializing fault variable
Date Thu, 05 Dec 2013 10:08:23 GMT
Hi Jitendra,

are you sure that the fault was really caught? If it was not caught, it
will be passed to the callee, looks like this is what happened. Do the
faultname and type match to what is declared in the WSDL?

Tammo


On Tue, Dec 3, 2013 at 7:28 AM, Kharche, Jitendra <
Jitendra.Kharche@geometricglobal.com> wrote:

> Thanks Tammo.
>
> It worked.
> However the next invoke activity to send an email is not getting invoked.
>
> On receiving the fault from web service, I am setting 2 variables
> mailSubject and mailMessage. Then I prepare the NotificationRequest
> (variable NotificationServicePLRequest) by assigning the respective values
> from mailSubject and mailMessage. However I am not getting and email. My
> mail server is configured correctly and works in some another processes.
>
> I guess the invoke activity is not at all getting executed. What am I
> missing?
>
> One more thing. In this case I get following response from the process
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring xmlns:axis2ns3="http://testws1.ws.test.jk/
> ">axis2ns3:WSException</faultstring>
>          <detail>
>             <ns2:WSException xmlns:ns2="http://testws1.ws.test.jk/"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>                <id>0</id>
>                <message>Helper failed. Reason: Failed</message>
>             </ns2:WSException>
>          </detail>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> Whereas I think it should be
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
>    <soapenv:Body>
>       <TestProcessResponse xmlns="http://jk.test.bpel.TestProcess"
> xmlns:tns="http://jk.test.bpel.TestProcess" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
>          <tns:result>Failed</tns:result>
>       </TestProcessResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> Why the process is sending the fault (that I have caught) to the process
> caller. I want to catch the fault and report it via notification.
>
> Regards,
> Jitendra
>
> -----Original Message-----
> From: Tammo van Lessen [mailto:tvanlessen@gmail.com]
> Sent: Monday, December 02, 2013 6:45 PM
> To: user
> Subject: Re: Initializing fault variable
>
> So you want to get access to the fault message? This is AFAIK not possible
> with a catch all. You can use a <catch> and define a faultVariable, to
> which the fault details will be assigned.
>
> HTH,
>   Tammo
>
>
> On Mon, Dec 2, 2013 at 2:08 PM, Kharche, Jitendra <
> Jitendra.Kharche@geometricglobal.com> wrote:
>
> > Thanks Tammo.
> >
> > You are right.
> >
> > But as I mentioned
> > If I explicitly initialize the variable TestWSPLException with some
> > default values, then I do not get any error on the tomcat console, but
> > the actual failure message coming from the web service in the fault is
> > lost and I get the mail with the default values I have set during
> > initialization of the variable.
> >
> > Regards,
> > Jitendra
> >
> > -----Original Message-----
> > From: Tammo van Lessen [mailto:tvanlessen@gmail.com]
> > Sent: Monday, December 02, 2013 6:17 PM
> > To: user
> > Subject: Re: Initializing fault variable
> >
> > Hi Jitendra,
> >
> > thanks for the attachment. Apparently the variable TestWSPLException
> > is never written and thus not initialized. This is causing the
> > selectionFailure in the 4th copy statement in the catch all. I think
> > if you make sure that some data is written to this variable, you should
> be fine.
> >
> > Best,
> >   Tammo
> >
> >
> > On Mon, Dec 2, 2013 at 1:30 PM, Kharche, Jitendra <
> > Jitendra.Kharche@geometricglobal.com> wrote:
> >
> > > Thanks Tammo for quick reply.
> > > Please find attached the BPEL and Web Service.
> > >
> > > Regards,
> > >
> > >
> > > -----Original Message-----
> > > From: Tammo van Lessen [mailto:tvanlessen@gmail.com]
> > > Sent: Monday, December 02, 2013 5:32 PM
> > > To: user
> > > Subject: Re: Initializing fault variable
> > >
> > > Hi Jitendra,
> > >
> > > could you attach your bpel process, ideally the whole deployable?
> > > That would make it easier to analyze the issue. It looks like you're
> > > using an xpath expression in the to-spec of an assign. This only
> > > works if the variable is prepopulated with the XML structure.
> > >
> > > Thanks,
> > >   Tammo
> > >
> > >
> > > On Mon, Dec 2, 2013 at 11:16 AM, jk <jitendrakharche@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > I have a BPEL process deployed in ODE 1.3.6 on Tomcat 7.0.42.
> > > > This process invokes a web service that throws an exception.
> > > > In the process I have used a FaultHandler having a CatchAll on
> > > > that invoke activity.
> > > > In this CatchAll, I assign 2 variables "mailSubject" and
> "mailMessage"
> > > > that I use later to send failure mail notificatrion.
> > > > However when the web service fault message is received I get
> > > > following exception on the tomcat console.
> > > >
> > > > *org.apache.ode.bpel.common.FaultException: The variable
> > > > TestWSPLException isn't properly initialized.*
> > > >
> > > > I have declared the variable TestWSPLException in BPEL with the
> > > > messageType equal to the exception thrown by the web service.
> > > >
> > > > Why ODE is not initializing the variable on receiving the fault?
> > > > If I explicitely initialize the variable TestWSPLException with
> > > > some default values, then I do not get any error on the tomcat
> > > > console, but the actual failure message coming from the web
> > > > service in the fault is lost and I get the mail with the dafault
> > > > values I have set during initialization of the variable.
> > > >
> > > > I am attaching both the BPEL and WebService files.
> > > > The complete startck trace is given below.
> > > >
> > > > 15:38:28,341 WARN  [ExternalService] Fault response:
> > > > faultName=WSException
> > > > faultType={http://testws1.ws.test.jk/}WSException
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <message><WSException><ns2:WSException
> > > > xmlns:ns2="http://testws1.ws.test.jk/"
> > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
> > > > "><id>0</id><message>Hel
> > > > per failed. Reason:
> > > > Failed</message></ns2:WSException></WSException></message>
> > > > 15:38:28,356 ERROR [JaxenContexts] bpws:getVariableValue threw
> > > > FaultException
> > > > org.apache.ode.bpel.common.FaultException: The variable
> > > > TestWSPLException isn't properly initialized.
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.runtime.ScopeFrame.fetchVariableData(ScopeFrame.
> > > ja
> > > va:199)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.runtime.ScopeFrame.fetchVariableData(ScopeFrame.
> > > ja
> > > va:209)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.runtime.ExprEvaluationContextImpl.readVariable(E
> > > xp
> > > rEvaluationContextImpl.java:96)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.elang.xpath10.runtime.JaxenContexts.getVariableV
> > > al
> > > ue(JaxenContexts.java:173)
> > > >         at
> > > > org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:215)
> > > >         at org.jaxen.Context.getVariableValue(Context.java:196)
> > > >         at
> > > >
> > > >
> > > org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariable
> > > Re
> > > ferenceExpr.java:106)
> > > >         at
> > > > org.jaxen.expr.DefaultPathExpr.evaluate(DefaultPathExpr.java:137)
> > > >         at
> > > >
> > > >
> > > org.jaxen.expr.DefaultFunctionCallExpr.evaluateParams(DefaultFunctio
> > > nC
> > > allExpr.java:195)
> > > >         at
> > > >
> > > >
> > > org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallE
> > > xp
> > > r.java:179)
> > > >         at
> > > > org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
> > > >         at
> > org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:677)
> > > >         at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:216)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.elang.xpath10.runtime.XPath10ExpressionRuntime.e
> > > va
> > > luate(XPath10ExpressionRuntime.java:103)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.runtime.ExpressionLanguageRuntimeRegistry.evalua
> > > te
> > > (ExpressionLanguageRuntimeRegistry.java:80)
> > > >         at
> > org.apache.ode.bpel.runtime.ASSIGN.evalRValue(ASSIGN.java:225)
> > > >         at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:399)
> > > >         at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:87)
> > > >         at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown
> Source)
> > > >         at
> > > >
> > > >
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > > ss
> > > orImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > > >         at
> > > >
> > org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:45
> > 1)
> > > >         at
> org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntim
> > > eC
> > > ontextImpl.java:978)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.
> > > ja
> > > va:456)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineI
> > > mp
> > > l.java:460)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerI
> > > mp
> > > l.java:450)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(Simple
> > > Sc
> > > heduler.java:523)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(Simple
> > > Sc
> > > heduler.java:517)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simp
> > > le
> > > Scheduler.java:289)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(Simp
> > > le
> > > Scheduler.java:244)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSc
> > > he
> > > duler.java:517)
> > > >         at
> > > >
> > > >
> > > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSc
> > > he
> > > duler.java:501)
> > > >         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(ThreadPoolExe
> > > cu
> > > tor.java:886)
> > > >         at
> > > >
> > > >
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> > > java:908)
> > > >         at java.lang.Thread.run(Thread.java:662)
> > > > TestProcess.zip
> > > > <http://apache-ode.996305.n3.nabble.com/file/n16976/TestProcess.zi
> > > > p>
> > > > TestWS1.war <
> > > > http://apache-ode.996305.n3.nabble.com/file/n16976/TestWS1.war>
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > > http://apache-ode.996305.n3.nabble.com/Initializing-fault-variable
> > > > -t
> > > > p1 6976.html Sent from the Apache Ode User mailing list archive at
> > > > Nabble.com.
> > > >
> > >
> > >
> > >
> > > --
> > > Tammo van Lessen - http://www.taval.de
> > >
> >
> >
> >
> > --
> > Tammo van Lessen - http://www.taval.de
> >
>
>
>
> --
> Tammo van Lessen - http://www.taval.de
>



-- 
Tammo van Lessen - http://www.taval.de

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message