Search in sources :

Example 11 with WSDLInfo

use of org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo in project carbon-apimgt by wso2.

the class WSDL11ProcessorImpl method getWsdlInfo.

@Override
public WSDLInfo getWsdlInfo() throws APIMgtWSDLException {
    WSDLInfo wsdlInfo = new WSDLInfo();
    Map<String, String> endpointsMap = getEndpoints();
    wsdlInfo.setEndpoints(endpointsMap);
    wsdlInfo.setVersion(APIConstants.WSDL_VERSION_11);
    return wsdlInfo;
}
Also used : WSDLInfo(org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo)

Example 12 with WSDLInfo

use of org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo in project carbon-apimgt by wso2.

the class WSDL20ProcessorImpl method getWsdlInfo.

@Override
public WSDLInfo getWsdlInfo() throws APIMgtWSDLException {
    Map<String, String> endpointsMap = getEndpoints();
    WSDLInfo wsdlInfo = new WSDLInfo();
    wsdlInfo.setEndpoints(endpointsMap);
    wsdlInfo.setVersion(WSDL_VERSION_20);
    return wsdlInfo;
}
Also used : WSDLInfo(org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo)

Example 13 with WSDLInfo

use of org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo in project carbon-apimgt by wso2.

the class APIMappingUtil method fromWSDLValidationResponseToDTO.

/**
 * Converts a WSDL validation response model to DTO.
 *
 * @param validationResponse validation response model
 * @return Converted WSDL validation response model to DTO
 */
public static WSDLValidationResponseDTO fromWSDLValidationResponseToDTO(WSDLValidationResponse validationResponse) {
    WSDLValidationResponseDTO wsdlValidationResponseDTO = new WSDLValidationResponseDTO();
    WSDLInfo wsdlInfo;
    if (validationResponse.isValid()) {
        wsdlValidationResponseDTO.setIsValid(true);
        wsdlInfo = validationResponse.getWsdlInfo();
        WSDLValidationResponseWsdlInfoDTO wsdlInfoDTO = new WSDLValidationResponseWsdlInfoDTO();
        wsdlInfoDTO.setVersion(wsdlInfo.getVersion());
        List<WSDLValidationResponseWsdlInfoEndpointsDTO> endpointsDTOList = fromEndpointsMapToWSDLValidationResponseEndpointsDTO(wsdlInfo.getEndpoints());
        wsdlInfoDTO.setEndpoints(endpointsDTOList);
        wsdlValidationResponseDTO.setWsdlInfo(wsdlInfoDTO);
    } else {
        wsdlValidationResponseDTO.setIsValid(false);
        wsdlValidationResponseDTO.setErrors(getErrorListItemsDTOsFromErrorHandler(validationResponse.getError()));
    }
    return wsdlValidationResponseDTO;
}
Also used : WSDLInfo(org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo) WSDLValidationResponseDTO(org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.WSDLValidationResponseDTO) WSDLValidationResponseWsdlInfoEndpointsDTO(org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.WSDLValidationResponseWsdlInfoEndpointsDTO) WSDLValidationResponseWsdlInfoDTO(org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.WSDLValidationResponseWsdlInfoDTO)

Aggregations

WSDLInfo (org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo)8 WSDLInfo (org.wso2.carbon.apimgt.core.models.WSDLInfo)4 WSDL11SOAPOperationExtractor (org.wso2.carbon.apimgt.impl.wsdl.WSDL11SOAPOperationExtractor)3 APIDefinitionValidationResponseDTO (org.wso2.carbon.apimgt.rest.api.publisher.dto.APIDefinitionValidationResponseDTO)3 Response (javax.ws.rs.core.Response)2 APIPublisher (org.wso2.carbon.apimgt.core.api.APIPublisher)2 WorkflowResponse (org.wso2.carbon.apimgt.core.api.WorkflowResponse)2 WSDLArchiveInfo (org.wso2.carbon.apimgt.core.models.WSDLArchiveInfo)2 GeneralWorkflowResponse (org.wso2.carbon.apimgt.core.workflow.GeneralWorkflowResponse)2 APIMgtWSDLException (org.wso2.carbon.apimgt.impl.wsdl.exceptions.APIMgtWSDLException)2 WSDLSOAPOperation (org.wso2.carbon.apimgt.impl.wsdl.model.WSDLSOAPOperation)2 Info (io.swagger.models.Info)1 ModelImpl (io.swagger.models.ModelImpl)1 Operation (io.swagger.models.Operation)1 Path (io.swagger.models.Path)1 RefModel (io.swagger.models.RefModel)1 Response (io.swagger.models.Response)1 Swagger (io.swagger.models.Swagger)1 BodyParameter (io.swagger.models.parameters.BodyParameter)1 QueryParameter (io.swagger.models.parameters.QueryParameter)1