Search in sources :

Example 1 with LocatableWebServiceException

use of com.sun.xml.ws.util.exception.LocatableWebServiceException in project metro-jax-ws by eclipse-ee4j.

the class WSDLBoundPortTypeImpl method freeze.

public void freeze() {
    portType = owner.getPortType(portTypeName);
    if (portType == null) {
        throw new LocatableWebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName), getLocation());
    }
    portType.freeze();
    for (EditableWSDLBoundOperation op : bindingOperations.values()) {
        op.freeze(owner);
    }
    freezePayloadMap();
    owner.finalizeRpcLitBinding(this);
}
Also used : EditableWSDLBoundOperation(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation) LocatableWebServiceException(com.sun.xml.ws.util.exception.LocatableWebServiceException)

Example 2 with LocatableWebServiceException

use of com.sun.xml.ws.util.exception.LocatableWebServiceException in project metro-jax-ws by eclipse-ee4j.

the class DeploymentDescriptorParser method getPrimaryWSDL.

/**
 * Checks the deployment descriptor or {@link @WebServiceProvider} annotation
 * to see if it points to any WSDL. If so, returns the {@link SDDocumentSource}.
 *
 * @return The pointed WSDL, if any. Otherwise null.
 */
private SDDocumentSource getPrimaryWSDL(XMLStreamReader xsr, Attributes attrs, Class<?> implementorClass, MetadataReader metadataReader) {
    String wsdlFile = getAttribute(attrs, ATTR_WSDL);
    if (wsdlFile == null) {
        wsdlFile = EndpointFactory.getWsdlLocation(implementorClass, metadataReader);
    }
    if (wsdlFile != null) {
        if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR)) {
            logger.log(Level.WARNING, "Ignoring wrong wsdl={0}. It should start with {1}. Going to generate and publish a new WSDL.", new Object[] { wsdlFile, JAXWS_WSDL_DD_DIR });
            return null;
        }
        URL wsdl;
        try {
            wsdl = loader.getResource('/' + wsdlFile);
        } catch (MalformedURLException e) {
            throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), e, xsr);
        }
        if (wsdl == null) {
            throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr);
        }
        SDDocumentSource docInfo = docs.get(wsdl.toExternalForm());
        assert docInfo != null;
        return docInfo;
    }
    return null;
}
Also used : MalformedURLException(java.net.MalformedURLException) SDDocumentSource(com.sun.xml.ws.api.server.SDDocumentSource) LocatableWebServiceException(com.sun.xml.ws.util.exception.LocatableWebServiceException) URL(java.net.URL)

Aggregations

LocatableWebServiceException (com.sun.xml.ws.util.exception.LocatableWebServiceException)2 EditableWSDLBoundOperation (com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation)1 SDDocumentSource (com.sun.xml.ws.api.server.SDDocumentSource)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1