[JBoss Web Services] - Is there a way to access the information send in the SOAPHeader within an endpoint EJB?
by Maria Sanchez
Maria Sanchez [http://community.jboss.org/people/mesanchez] created the discussion
"Is there a way to access the information send in the SOAPHeader within an endpoint EJB?"
To view the discussion, visit: http://community.jboss.org/message/552588#552588
--------------------------------------------------------------
I have installed JBoss6.0.0M3 which deploys woth JBossws3.3.0.
I am trying to see if it is possible to access the information passed as part of the SOAP header within the endpoint EJB. I have been able to use handlers to manipulate the SOAP Message, but I am not able to find information regarding access from the EJB.
There are some pages that indicate that this is possible using the SessionContext. The handlers set some attributes that are later accessed from the EJB, this would work but I do not find any code that I could use as a reference. Any ideas? Code examples?
This is the code I found but it has problems:
public class MyMessageHandler extends
javax.xml.rpc.handler.GenericHandler {
public boolean handleRequest(MessageContext mc) {
SOAPMessage msg = ((SOAPMessageContext)mc).getMessage() ;
SOAPPart sp = msg.getSOAPPart();
SOAPEnvelope se = sp.getEnvelope();
SOAPHeader header = se.getHeader();
SOAPBody body = se.getBody();
if (header == null) {
// raise error
}
for (Iterator iter = header.getChildElements();
iter.hasNext();) {
SOAPElement element = (SOAPElement) iter.next();
if (element.getElementName().getLocalName()
.equals("PriorityProcessing")) {
mc.setProperty("PriorityProcessing",
element.getValue());
}
}
...
return true;
}
#
| *Code Example 8.6* Passing Context Information from Handler to Endpoint
|
Then, you can get access to MessageContext in the endpoint that receives the request. For an EJB service endpoint, MessageContext is available with the bean'sSessionContext. http://java.sun.com/blueprints/guidelines/designing_webservices/html/arch... Code Example 8.7 shows the enterprise bean code for the endpoint.
public class EndpointBean implements SessionBean {
private SessionContext sc;
public void businessMethod() {
MessageContext msgc= sc.getMessageContext();
String s = (String)msgc.getProperty("PriorityProcessing");
Boolean priority = new Boolean(s);
...
}
public void setSessionContext(SessionContext sc) {
this.sc = sc;
}
...
}
#
| *Code Example 8.7* Endpoint Receiving Context Information from a Handler
|
When I do this SessionContext object is null
Thanks,
Maria
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552588#552588]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
Re: [jboss-user] [JBoss Tools] - continuos redeployment of seam with birt
by Enzo Pierfelice
Enzo Pierfelice [http://community.jboss.org/people/pierenzo] replied to the discussion
"continuos redeployment of seam with birt"
To view the discussion, visit: http://community.jboss.org/message/552585#552585
--------------------------------------------------------------
Could You please tell what workaround You used to avoid continous redeployment using seam/birt together?
I'm using JBoss 5.0.0.GA and Seam 2.2 + BIRT 2.5, everything works but in the JBoss log I often find:
18:23:08,136 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/birt/documents
18:23:08,138 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/birt/logs
18:23:12,304 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/birt/resources
18:23:12,306 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/birt/scriptlib
18:23:14,139 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/attachments
18:23:14,160 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.core.runtime
18:23:14,163 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.core.runtime/.manager
18:23:16,206 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.equinox.app
18:23:16,210 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.equinox.app/.manager
18:23:18,247 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi
18:23:18,251 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/.manager
18:23:20,307 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles
18:23:20,310 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60
18:23:20,313 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1
18:23:20,316 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp
18:23:20,320 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib
18:23:20,452 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar
18:23:20,455 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar/META-INF
18:23:20,460 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar/org
18:23:20,460 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar/org/apache
18:23:20,462 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar/org/apache/commons
18:23:20,463 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/commons-cli-1.0.jar/org/apache/commons/cli
18:23:20,491 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/Tidy.jar
18:23:20,495 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/Tidy.jar/META-INF
18:23:20,498 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/Tidy.jar/org
18:23:20,499 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/Tidy.jar/org/w3c
18:23:20,500 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.osgi/bundles/60/1/.cp/lib/Tidy.jar/org/w3c/tidy
18:23:20,631 WARN [AbstractVirtualFileHandler] No such existing handler, falling back to old root + path: vfsfile:/C:/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/sigc-ear.ear/sigc.war/WEB-INF/platform/configuration/org.eclipse.update
I think JBoss is telling that it cannot find an handler to manage all the file types and stuff BIRT framework copied in the WEB-INF folder. That's just a Warning but sometimes hot-deploy stop working... and I have to restart JBoss in order to get updated files running...
Thank You.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552585#552585]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
[Beginner's Corner] - Keystore Alias
by Ulf Borjesson
Ulf Borjesson [http://community.jboss.org/people/uborjess%40mail.ucf.edu] created the discussion
"Keystore Alias"
To view the discussion, visit: http://community.jboss.org/message/552547#552547
--------------------------------------------------------------
Hi,
I am trying to use a certificate on a JBOSS application server. Should I use the same alias in the keystore through out the process? If I do I get " Public keys in reply and keystore don't match" and if I change the alias just for when I import the cert to the keystore the web site comes up as it is using a non trusted cert. Below is the keytool commands I have used with my keystore.
keytool -genkey -alias net131 -keyalg RSA -keystore net131.keystore
keytool -certreq -keyalg RSA -alias net131 -file net131.csr -keystore net131.keystore
keytool -import -alias net131 -trustcacerts -file net131.net.ucf.edu.crt -keystore net131.keystore
The cert is from Geotrust and it is a Quick SSL Premium so no chain is needed just a ca root.
Please advice if these are the correct commands to use.
Thank you, Ulf
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552547#552547]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months