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);
}
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;
}
Aggregations