[JBossWS] - Jboss 4.2.2 hangs when after deploying a WAR
by tonioc
Hi,
I'm using jbossws 3.0.4 in jboss 4.2.2, installation went good, and I
try my first EchoService as a webapp, all ok.
After that I added a method that returns a BizClass,
BizClass getBizClass() {
| return new BizClass();
| }
The BizClassTree is in an external jar.
This BizClass is the root of a tree of
about 500 classes all JAXB annotated, they work pretty well if I
generate the xml/schema using JAXB just in Java class main method.
When I deploy the WAR, the context is created, after a while the
WSDL is generated (I could see it in HTTP: and file:), and jboss continues working (100% of processor) and does not stop.
If I call the service an exception is thrown telling me:
Endpoint cannot handle requests in state: CREATED
In JBossWs/services page, Start Time has a value of null.
No log is shown (I added DEBUG to org.jboss.ws).
Any help or ideas will be greatly welcomed
tonio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185781#4185781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185781
16 years
[JBossWS] - Stateless Session EJB Endpoint (JBossWS Native)
by tperrigo
JBoss 5.0.0.CR2, JBossWS Native (latest distribution). I've got a stateless session bean that I want to use as a web service endpoint. I created an Eclipse project using the (very handy!) ant tasks provided by the JBossWS Native distribution. I created my @Stateless-annotated implementation class, and specified (using @Remote) the remote interface for the class.
Using ant build file generated by the JBossWS ant tasks, I was able to build and deploy my jar file, although, both at app server startup and deployment time, I receive the following error:
| /usr/local/jboss-5.0.0.CR2/server/logos/deploy/jbossws-container-jboss-beans.xml -> java.lang.IllegalStateException: WSKernelLocator is already installed.
|
The web service appears in the list of deployed services in the jbossws console, but I thought for my first test I would simply try to invoke the service as an EJB (through the Remote interface). The JNDI lookup succeeds (it finds an object with the proper JNDI name), but when I try to cast it to the EJB's Remote Interface, I get a ClassCastException. When I print out the actual type of the object returned from the JNDI lookup, I find that it is an instance of javax.naming.Reference.
So my questions are:
(1) Does anyone know what the startup / deployment error means?
(2) Why can't I seem to get a reference to my RemoteInterface via a JNDI lookup? (Why the ClassCastException?)
Sorry for being so long-winded, I just wanted to include anything that might help. Any advice would be very much appreciated!
Tim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185771#4185771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185771
16 years
[JBossWS] - jax-ws soap protocol handler and white space.
by mignaak
I have an issue with a soap protocol handler that works fine in jbossws 2.0.3.
Since 2.0.4 it has stopped working because it seems every white space character is stripped away from the message by the runtime.
This handler adds a header to the soap envelope and fills this header with lines of text separated with a newline character.
Any hint as to what is happening?
Many thanks
Here is the source code.
public class MefHandlerClient implements SOAPHandler {
public Set getHeaders() {
return null;
}
public boolean handleMessage(SOAPMessageContext smc) {
try {
Boolean outboundProperty = (Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (outboundProperty.booleanValue() == true) {
SOAPMessage sm = smc.getMessage();
SOAPPart part = sm.getSOAPPart();
SOAPEnvelope envelope = part.getEnvelope();
SOAPHeader sh = envelope.getHeader();
if (sh == null)
sh = envelope.addHeader();
QName n = new QName(
"http://schemas.xmlsoap.org/ws/2002/04/secext",
"BinarySecurityToken",
"wsse");
envelope.addNamespaceDeclaration("wsse", "http://schemas.xmlsoap.org/ws/2002/04/secext");
SOAPHeaderElement she = sh.addHeaderElement(n);
QName id = new QName("Id");
she.addAttribute(id, "SecurityToken");
QName eType= new QName("EncodingType");
she.addAttribute(eType, "wsse:Base64Binary");
QName vType= new QName("ValueType");
she.addAttribute(vType, "wsse:X509v3");
InputStream firma = getClass().getClassLoader().getResourceAsStream("cert.pem");
BufferedReader br = new BufferedReader(new InputStreamReader(firma));
String temp = br.readLine();
while (temp != null) {
String temp2 = br.readLine();
if (!temp.contains("CERTIFICATE")) {
if (temp2 != null)
temp += System.getProperty("line.separator");
SOAPElement riga = she.addTextNode(temp);
}
temp = temp2;
}
}
} catch(Throwable x) {
System.out.println(x);
}
return true;
}
public boolean handleFault(SOAPMessageContext smc) {
return true;
}
public void close(MessageContext messageContext) {
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185660#4185660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185660
16 years