Re: [jboss-user] [JBoss Web Services] - Jboss ws-security, client configuration
by Tim de Jager
Tim de Jager [http://community.jboss.org/people/tdejager] replied to the discussion
"Jboss ws-security, client configuration"
To view the discussion, visit: http://community.jboss.org/message/543679#543679
--------------------------------------------------------------
My entire stack trace:
Exception in thread "main" javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:286)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:157)
at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(ClientImpl.java:177)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:298)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy14.submitWebsiteData(Unknown Source)
at Main.main(Main.java:49)
Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:264)
at org.jboss.ws.extensions.security.WSSecurityDispatcher.encodeMessage(WSSecurityDispatcher.java:226)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:104)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleOutbound(WSSecurityHandlerClient.java:43)
at org.jboss.wsf.common.handler.GenericHandler.handleMessage(GenericHandler.java:53)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:305)
at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:142)
... 7 more
1) I have appended a FileAppender to the rootlogger in the client code.
2) I'm using the JBossWS version included in the jboss 5.1.0 build
3) I resolved the class path issue by only including the jars found in de wsrunclient file, plus the ones from the endorsed jboss dir as well as setting the java endorsed library to that same location.
Thanks for taking an interest :D .
I have also been looking at the samples from Jboss in action. And I can't figure out how the author gets the Client to pick up on the security configuration, is it just by including the files in META-INF directory? Or does it have something to with the fact that he runs the samples form a JAR file?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543679#543679]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[EJB 3.0] - Please help me to solve the problem
by Govardhan Reddy
Govardhan Reddy [http://community.jboss.org/people/sgreddy.vardhan] created the discussion
"Please help me to solve the problem"
To view the discussion, visit: http://community.jboss.org/message/543663#543663
--------------------------------------------------------------
!)
*package*
**
*com.ejb3.account;*** **
*import*
**
*javax.ejb.Stateless;*** **
*@Stateless*
*(name="AccountBean",mappedName="AccountBean")*** *public*
**
*class AccountBean implements AccountRemote{*** *public*
**
*void deposit(int accno,double amt)*** *{*
*System.*
+*out.println("Ok Deposited");*** *}*
*public*
**
*double getBal(int accno)*** *{*
**
*return 9999;*** *}*
*}*
*2)* *package*
com.ejb3.account;
*import*
javax.ejb.Remote;
*@Remote*
*public*
*interface* AccountRemote {
*public double getBal(int* *accno);*
*public void deposit(int accno,double* *amt);*
*}*
**
*3)package com.ejb3.account;*
*import java.util.Properties;*
*import javax.naming.Context;
import javax.naming.InitialContext;*
*public class AccountEjb3Jboss422Client {*
*/**
* @param args
*/
public static void main(String[] args) {
try{
Properties p=new Properties();
p.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.provider.url","localhost:1099");
p.setProperty("java.naming.factory.url.pkgs","org.jboss.naming");
Context ctx=new InitialContext(p);
System.out.println("Initial Context created");*
* Object o=ctx.lookup("AccountBean/remote");
System.out.println("lookup successful");
AccountRemote ar=(AccountRemote)o;
System.out.println("Calling EJB method . . .");
ar.deposit(88,10000);
double bal=ar.getBal(88);
System.out.println("Bal is: "+bal);
System.out.println("Output will be in Managed server console");
}catch (Exception e) {
e.printStackTrace();
}
}
}
*
*error*
*Initial Context created
javax.naming.CommunicationException
NamingContext.java:722)at org.jnp.interfaces.NamingContext.lookup(
NamingContext.java:587)at javax.naming.InitialContext.lookup(Unknown Source)
at com.ejb3.account.AccountEjb3Jboss422Client.main(
AccountEjb3Jboss422Client.java:24)Caused by:
java.io.InvalidClassException: org.jboss.remoting.InvokerLocator; local class incompatible: stream classdesc serialVersionUID = -4977622166779282521, local class serialVersionUID = -2909329895029296248at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.MarshalledValuePair.get(
MarshalledValuePair.java:72)at org.jnp.interfaces.NamingContext.lookup(
NamingContext.java:652)... 3 more
please help me
[Root exception is java.io.InvalidClassException: org.jboss.remoting.InvokerLocator; local class incompatible: stream classdesc serialVersionUID = -4977622166779282521, local class serialVersionUID = -2909329895029296248]at org.jnp.interfaces.NamingContext.lookup(
*
+
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/543663#543663]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months