Re: [jboss-user] [Beginner's Corner] - Hey I want simple steps to run an ejb sample application?
by swaroop kumar
swaroop kumar [http://community.jboss.org/people/swaroopp] replied to the discussion
"Hey I want simple steps to run an ejb sample application?"
To view the discussion, visit: http://community.jboss.org/message/557611#557611
--------------------------------------------------------------
I checked with the jmx-console and jboss-web console and the i checked the JNDI names by using "JNDIView"
*package*
**
*com.myeclipse.ejb3;*** **
**
**
**
**
**
*import*
**
*javax.naming.Context;*** *import*
**
*javax.naming.InitialContext;*** *import*
**
*javax.naming.NamingEnumeration;*** *import*
**
*javax.naming.NamingException;*** *import*
**
*java.util.*;*** **
**
**
**
*public*
**
*class MyBeanClient {*** **
**
*public static void main(String[] args) {*** **
*try {*** *Hashtable env =*
*new Hashtable();*** *env.put(*
*"java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");*** **
*//env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces"); //not required*** *env.put(*
*"java.naming.provider.url","localhost:1099");* **
*final String jndiName = "MyBean/remote";*** *Context context =*
*new InitialContext(env);*** *System.*
+*out.println("about to look up jndi name " + jndiName);* MyBeanRemote beanRemote = (com.myeclipse.ejb3.MyBeanRemote) context.lookup(jndiName);beanRemote.doSomething();System.out.println("finished lookup"); }catch (NamingException e) { e.printStackTrace();}}} REMOTE CLASS package com.myeclipse.ejb3; import javax.ejb.Remote; @Remote public interface MyBeanRemote { public void doSomething() ;+
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557611#557611]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[JBoss Web Services] - Jboss WS Native and SOAPElement expected
by Brad Maxwell
Brad Maxwell [http://community.jboss.org/people/bcmaxwel] created the discussion
"Jboss WS Native and SOAPElement expected"
To view the discussion, visit: http://community.jboss.org/message/557595#557595
--------------------------------------------------------------
Hi all,
I'm trying to call another web service from my app deployed under JBoss 5.1 and can't get past this "SOAPElement expected" exception. I've searched for references and it appears that this was a bug in the native version last year. Is there any way around this one without switching off of native? I appear to be very stuck.
I'm running JBoss 5.1 AS. This happens trying to secure the outbound message. Please let me know if there's any other info I can provide.
Caused by: com.sun.xml.wss.XWSSecurityException: java.lang.IllegalArgumentException: SOAPElement expected
at com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.secureOutboundMessage(XWSSProcessor2_0Impl.java:96)
at com.vitalchek.wsClient.spring.SecurityHandler.secureClient(SecurityHandler.java:94)
... 53 more
Caused by: java.lang.IllegalArgumentException: SOAPElement expected
at org.jboss.ws.core.soap.SOAPHeaderImpl.convertToHeaderElement(SOAPHeaderImpl.java:286)
at org.jboss.ws.core.soap.SOAPHeaderImpl.insertBefore(SOAPHeaderImpl.java:204)
at com.sun.xml.wss.impl.XMLUtil.prependChildElement(XMLUtil.java:345)
at com.sun.xml.wss.impl.XMLUtil.prependChildElement(XMLUtil.java:352)
at com.sun.xml.wss.impl.SecurableSoapMessage.findWsseSecurityHeaderBlock(SecurableSoapMessage.java:211)
Thanks,
Brad
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557595#557595]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months