[JBossWS] - Basic authentication for WS fails to authenticate from clien
by donï¼ inpowersoft.com
I have a bean that is annotated with @Webservice and @SecurityDomain
@Stateless()
@WebService()
@SecurityDomain("MyDomain")
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class DownPartBean implements DownPartLocal, DownPartRemote {
...
}
MyDomain is setup appropriately in the login-config.xml and is proven to be working from other context.
However, if I connect from a ws client even with the user and password set, the authentication always fails.
I've also edit the META-INF/jboss.xml file such that it looks like below but it never works. The documentation relating to how to secure an end point does not work for me and I suspect I probably did something wrong.
Appreciate any help..
-don
jboss.xml
<security-domain>MyDomain</security-domain>
<enterprise-beans>
<ejb-name>DownPartBean</ejb-name>
<port-component>
<port-component-name>
DownPartBean
</port-component-name>
<port-component-uri>
/lsaplEjbServer/DownPartBean
</port-component-uri>
<auth-method>BASIC</auth-method>
</port-component>
</enterprise-beans>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051872#4051872
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051872
18Â years, 10Â months
[EJB 3.0] - Re: javax.naming.NotContextException
by psyllogism
Yes, I am using EJB 3.0. I currently do not have an ejb-jar.xml file. I have not developed with EJBs before but I thought that EJB 3.0 does not need one?
The lookup code:
// Lookup the meta-agent
| Properties p = new Properties();
| p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| p.put(Context.PROVIDER_URL, "jnp://" + m_hostName + ":" + m_serverPortNumber);
| Context jndiContext = new InitialContext(p);
|
| Object ref = jndiContext.lookup("MetaAgentImpl");
| m_metaAgent = (MetaAgent) PortableRemoteObject.narrow(ref, MetaAgent.class);
The MetaAgent interface:
@Remote
| public interface MetaAgent {
| ...
| }
The MetaAgent implementation:
@Stateful
| public class MetaAgentImpl
| extends AbstractSessionAgent implements MetaAgent,
| Serializable {
| ...
| }
Thanks for looking!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051867#4051867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051867
18Â years, 10Â months