There can be a situation where you want to invoke the wso2 admin services from your external custom management tool. This post is taking a single use case where, making the WSO2 admin service for blocking users as a REST service.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<api name="UserProfileMgtRestServices" context="/UserProfileMgtRestServices"> | |
<resource methods="GET" uri-template="/getUserProfiles/{userId}"> | |
<inSequence> | |
<payloadFactory media-type="xml"> | |
<format> | |
<mgt:getUserProfiles xmlns:mgt="http://mgt.profile.user.identity.carbon.wso2.org"> | |
<mgt:username>$1</mgt:username> | |
</mgt:getUserProfiles> | |
</format> | |
<args> | |
<arg evaluator="xml" expression="get-property('uri.var.userId')"/> | |
</args> | |
</payloadFactory> | |
<property name="messageType" value="application/xml" scope="axis2"/> | |
<property name="ContentType" value="application/xml" scope="axis2"/> | |
<header name="Action" value="urn:getUserProfiles"/> | |
<send> | |
<endpoint> | |
<address uri="https://localhost:9443/services/UserProfileMgtService.UserProfileMgtServiceHttpsSoap11Endpoint" | |
format="soap11"/> | |
</endpoint> | |
</send> | |
</inSequence> | |
<outSequence> | |
<property name="messageType" value="application/json" scope="axis2"/> | |
<property name="ContentType" value="application/json" scope="axis2"/> | |
<send/> | |
</outSequence> | |
</resource> | |
</api> |