[JBossWS] - Error getting WebServiceContext/MessageContext information i
by DjHitItUp
Below is my web service code:
package com.company.department.ws;
import java.rmi.RemoteException;
import java.util.Map;
import javax.annotation.Resource;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.WebServiceContext;
@WebService(name="TestWebService", targetNamespace="http://www.company.com/department/testwebservice/", serviceName="TestWebService")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class TestWebService {
@Resource WebServiceContext wsContext;
@WebMethod
public String hello(String name) {
return "Servlet WS: " + wsContext.getUserPrincipal() + ": " + name;
}
}
When being invoked the exception below is returned:
16:02:49,552 ERROR [SOAPFaultExceptionHelper] SOAP request exception
java.lang.NullPointerException
at com.company.department.ws.TestWebService.hello
(TestWebService.java:20)
The error is happening on the "wsContext.getUserPrincipal()". I feel the the wsContext object is not being set when the service is invoked. I'm at a lost as to what is needed. The end goal of this web service is to pull cookie information from the HTTPRequest object. Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964173#3964173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964173
19 years, 9 months
[JBoss Messaging] - JBossMessaging 1.0.1.CR4 Released
by ovidiu.feodorov@jboss.com
JBoss Messaging 1.0.1.CR4 has been release and it is available for download on jboss.org and sourceforge.
This release incorporates a lot of community feedback, which is reflected in the number of bugs fixed. The complete list of fixes is available in the Release Notes.
CR4 also introduces several notable message delivery improvements. Tim modified core's internals to include message batching (JBMESSAGING-328) and improved SEDA-like concurrency.
While message batching highly improves throughput, it has the side effect of breaking backward compatibility with 1.0.1.CR3. This means that you need to upgrade both the server and the client-side library in order to use CR4. We took this decision based on community poll results. The poll confirmed that most users see backward compatibly as a "nice to have", but not critical feature at this stage. We'll be back to guaranteeing compatibility from 1.2 on. Until then, our compatibility tests will be disabled.
Upgrading to Remoting 2.0.0.CR1 introduced some minor SSL configuration changes: what was previously SSL Connector's "KeyManagementAlgorithm" is now called "KeyStoreAlgorithm". The SSL example that comes with the release has been modified to reflect the change.
Good news is that we finally migrated to a separated SVN repository (you will be prompted for a login, use your jboss.com username and password) and an independent build. This allows us to decouple our development from JBoss AS and integrate through the thirdparty repository. The most visible benefit is that head checkout and full build do not take hours anymore, and we're finally able to ship a complete source tree that can be actually used to generate binaries and run functional tests.
The next step is to branch 1.0, so we can continue to offer bug fixes and stable 1.0 releases while the bulk of the development effort on the head will shift towards clustering. Expect a clustered Alpha release in September. Until then, we should have at least another candidate release on the 1.0 branch and hopefully the 1.0.1.GA.
The JBoss Messaging project roadmap is available here.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964169#3964169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964169
19 years, 9 months
[JBoss Seam] - DataModel not made available as a context variable
by zzzz8
Hi,
I'm a newbie with Seam, but I've been having trouble with the DataModel annotation. I'm not sure if it's a configuration problem, but I've used the messages example in JBoss Seam 1.0.1 GA as a baseline for my configuration (took many of the configuration values and jars from there). I'm trying to upgrade a web app that currently runs on MyFaces 1.1.2, Tomahawk 1.1.2, and Tomcat 5.5.15. I'm also using Tiles - in particular, with Tiles Support from Tomahawk.
I haven't done anything fancy yet - I've just tried to modify a simple existing page. Here's a snippet of code which I'm having problems with:
@Stateful
| @Scope(ScopeType.SESSION)
| @Name("statusData")
| public class StatusBean implements StatusLocal {
| @In
| private Context sessionContext;
|
| @DataModel
| private List status;
|
| @Factory("status")
| private void retrieveStatus() {
| // Bus. logic code - sets status...
| }
|
| @Remove @Destroy
| public void destroy() {
|
| }
| }
The interface only lists the destroy method...
@Local
| public interface StatusLocal {
| public void destroy();
| }
My JSP code attempts to get the DataModel from here...
<h:dataTable value="#{status}" var="varStatus"...
However, I get errors stating that it cannot evaluate the expression:
| ServletException ... .... Cannot get value for expression: #{status}
When I debug in Eclipse, I notice that the StatusBean class is never even instantiated. Normally, one would think that there is a configuration problem. However, if I change the bean code to:
@Stateful
| @Scope(ScopeType.SESSION)
| @Name("statusData")
| public class StatusBean implements StatusLocal {
| @In
| private Context sessionContext;
|
| private List myStatus = new ArrayList();
|
| public List getMyStatus() {
| return myStatus;
| }
|
| @Remove @Destroy
| public void destroy() {
|
| }
| }
and for the interface code is:
@Local
| public interface StatusLocal {
| public List getMyStatus();
| public void destroy();
| }
and the JSP is:
<h:dataTable value="#{statusData.myStatus}" var="varStatus"...
It works! When I debug from inside Eclipse, I see that the bean is instantiated and the getter is called. I also see that the sessionContext context variable is injected correctly. These two things lead me to believe that my configuration is somewhat correct. I haven't tried any of the other annotations and features of Seam, so I hope things aren't broken there either?
What am I doing wrong here? I would really appreciate any assistance, as I'm pretty much stuck...
BTW, the messages example works within Tomcat 5.5.15 and if I replace the MyFaces 1.1.3 libs with MyFaces 1.1.2 libs within the messages example, it still works...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964165#3964165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964165
19 years, 9 months
[Persistence, JBoss/CMP, Hibernate, Database] - Eager Fetching in certain conditions
by sjmenden
I am using seam, however, this is more of a hibernate question. I would like to retain the laziness of my hibernate managed beans, however, when I am using a stateless session bean, I would like to turn on eager fetching for that instance, otherwise I'll get the Lazy Exception. I did a quick search and was not able to find how to do this, could someone point me in the right direction?
Thanks,
Samuel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964163#3964163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964163
19 years, 9 months