[JBoss jBPM] - Re: Problem BPEL: SOAP Messages in a web service invocation
by alex.guizarï¼ jboss.com
Agus,
The to variant with variable, part and query items is correct as well. This form comes from the BPEL 1.1 days when the $ notation for accessing variables did not exist yet.
The difference lies in the '/' preceding your query. When you write:
<to variable="atlasRequest" part="parameters" />
or
<to>$atlasRequest.parameters</to>
you access the part element; in this case, ns0:CapitalCity. In your second fragment:
<bpws:to>$atlasRequest.parameters/ns0:sCountryISOCode</bpws:to>
ns0:sCountryISOCode is relative to ns0:CapitalCity. However, in your first fragment:
<bpws:to part="parameters" variable="atlasRequest">
| <bpws:query><![CDATA[/ns0:sCountryISOCode]]></bpws:query>
| </bpws:to>
the leading slash makes the location path absolute. Instead of appending ns0:sCountryISOCode to the ns0:CapitalCity element, you are appending to the owner document of ns0:CapitalCity! Because the owner document already has ns0:CapitalCity as its root element, appending another element should result in a fault.
The following code essentially performs the same operations that jBPM performs to evaluate a query on a part element.
Element capitalCity = XmlUtil.createElement("capitalCity");
|
| Query query = new Query();
| query.setText("/countryIsoCode");
|
| query.getEvaluator().assign(capitalCity, "MX");
|
| assertEquals("capitalCity", capitalCity.getOwnerDocument().getDocumentElement().getLocalName());
The code throws a BpelFaultException from the assign() call.
Regarding the query language, the URI:
anonymous wrote : http://www.w3.org/TR/1999/REC-xpath-19991116
is the BPEL 1.1 reference for XPath 1.0. BPEL 2 replaced it with:
anonymous wrote : urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0
The Eclipse designer should be using the latter reference.
Since XPath 1.0 is the default language, you are better off removing the queryLanguage attribute.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024774#4024774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024774
17Â years, 10Â months
[JBoss jBPM] - transition to DOES_NOT_EXIST; my partnerLink name matches st
by meghanai_99
My BPEL has partnerLink defined like this -
<partnerLink name="NewHireClient" partnerLinkType="tns:AlfServiceFlow" myRole="AlfServiceFlowProvider" />
and webservices.xml has
| <init-param>
| <description>
| name of the partner link served by this port
| </description>
| <param-name>partnerLinkHandle</param-name>
| <param-value>NewHireClient</param-value>
| </init-param>
|
Last time when I got this exception
| 14:19:24,213 INFO [ServiceEndpointManager] WebService started: http://HQ02022:8
| 080/NewHire/newhire
| 14:21:04,100 WARN [HandlerWrapper] RuntimeException in handler method, transiti
| on to DOES_NOT_EXIST
| 14:21:04,100 ERROR [HandlerChainBaseImpl] RuntimeException in request handler
| java.lang.NullPointerException
| at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.
| java:324)
| at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandle
| r.java:188)
| at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleRequest(Handler
| Wrapper.java:121)
| at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequestIn
| ternal(HandlerChainBaseImpl.java:275)
| ...................
|
| 14:21:04,210 WARN [HandlerWrapper] Handler is in state DOES_NOT_EXIST, skipping
| Handler.handleFault for: org.jbpm.bpel.integration.server.SoapHandler@d60cd6
|
My partnerLink names were not matching. But now they do. so under what other circumstances the handler throws that exception? Because from the stack trace it is really hard to tell where else the BPEL process is misconfigured :(.
BTW, in case this is related to http://jira.jboss.com/jira/browse/JBWS-1553
I am following the workaround suggested by Alex in this thread.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=101479&postdays=...
Thank you,
Meghana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024772#4024772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024772
17Â years, 10Â months
[Beginners Corner] - EJB spec violation - not true?
by xhemjl
Hi everybody,
I have this error while deploying my EAR application:
23:29:00,500 WARN [verifier] EJB spec violation:
| Bean : TestSessionBean
| Section: 7.11.8
| Warning: The local home interface of a stateless session bean must have one create method that takes no arguments.
|
but it's simply not true...
this is my local home interface:
public interface TestSessionLocalHome extends EJBLocalHome {
|
| TestSessionLocal create() throws CreateException;
| TestSessionLocal create(String moduleName, String className) throws CreateException;
|
| }
and my bean looks like this:
| ...
| public void ejbCreate() {
| }
|
| public void ejbCreate(String moduleName, String className) {
| module = ModuleLoader.instantiateModule(moduleName, className);
| }
| ...
|
well - I have one empty create method in my session stateless bean.
i don't get it
can somebody say what am i doing wrong with my TestSessionBean?
thanks in advance
best regards
?ukasz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024771#4024771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024771
17Â years, 10Â months
[JBoss Seam] - event org.jboss.seam.preDestroyContext.SESSION and no transa
by rmemoria
I'm trying to map a session logout and I've implemented using events in a SEAM way
<event type="org.jboss.seam.preDestroyContext.SESSION">
| <action expression="#{authenticator.logout}"/>
| </event>
|
and the code is
@Transactional
| public void logout() {
| if (identity.isLoggedIn()) {
| userLogin = entityManager.merge(userLogin);
| userLogin.setLogoutDate(new java.util.Date());
|
| entityManager.persist(userLogin);
|
| System.out.println("Logout: " + userLogin.getUser().getLogin());
| }
| }
The problem: The logout date is not recorded, i.e the entityManager.persist doesn't take effect.
I also tryed an entityManager.flush(); after entityManager.persist(userLogin); but it raises an exception
18:45:39,218 ERROR [[/mdrtb-moldova]] Session event listener threw exception
| javax.el.ELException: javax.persistence.TransactionRequiredException: no transaction is in progress
| at com.sun.el.parser.AstValue.invoke(AstValue.java:155)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| at org.jboss.seam.util.UnifiedELMethodBinding.invoke(UnifiedELMethodBinding.java:36)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:106)
| at org.jboss.seam.core.Events.raiseEvent(Events.java:63)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:214)
| at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:287)
| at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| at java.lang.Thread.run(Unknown Source)
| Caused by: javax.persistence.TransactionRequiredException: no transaction is in progress
| at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:293)
| at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:81)
| at com.rmemoria.mdrtb.seam.AuthenticatorBean.logout(AuthenticatorBean.java:75)
| at com.rmemoria.mdrtb.seam.AuthenticatorBean$$FastClassByCGLIB$$99838e3b.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
| at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:154)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:89)
| at com.rmemoria.mdrtb.seam.AuthenticatorBean$$EnhancerByCGLIB$$52b6f1c9.logout(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| ... 17 more
I have no idea how to work around that. Any tip?
Ricardo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024766#4024766
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024766
17Â years, 10Â months