Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WS-Security problem with eclipse ide
WS-Security problem with eclipse ide [message #1106368] Wed, 11 September 2013 02:33
Joseph Hwang is currently offline Joseph HwangFriend
Messages: 6
Registered: September 2013
Junior Member
I am struggling with jbossws-cxf-4.2.0.Final ws-security implementation with eclipse ide.
This is my service endpoint interface and service class code.

===== IHelloWorld Interface
@WebService(targetNamespace="http:/" )
public interface IHelloWorld {

public String sayHello(@WebParam String name);

portName = "HelloWorldServicePort",
serviceName = "HelloWorldService",
targetNamespace = "http:/",
endpointInterface = ""
@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint") // this line DOES NOT WORK!!!
public class HelloWorld implements IHelloWorld {
public String sayHello(String name) {
// TODO Auto-generated method stub
return "Hello " + name;

====== jaxws-endpoint-config.xml
<config-name>Custom WS-Security Endpoint</config-name>

====== client
public class WSSClient {

private final String serviceURL="http:/localhost:8080/WSSHelloWorld/HelloWorld";
private IHelloWorld proxy;

public WSSClient() throws IOException {
QName serviceName = new QName("http:/", "HelloWorldService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = (IHelloWorld)service.getPort(IHelloWorld.class);

((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/"));
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/"));
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "client");
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "server");

} // the constructor throws no exception.
public String callMethd(String name) {
return proxy.sayHello(name); // this method throws exception
I try to jbossws-cxf ws-security in eclipse ide.But there is no document or reference site.
Pls, check this issue, https:/
Your advice will be appreciated! Thanks in advance

[Updated on: Wed, 11 September 2013 02:34]

Report message to a moderator

Previous Topic:debugging question
Next Topic:What should soap url be to intercept soap message with eclipse tcp/ip monitor?
Goto Forum:

Current Time: Fri Jun 22 02:11:29 GMT 2018

Powered by FUDForum. Page generated in 0.01508 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top