Forum Discussion

Anonymous's avatar
8 years ago

How to bind jbossws properties files to soap request and response message in soapui?

As you know, in wildfly ws-security configuration, 2 properties files are binded to web service. In server side is binded like below,


== jaxws-endpoint-config.xml


   <config-name>Custom WS-Security Endpoint</config-name>     



@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
public class HelloWorld implements IHelloWorld {
    public String sayHello(String name) {
        // TODO Auto-generated method stub
        return "Hello " + name;

In client side, JSP files are binding to soap request.


== index.jsp


String SERVICE_URL = "http://localhost:8080/SOAPEncryptWeb/HelloWorld";

try {
    QName serviceName = new QName("", "HelloWorldService");

    URL wsdlURL;
    wsdlURL = new URL(SERVICE_URL + "?wsdl");
    Service service = Service.create(wsdlURL, serviceName);

    IHelloWorld port = (IHelloWorld) service.getPort(IHelloWorld.class); 

    ((BindingProvider) port).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
    ((BindingProvider) port).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/"));
    ((BindingProvider) port).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "servicekey");
} catch (Exception e) {
    // TODO Auto-generated catch block

So in soapui application I remake these client/server properties like below,



But I am stuck on this part. These server and client properties are binded successfully on eclipse ide. However in soapui application i have no idea how to bind these properties with soap request and response. I need any tutorials. Your helping response will be deeply appreciated. Best regards.

No Replies