Search in sources :

Example 1 with DefaultURIResolver

use of org.apache.ws.commons.schema.resolver.DefaultURIResolver in project carbon-business-process by wso2.

the class HumanTaskStore method createAxisServiceBuilder.

// Creates the AxisServiceBuilder object.
private WSDL11ToAxisServiceBuilder createAxisServiceBuilder(HumanTaskBaseConfiguration taskConfig, Definition wsdlDef) {
    WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(wsdlDef, taskConfig.getServiceName(), taskConfig.getPortName());
    String wsdlBaseURI = wsdlDef.getDocumentBaseURI();
    serviceBuilder.setBaseUri(wsdlBaseURI);
    /*we don't need custom resolvers since registry takes care of it*/
    serviceBuilder.setCustomResolver(new DefaultURIResolver());
    URI wsdlBase = null;
    try {
        wsdlBase = new URI(convertToVaildURI(wsdlBaseURI));
    } catch (Exception e) {
        String error = "Error occurred while creating AxisServiceBuilder.";
        log.error(error);
    }
    serviceBuilder.setCustomWSDLResolver(new HumanTaskWSDLLocator(wsdlBase));
    serviceBuilder.setServerSide(true);
    return serviceBuilder;
}
Also used : HumanTaskWSDLLocator(org.wso2.carbon.humantask.core.integration.HumanTaskWSDLLocator) DefaultURIResolver(org.apache.ws.commons.schema.resolver.DefaultURIResolver) WSDL11ToAxisServiceBuilder(org.apache.axis2.description.WSDL11ToAxisServiceBuilder) URI(java.net.URI) RegistryException(org.wso2.carbon.registry.core.exceptions.RegistryException) HumanTaskDeploymentException(org.wso2.carbon.humantask.core.deployment.HumanTaskDeploymentException) HumanTaskRuntimeException(org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskRuntimeException)

Aggregations

URI (java.net.URI)1 WSDL11ToAxisServiceBuilder (org.apache.axis2.description.WSDL11ToAxisServiceBuilder)1 DefaultURIResolver (org.apache.ws.commons.schema.resolver.DefaultURIResolver)1 HumanTaskDeploymentException (org.wso2.carbon.humantask.core.deployment.HumanTaskDeploymentException)1 HumanTaskRuntimeException (org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskRuntimeException)1 HumanTaskWSDLLocator (org.wso2.carbon.humantask.core.integration.HumanTaskWSDLLocator)1 RegistryException (org.wso2.carbon.registry.core.exceptions.RegistryException)1