You can customize web services endpoints and configure security settings for both web services providers and web service clients by using the ibm-ws-bnd.xml file in the Liberty profile. You must store this file in the /WEB-INF directory of your web application or in the /META-INF directory of your EJB module.
The description of each element in the ibm-ws-bnd.xml file is as follows:
This element is used to define the default properties for all the web services endpoints in the same module. Only one webservice-endpoint-properties element can be specified for one module. You can specify any name and value pairs that are applicable to web services endpoint as attributes of the webservice-endpoint-properties element.
<?xml version="1.0" encoding="UTF-8"?>
<webservices-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ws-bnd_1_0.xsd"
version="1.0">
<!-- optional Web service endpoint default properties -->
<webservice-endpoint-properties org.apache.cxf.wsdl.create.imports="true" ... />
<!-- 0 to many endpoint descriptions -->
<webservice-endpoint port-component-name="..." address="optional override address">
<!-- optional Web service endpoint properties -->
<properties publishedEndpointUrl="http://www.example.com/services/hello"
org.apache.cxf.wsdl.create.imports="false" />
</webservice-endpoint>
...
<!-- optional http publishing module overrides -->
<http-publishing context-root="optional override of module's context root">
<!-- optional web.xml fragment for security -->
<webservice-security>
<!-- SECURITY CONSTRAINTS -->
<security-constraint>
<web-resource-collection>
<web-resource-name>SayHelloServiceName</web-resource-name>
<url-pattern>/SayHelloService</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>SayHelloServiceAuth</description>
<role-name>group123</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<!-- SECURITY CONSTRAINTS -->
<security-constraint>
<web-resource-collection>
<web-resource-name>SecuredSayHelloServiceName</web-resource-name>
<url-pattern>/Secured*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>SecuredSayHelloServiceAuth</description>
<role-name>group123</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<!-- SECURITY ROLES -->
<security-role id="group123_id">
<role-name>group123</role-name>
</security-role>
<!-- AUTHENTICATION METHOD: Client certificate or basic authentication -->
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</webservice-security>
</http-publishing>
<!-- 0 to many client refs -->
<service-ref name="services/sayHelloService"
port-address="http://productServer:productPort/context-root/SayHelloService"/>
<service-ref name="services/securedSayHelloService"
port-address="http://productServer:productPort/context-root/SecuredSayHelloService"
wsdl-location="optional override of WSDL document" />
</webservices-bnd>