Class CGAgentWsdlDependencyResolver


  • public class CGAgentWsdlDependencyResolver
    extends Object
    Scans a given wsdl (and axis service associated with it) for schama import/includes and adjust them accordingly so that the given axis service can be constructed using the wsdl outside the firewall. This is required because, CSG server (running outside a firewall) doesn't have access to these external dependencies.
    • Constructor Detail

      • CGAgentWsdlDependencyResolver

        public CGAgentWsdlDependencyResolver​(org.apache.axis2.description.AxisService service,
                                             String wsdlLocation)
        Instantiates an instance using specified arguments
        Parameters:
        service - The service that needs to be checked for schema imports
        wsdlLocation - location of the wsdl
    • Method Detail

      • parseWsdlDependencies

        public org.apache.axiom.om.OMElement parseWsdlDependencies​(List<org.wso2.carbon.cloud.gateway.stub.types.common.CGServiceDependencyBean> dependencies)
                                                            throws org.wso2.carbon.cloud.gateway.common.CGException
        Scan the supplied wsdl (and Axis service) for schema imports and does following:
        • Adjust the 'schemalocation' tags on each import/include element of the wsdl so they will not point to locations that are not accessible.
        • Prepare a list of CGServiceDependencyBean containing content of imported schemas so they can be transmitted outside the firewall.
        Parameters:
        dependencies - This list will be populated with CGServiceDependencyBeans
        Returns:
        The Wsdl with modified 'schemaLocations'
        Throws:
        org.wso2.carbon.cloud.gateway.common.CGException - An error while retrieving the wsdl