...
Code Block | ||
---|---|---|
| ||
<AssociationConfig> <Association type="default"> <security>policy</security> <ownedBy>soapservice,restservice,wsdl</ownedBy> <usedBy>soapservice,restservice,wsdl</usedBy> <dependancies>soapservice,restservice,wsdl</dependancies> </Association> <Association type="restservice"> <security>policy</security> <ownedBy>restservice,soapservice,wsdl</ownedBy> <usedBy>restservice,soapservice,wsdl</usedBy> <dependancies>restservice,soapservice,wsdl,endpoint</dependancies> </Association> <Association type="soapservice"> <security>policy</security> <ownedBy>soapservice,restservice,wsdl</ownedBy> <usedBy>soapservice,restservice,wsdl</usedBy> <dependancies>soapservice,restservice,wsdl,endpoint</dependancies> </Association> </AssociationConfig> |
Adding a new association type
You can add custom association types in WSO2 G-Reg, and add them to assets using the G-Reg Publisher.
To create a new association type, you can specify it to be available for default or specific asset types by defining the new association type within the default
, restservice
, and soapservice
elements in the <G-REG_HOME>/repository/conf/governance.xml
file. Default
association type denotes all other asset types that are not overridden. The other two association types(i.e restservice
, and soapservice)
denote the overridden asset types, which are REST Services and SOAP Services.
For an example, if you want to add a new association named criticalTo
, and make it available only for SOAP Services, modify the soapservice
association configuration as shown below. The values within the <criticalTo>
tag are the comma-separated asset types that you can associate using the criticalTo
association type with a SOAP service.
Code Block |
---|
<Association type="soapservice">
<security>policy</security>
<ownedBy>soapservice,restservice,wsdl</ownedBy>
<usedBy>soapservice,restservice,wsdl</usedBy>
<dependancies>soapservice,restservice,wsdl,endpoint</dependancies>
<criticalTo>soapservice,restservice,wsdl</criticalTo>
</Association> |
Viewing the new association type
Re-start the WSO2 G-Reg server, and then follow the steps 1-4 in the above section, to view the new association type you added above as shown below.
Click that the CriticalTo combo box to view the SOAP Services, REST Services and WSDLs stored in the Registry that are available for you to associate with the selected asset, using this new association type as shown below.