[JBossWS] - Re: enumerations in jboss ws...
by tejasjani
Interesting....
Here is what I have...
(1) I have written a enum type class PromotionDetailType using the enum pattern, one of the enum values is 'Ad'
(2) There is another class PromotionDetail where this enum class is being referenced and there are getters and setters for getting/setting the enum values such as
public void setDetailSubType(PerformanceDetailType detailType)
| { this.detailType=detailType; }
|
| public PerformanceDetailType getDetailType() { return detailType ;}
|
(3) Now I try to send a SOAP request with the following in the client
| <PromotionDetail>
| <PerformanceDetailType>Ad</PerformanceDetailType>
| </PromotionDetail>
|
This gives me the following error:
Caused by: org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Failed
| o set value 'Ad' for property 'detailType' defined in com.demandtec.webservices.heb.PromotionDetail@1e3f2e5 on instance
| com.demandtec.webservices.heb.PromotionDetail@1e3f2e5
|
I dont have any mappings defined for the enum classes in the mapping file.
Any hints would be highly appreciated.
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008873#4008873
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008873
18 years, 9 months
[JCA/JBoss] - Re: How to connect my EJB to Firebird database?
by g_zaspa
Now the code in servlet works. I wrote in servlet init method
| InitialContext context = new InitialContext();
| DataSource ds = (DataSource)context.lookup("java:/FIrebirdDS");
| Connection con = ds.getConnection();
| Statement st=con.createStatement();
| ResultSet rs=st.executeQuery("select * from person");
|
Everything works fine, there are proper data in ResultSet after executing st.executeQuery method. So, FIrebirdDS works. But the old problem stays. In the same servlet init method I try to use my EJB:
| Object ref = context.lookup("ejb/Person");
| home = (Person) ref;
|
Again, it works, I can then execute the business method of my PersonBean. But when inside PersonBean EJB I uncomment the line
//@PersistenceContext EntityManager em;
I get an exception
8:50:56,093 ERROR [STDERR] javax.naming.NameNotFoundException: ejb not bound
18:50:56,093 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
18:50:56,093 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
18:50:56,093 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
18:50:56,093 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
18:50:56,093 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
18:50:56,093 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
18:50:56,093 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
18:50:56,093 ERROR [STDERR] at web.ComputeServlet.init(ComputeServlet.java:56)
18:50:56,093 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
...
where
web.ComputeServlet.init(ComputeServlet.java:56)
is line
Object ref = context.lookup("ejb/Person");
of my servlet.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008868#4008868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008868
18 years, 9 months
[EJB 3.0] - embeddable EJB 3.0 usage questions + micro containers vs emb
by canterburry
Hi,
I am looking to use EJB 3.0 embeddable in a new project and wanted to validate some of my architectural assumptions before I recommend it. I am primarily interested in the constraints of the embeddable solution.
I am building a n tier based architecture with a thick Eclipse RCP based GUI, with an embeddable EJB 3.0 client component that handles communications/transactions/local persistence between the Eclipse GUI and the JEE server tier on the client machine.
RMI and JMS are the two current protocols we need, however, even the JMS communication would be serialized objects and not XML/SOAP messaging for now.
The communication between the GUI and the embedded container on the client machine would always be local, however, the embedded container would need to be able to pick messages off of JMS queues on a remote JMS server and communicate with remote EJBs on behalf of the client. Will I have any problems with this? I read somewhere that the micro container/embeddable EJB 3 container can't instantiate remote interfaces?
Also, am I confusing the micro-container and the embeddable EJB 3.0 container? Would appreciate some answers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008857#4008857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008857
18 years, 9 months