[EJB 3.0] - Re: My EJB don't access the database
by LeandroSeverino
More information:
The structure of my project:
| -App.EAR
| --META-INF
| ---MANIFEST.MF
| ---application.xml
| ---jboss-app.xml
| --Facade.jar (EJB)
| ---META-INF
| ----MANIFEST.MF
| ----jboss.xml
| ---com
| ----app
| -----facade
| ------ElementFacade.class
| ------ElementFacadeLocal.class
| --DAO.jar(EJB)
| ---META-INF
| ----MANIFEST.MF
| ----jboss.xml
| ----persistence.xml
| ---com
| ----app
| -----model
| ------Entity.class
| ----app
| -----dao
| ------IDAO.class
| ------IEntityDAO.class
| ------EntityDAOImpl.class
| ----app
| -----ejb
| ------DAOFactory.class
| ------DAOFactoryImpl.class
| --web.war(war)
| ---META-INF
| ----MANIFEST.MF
| ---WEB-INF
| ----jboss-web.xml
| ----web.xml
| ----classes
| -----app
| ------web
| -------ServletTest.class
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102495#4102495
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102495
18 years, 6 months
[JBossWS] - bind datatype javax.xml.datatype.XMLGregorianCalendar to jav
by tpawankumar
Hi All,
When i generated schema classes from jaxb 2.1.5.It generated XMLGregorianCalendar data type for xml type xsd:date.Then i changed my schema adding inline annotations and binded the XMLGregorianCalendar to Calendar.Following is the code that i have added in my schema.
<xsd:annotation><xsd:appinfo>
| <jaxb:globalBindings>
| <jaxb:javaType name="java.util.Calendar" xmlType="xsd:date"
| parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
| printMethod="javax.xml.bind.DatatypeConverter.printDate"
| />
| </jaxb:globalBindings>
| </xsd:appinfo></xsd:annotation>
But When i generated the client stubs using wsconsume from the WSDL it is still generating XMLGregorianCalendar data type.
So my question what should i do to bind the data type XMLGregorianCalendar to Calendar in client side stubs,
but i should not change the WSDL.
Please help me.
Thanks
Pavan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102493#4102493
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102493
18 years, 6 months
[JBoss jBPM] - BPEL Problem: Fault Handler
by agusgr
Hi, I'm trying to develop a BPEL process with fault handling. I have a DNS web service wich send a fault message when cannot resolve an URL. The wsdl from this service is this:<?xml version="1.0" encoding="UTF-8"?>
| <wsdl:definitions targetNamespace="http://dns"
| xmlns:apachesoap="http://xml.apache.org/xml-soap"
| xmlns:impl="http://dns" xmlns:intf="http://dns"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <!--WSDL created by Apache Axis version: 1.3
| Built on Oct 05, 2005 (05:23:37 EDT)-->
| <wsdl:types>
| <schema elementFormDefault="qualified"
| targetNamespace="http://dns" xmlns="http://www.w3.org/2001/XMLSchema">
| <element name="getIPByURL">
| <complexType>
| <sequence>
| <element name="request" type="impl:DNSRequestData"/>
| </sequence>
| </complexType>
| </element>
| <complexType name="DNSRequestData">
| <sequence>
| <element name="URL" nillable="true" type="xsd:string"/>
| </sequence>
| </complexType>
| <element name="getIPByURLResponse">
| <complexType>
| <sequence>
| <element name="getIPByURLReturn" type="impl:DNSResponseData"/>
| </sequence>
| </complexType>
| </element>
| <complexType name="DNSResponseData">
| <sequence>
| <element name="IP" nillable="true" type="xsd:string"/>
| </sequence>
| </complexType>
| <complexType name="DNSFault">
| <sequence>
| <element name="MESSAGE" nillable="true" type="xsd:string"/>
| </sequence>
| </complexType>
| <element name="fault" type="impl:DNSFault"/>
| </schema>
| </wsdl:types>
|
| <wsdl:message name="getIPByURLRequest">
|
| <wsdl:part element="impl:getIPByURL" name="parameters"/>
|
| </wsdl:message>
|
| <wsdl:message name="DNSFault">
|
| <wsdl:part element="impl:fault" name="fault"/>
|
| </wsdl:message>
|
| <wsdl:message name="getIPByURLResponse">
|
| <wsdl:part element="impl:getIPByURLResponse" name="parameters"/>
|
| </wsdl:message>
|
| <wsdl:portType name="DNS">
|
| <wsdl:operation name="getIPByURL">
|
| <wsdl:input message="impl:getIPByURLRequest" name="getIPByURLRequest"/>
|
| <wsdl:output message="impl:getIPByURLResponse" name="getIPByURLResponse"/>
|
| <wsdl:fault message="impl:DNSFault" name="DNSFault"/>
|
| </wsdl:operation>
|
| </wsdl:portType>
|
| <wsdl:binding name="DNSSoapBinding" type="impl:DNS">
|
| <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <wsdl:operation name="getIPByURL">
|
| <wsdlsoap:operation soapAction=""/>
|
| <wsdl:input name="getIPByURLRequest">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:input>
|
| <wsdl:output name="getIPByURLResponse">
|
| <wsdlsoap:body use="literal"/>
|
| </wsdl:output>
|
| <wsdl:fault name="DNSFault">
|
| <wsdlsoap:fault name="DNSFault" use="literal"/>
|
| </wsdl:fault>
|
| </wsdl:operation>
|
| </wsdl:binding>
|
| <wsdl:service name="DNSService">
|
| <wsdl:port binding="impl:DNSSoapBinding" name="DNS">
|
| <wsdlsoap:address location="http://localhost:4040/DNSWebService/services/DNS"/>
|
| </wsdl:port>
|
| </wsdl:service>
|
| </wsdl:definitions>
|
|
In the BPEL code I have this:<bpws:faultHandlers>
| <bpws:catch faultName="ns1:DNSFault">
| <bpws:sequence name="HiddenSequence">
| <bpws:assign name="LoadErrorMessage" validate="no">
| <bpws:copy>
| <bpws:from>'Error in Service'</bpws:from>
| <bpws:to>$output.outputparam/tns:City</bpws:to>
| </bpws:copy>
| <bpws:copy>
| <bpws:from>'Error in Service'</bpws:from>
| <bpws:to>$output.outputparam/tns:Country</bpws:to>
| </bpws:copy>
| </bpws:assign>
| <bpws:reply name="SendErrorMessage" operation="getURLInfo" partnerLink="client" portType="tns:BPELService" variable="output"/>
| </bpws:sequence>
| </bpws:catch>
| </bpws:faultHandlers>
The proces is deployed and works well when there is no fault, but when the DNS service send a fault message, I got this:
anonymous wrote : 2007-11-07 12:14:18,234 DEBUG [org.jbpm.bpel.integration.jms.StartListener] caught exception while passing control to process, searching for handler
| org.jbpm.bpel.BpelException: no wsdl fault matches the contents of the soap detail element: org.jboss.ws.soap.DetailImpl@17a35c[[detail: null]]
| at org.jbpm.bpel.integration.client.SoapClient.readFault(SoapClient.java:497)
| at org.jbpm.bpel.integration.client.SoapClient.call(SoapClient.java:115)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:242)
| at org.jbpm.bpel.graph.basic.Invoke.execute(Invoke.java:46)
| at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
| at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
| at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:66)
| at org.jbpm.bpel.graph.basic.Receive.accept(Receive.java:81)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
| at org.jbpm.bpel.graph.basic.Receive$$EnhancerByCGLIB$$9222be5b.accept()
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:100)
| at org.jbpm.bpel.graph.struct.Sequence.accept(Sequence.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
| at org.jbpm.bpel.graph.def.Activity$$EnhancerByCGLIB$$9e9c8226.accept()
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:54)
| at org.jbpm.bpel.graph.def.BpelDefinition.messageReceived(BpelDefinition.java:111)
| at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:124)
| at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:696)
| at java.lang.Thread.run(Thread.java:595)
| 2007-11-07 12:14:18,234 ERROR [org.jbpm.bpel.integration.jms.StartListener] could not start process instance
| org.jbpm.bpel.BpelException: no wsdl fault matches the contents of the soap detail element: org.jboss.ws.soap.DetailImpl@17a35c[[detail: null]]
| at org.jbpm.bpel.integration.client.SoapClient.readFault(SoapClient.java:497)
| at org.jbpm.bpel.integration.client.SoapClient.call(SoapClient.java:115)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:242)
| at org.jbpm.bpel.graph.basic.Invoke.execute(Invoke.java:46)
| at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
| at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
| at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:66)
| at org.jbpm.bpel.graph.basic.Receive.accept(Receive.java:81)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
| at org.jbpm.bpel.graph.basic.Receive$$EnhancerByCGLIB$$9222be5b.accept()
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:100)
| at org.jbpm.bpel.graph.struct.Sequence.accept(Sequence.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
| at org.jbpm.bpel.graph.def.Activity$$EnhancerByCGLIB$$9e9c8226.accept()
| at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:54)
| at org.jbpm.bpel.graph.def.BpelDefinition.messageReceived(BpelDefinition.java:111)
| at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:124)
| at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:696)
| at java.lang.Thread.run(Thread.java:595)
The fault message that I receive is this:
anonymous wrote : <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <soapenv:Header/>
| <soapenv:Body>
| <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
| soapenv:Server.generalException
|
|
| <ns1:exceptionName xmlns:ns1='http://xml.apache.org/axis/'>dns.DNSFault</ns1:exceptionName>
| <ns2:hostname xmlns:ns2='http://xml.apache.org/axis/'>medea</ns2:hostname>
|
| </env:Fault></soapenv:Body></soapenv:Envelope>
I'm using the JBoss AS 4.05 and the BPEL engine jbpm-bpel.1.1.Beta3. To develop the DNS web service I use the Eclipse WTP 3.2 version.
I think that the fault message is not correct, but I don't know well what kind of fault messages expects the bpel engine.
Any ideas??
Thank you all and sorry for the long post
Agus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102479#4102479
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102479
18 years, 6 months