[JBossWS] - EJB client for a Web service
by freejohn22
Hi all!
I'm trying to use an EJB as client for a Web service. Unfortunately I'm having some problems when I'm injecting the WebServiceRef into the EJB.
Here's my code:
This is the WebService in the .war file :
@WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class POJOWs implements POJOWsItf
| {
|
| @WebMethod
| public String echo(String input)
| {
| return input + " called !";
| }
| }
This is the EJb in the jar file:
@Stateless
|
| public class EJBClient implements EJBClientItf {
|
|
| @WebServiceRef(POJOWs.class)
| private POJOWs service;
|
| public String callWS(String input) {
|
| System.out.println("EJB called !");
| return service.echo(input);
|
|
| }
| }
Now when I try to lookup my EJb and invoke the method callWS :
<%
| InitialContext ctx = new InitialContext();
| com.sample.EJBClientItf ejb = null;
| ejb = ( com.sample.EJBClientItf)ctx.lookup("StatelessfulExample/EJBClient/remote");
| String ss = ejb.callWS("hello");
| out.println(ss);
|
| %>
Here's the error I get:
javax.ejb.EJBException: java.lang.RuntimeException: Unable to inject jndi dependency: env/com.sample.EJBClient/service into property com.sample.EJBClient.service: WebServiceRef type 'class com.sample.POJOWs' is not assignable to javax.xml.ws.Service
How can I fix it ?
thanks a lot
john
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186444#4186444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186444
17 years, 1 month
[Security & JAAS/JBoss] - Creating a custom PolicyCombiningAlgorithm
by dspoja
Hello,
I am trying to create a custom policy combining algorithm. Unfortunately, the only documentation I have is Sun XACML Programmer's Guide for Version 1.2 from 2004. Since then the API has changed, and I am having a hard time getting my policies to be parsed correctly once I've added the algorithm to the BaseCombiningAlgorithmFactory. I am getting an exception in AbstractPolicy "error parsing combining algorithm". I see that it is using CombiningAlgFactory to get instance of the factory, and that returns only standard combining algorithms. That is why I am getting an exception, but I am not sure how to fix this unless I modify AbstractPolicy, which is probably not the way to do it.
Has anyone gone through this pain before? Which factory did you add your new algorithm to? Any code snippets are greatly appreciated.
Thank you,
Danja
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186440#4186440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186440
17 years, 1 month
[Clustering/JBoss] - ESB Cluster across different physical machines
by jakkur
We are attempting to put together a Cluster of JBOSS ESB nodes (on AIX) with the some of our heavy lifting services spread across nodes for better load balancing and throughput.
An example being that one of the services which does some heavy I/O
(computes checksums on large files on the disk) has its queue/listener
clustered so when the current node is already performing that service,
the message is get sent to another node thereby improving our throughput.
The cluster appears to be working as expected only when all the nodes
happened to be on the same physical machine. When we spread the nodes
across machines (all nodes obviously have same oracle schema as juddi,
message store, etc.), the message never gets sent to nodes running on
other machines. I can send our queue definition, JBM config, jboss-esb
and/or other files if they can help to figure out if we are missing any
in our setup.
We have been struggling for past few days as to why the setup won't work
across machines. Any working sample you can point to which shows JMS
clustering across machines can help us tremendously.
Regards,
Jakku
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186428#4186428
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186428
17 years, 1 month