* @return the definition described in the document pointed to
* by the InputSource.
*/
public Definition readWSDL(String documentBaseURI, InputSource inputSource) throws WSDLException
{
ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("wsdl", new WSDLResourceFactoryImpl());
WSDLResourceImpl wsdlMainResource = (WSDLResourceImpl)resourceSet.createResource(URI.createURI("*.wsdl"));
try
{
if (documentBaseURI != null)
wsdlMainResource.setURI(createURI(documentBaseURI));
resourceSet.getLoadOptions().put(WSDLResourceImpl.CONTINUE_ON_LOAD_ERROR, new Boolean(false));
wsdlMainResource.load(inputSource.getByteStream(), resourceSet.getLoadOptions());
}
catch (IOException ioe)
{
throw new WSDLException(WSDLException.INVALID_WSDL, "", ioe);
}