Issues With AttachWebServicePolicy And DetachWebServicePolicy

(Doc ID 2302745.1)

Last updated on SEPTEMBER 06, 2017

Applies to:

Oracle WebLogic Server - Version 12.2.1.2.0 to 12.2.1.2.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

Getting some issues with attachWebServicePolicy and detachWebServicePolicy.

These two WLST commands are being used to remove one policy and add two other policies in order to configure the GenericSoapPort in UCM.  While the commands do not produce errors, they also don't seem to change anything.

Trying to accomplish three things with WLST:

1. Remove oracle/wsmtom_policy.
2. Add oracle/no_mtom_policy.
3. Add oracle/wss_username_token_service_policy.

* Starting by firing up WLST:
/opt/oracle/middleware/oracle_common/common/bin/wlst.sh

* Then connect to the admin server:
connect('weblogic', 'welcome1', 't3://localhost:7001')

* List the current web services:
listWebServices()

Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root MBean.
For more help, use help('domainRuntime')

/base_domain/UCM_server1/Oracle UCM Web Services :
moduleName=your-ws.war, moduleType=web, serviceName=GenericSoap12Service
moduleName=your-ws.war, moduleType=web, serviceName=GenericSoapService

/base_domain/UCM_server1/wsm-pm :
moduleName=wsm-pm-diagnostic, moduleType=web,
serviceName={http://diagnostic.wsm.oracle/}DiagnosticService

/base_domain/UCM_server1/Oracle UCM Native Web Services :
moduleName=your-nativews.war, moduleType=web, serviceName=your-WebLoginService
moduleName=your-nativews.war, moduleType=web, serviceName=your-WebRequestService

* List the GenericSoapPort:
listWebServicePorts('/base_domain/UCM_server1/Oracle UCM WebServices','your-ws.war','web','GenericSoapService')

GenericSoapPort http://<your_hosname.domainname>:16000/your-ws/GenericSoapPort

* List the current policies:
listWebServicePolicies('/base_domain/UCM_server1/Oracle UCM WebServices','your-ws.war','web','GenericSoapService','GenericSoapPort')

GenericSoapPort :
URI="oracle/mex_request_processing_service_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/mtom_encode_fault_service_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/max_request_size_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="max.request.size", value="-1"
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/request_processing_service_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/soap_request_processing_service_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/ws_logging_level_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="logging.level", value=""
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/wsdl_request_processing_service_policy", category=wsconfig, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="IMPLIED_FEATURE"
URI="oracle/wsmtom_policy", category=mtom, policy-status=enabled; source=local policy set; reference-status=enabled; effective=true
Property name="local.policy.reference.source", value="LOCAL_ATTACHMENT"

The policy subject is not secure in this context.

-

* Notice the last one in the list, oracle/wsmtom_policy.
Trying to remove it by running :
detachWebServicePolicy('/base_domain/UCM_server1/Oracle UCM WebServices','your-ws.war','web','GenericSoapService','GenericSoapPort','oracle/wsmtom_policy')

Session started for modification.
The policy subject is selected for modification.
Policy reference "oracle/wsmtom_policy" removed.
The policy set for subject "/WLS/base_domain/Oracle UCM WebServices|#your-ws.war|WS-Service({urn:GenericSoap}GenericSoapService#GenericSoapPort)" was saved successfully.

* Yet, when listWebServicePolicies is executed, the item is still seen in the list.
The managed server (UCM_server1) got restarted too.

* Likewise, policies cannot seem to be added. Example commands that should work,
appear to work, but then don't show up in the policy list:
attachWebServicePolicy('/base_domain/UCM_server1/Oracle UCM WebServices','your-ws.war','web','GenericSoapService','GenericSoapPort','oracle/no_mtom_policy')
attachWebServicePolicy('/base_domain/UCM_server1/Oracle UCM WebServices','your-ws.war','web','GenericSoapService','GenericSoapPort','oracle/wss_username_token_service_policy')

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms