[JBoss Web Services] - Using XMLBeans binding for JAX-WS web services
by Weiqi Gao
Weiqi Gao [https://community.jboss.org/people/weiqigao] created the discussion
"Using XMLBeans binding for JAX-WS web services"
To view the discussion, visit: https://community.jboss.org/message/764639#764639
--------------------------------------------------------------
Hi,
My last post in this forum was made six years ago. How's everybody?
I need to port some JAX-WS web services that use XMLBeans as the data binding from another application server. I'm using JBoss AS 7.0.2 Final, but I could be using JBoss 7.1.1 Final as well.
I searched the forum and other internet sites and understand that this is possible in some twisted way. My development process will be a
"Schemas for the parameters and return types first, generate XMLBeans for them using XMLBeans. Then Java first using the XMLBeans in service methods and depends on the runtime to generate the WSDL."
I have a prototype of this development flow working with plain Apache CXF. The trick is to put an CXF annotation onto the SEI class:
@javax.jws.WebService
@org.apache.cxf.annotations.DataBinding(import org.apache.cxf.xmlbeans.XmlBeansDataBinding.class)
public interface Demo {
DemoResponseDocument foo(DemoRequestDocument request);
}
where DemoRequestDocument and DemoResponseDocument are XMLBeans generated classes from the schema.
And I'm trying to deploy it in JBoss. I noticed that the cxf-rt-databinding-xmlbeans-2.4.1.jar is not included in the JBoss AS 7.0.2 Final distribution. The XMLBeans jar is also absent from the distrubution. I did put the cxf-rt-databinding-xmlbeans-2.4.1.jar file into the proper place and updated the module.xml file. I put the xmlbeans-2.4.0.jar into my WEB-INF/lib directory. When I deployed it into JBoss AS 7.0.2 Final, I got the following error that I did not see when I run it with CXF directly:
15:49:15,623 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-13) register: jboss.ws:context=demo,endpoint=Demo
15:49:15,628 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-13) Creating Service { http://foo.com/ http://foo.com/}Demo from class foo.Demo
15:49:15,631 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-13) remove: jboss.ws:context=demo,endpoint=Demo
15:49:15,632 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-13) MSC00001: Failed to start service jboss.deployment.unit."demo.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."demo.war".INSTALL: Failed to process phase INSTALL of deployment "demo.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_07]
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Service class foo.Demo method total part { http://foo/ http://foo/}DemoRequest cannot be mapped to schema. Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:88)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:109)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:132)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.internalDeploy(AspectDeploymentProcessor.java:79)
at org.jboss.as.webservices.deployers.TCCLDeploymentProcessor.deploy(TCCLDeploymentProcessor.java:42)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Service class foo.Demo method total part { http://foo/ http://foo/}DemoRequest cannot be mapped to schema. Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:1164)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:449)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:682)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:501)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
... 14 more
What am I missing? I'd appreciate any helps or pointers.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/764639#764639]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months
[jBPM] - jbpm 5.3 Starting process with task and redeploy application on jboss 7.1.1
by franco80
franco80 [https://community.jboss.org/people/franco80] created the discussion
"jbpm 5.3 Starting process with task and redeploy application on jboss 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/771784#771784
--------------------------------------------------------------
Hello all
i have a question, first time I started process with one task (task with start and complete), everything work
when I build my ear application (but without any changes) and install it to jboss 7.1.1 to deploy directory and again start process I recived in time when I run session.startProcess() but all data is saving in database (I think that, for example processInstanceByteArray exist):
14:52:11,418 ERROR [org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler] (http-localhost-127.0.0.1-8080-2) Tue Oct 23 14:52:11 CEST 2012: Error when creating task on task server for work item id 6. Error reported by task server: Task operation request timed out: java.lang.RuntimeException: Task operation request timed out
at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:145) [jbpm-human-task-core-5.3.0.Final.jar:5.3.0.Final]
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:303) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138) [jbpm-flow-5.3.0.Final.jar:5.3.0.Final]
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:367) [drools-persistence-jpa-5.4.0.Final.jar:5.4.0.Final]
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223) [drools-core-5.4.0.Final.jar:5.4.0.Final]
at com.kampa.mbean.ProcessJob.initAndStartProcess(ProcessJob.java:73) [classes:]
at com.kampa.mbean.CampaignBean.accept(CampaignBean.java:401) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_07]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_07]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_07]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_07]
at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
after above when process start with error like above automaticly running method: client.getTasksAssignedAsPotentialOwner(user, groups, LANG); (client is TaskService, I don't use TaskClient)
recived:
14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) java.lang.RuntimeException: Timeout : unable to retrieve results
14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41)
14:53:34,618 ERROR [stderr] (http-localhost-127.0.0.1-8080-2) at org.jbpm.task.service.SyncTaskServiceWrapper.getTasksAssignedAsPotentialOwner(SyncTaskServiceWrapper.java:434)
but when I stop server and start again all work without error until ear project ...
StatefulKnowledgeSession ksession = JbpmAPIUtil.getSession();
JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
HornetQHTWorkItemHandler handler = JbpmAPIUtil.initHornetQHTWorkItemHanlder(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",handler);
Map<String,Object> params = new HashMap<String, Object>();
params.put(USER_ID_PARAM, user);
ProcessInstance processInstance = ksession.startProcess(PROCESS_ID, params);
TaskSummary task = JbpmAPIUtil.startTask(user, groupNameActualTask, getProcessInstanceId(), false);
complete
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/771784#771784]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months
[jBPM] - Advices needed for jBPM5 engine load testing
by Franck cdsosi
Franck cdsosi [https://community.jboss.org/people/cdsosi] created the discussion
"Advices needed for jBPM5 engine load testing"
To view the discussion, visit: https://community.jboss.org/message/765448#765448
--------------------------------------------------------------
Hi,
I am currently working on a sample application using a single jBPM5 BPMN Process and using persistence in a *postgresql database*.
I want to test *remotly* my process from two ways :
1. in a classical way that is to say :* drop my BPMN file into the sample\evaluation\src\main\resources
* include my business classes in a jar included in jbpm-gwt-console-server.war\WEB-INF\lib
* "invoke" my process through the REST API coming with jBPM 5.3.0
2. in a web application which embeds jBPM runtime and test it by exposing some REST services
I want to test the load of the jBPM5 Engine by sending "some" REST requests to simulate a lot of users interacting with my process. Of course I also want to send many parallel requests to see how the jBPM5 engine reacts from a concurrency point of view.
My future application may have this kind of requirements.
So my question is :
What are the advices that the jBPM team can give me to configure in an appropriate manner JAS 7 / Persistence / ... so that performance could be the best as possible.
* One parameter I see is increasing the max pool size of the postgresql datasource in standalone.xml
<max-pool-size>
yy
</max-pool-size>
* Are there any others parameters on which one can play with or things / tips to know to encounter the least performance issues?
Thanks for help and replies coming ;)
Kind Regards
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/765448#765448]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months
[jBPM] - start message event node?
by Cedric Hurst
Cedric Hurst [https://community.jboss.org/people/cedric.hurst] created the discussion
"start message event node?"
To view the discussion, visit: https://community.jboss.org/message/768032#768032
--------------------------------------------------------------
Per the JBPM5 docs:
jBPM5 does not implement all elements and attributes as defined in the BPMN 2.0 specification. We do however support a significant subset, including the most common node types that can be used inside executable processes. This includes (almost) all elements and attributes as defined in the "Common Executable" subclass of the BPMN 2.0 specification, extended with some additional elements and attributes we believe are valuable in that context as well. The full set of elements and attributes that are supported can be found below, but it includes elements like:
* +Flow objects+* Events* Start Event (None, Conditional, Signal, Message, Timer)
* End Event (None, Terminate, Error, Escalation, Signal, Message, Compensation)
The Oryx Designer also lists a "Start Message Event" node in full view:
https://www.evernote.com/shard/s25/sh/73923dca-ac7b-4dcd-8e1e-b3a7f7d0976... https://www.evernote.com/shard/s25/sh/73923dca-ac7b-4dcd-8e1e-b3a7f7d0976...
However, it's unclear from the docs if this node type is supported by the jBPM engine. Any advice or examples?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/768032#768032]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 5 months