Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330390 - WSDL validator failed to resolve import
Summary: WSDL validator failed to resolve import
Status: NEW
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsdl (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-16 13:52 EST by seth CLA
Modified: 2010-11-18 18:03 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seth CLA 2010-11-16 13:52:01 EST
Build Identifier: 20100218-1602

WSDL validator failed to import resolve if the root WSDL file uri is a network path for example \\hostname\\filename.wsdl

Reproducible: Always

Steps to Reproduce:
1.Create a WSDL document fileA which imports another WSDL document fileB.WSDL validator works fine if both the files are on the local file system
2. Move both the files to a network shared location \\hostname
3.Now validate the WSDL uri \\hostname\fileA. Validation throws a warning that it could not resolve fileB and any references to components in fileB are not resolved.
Comment 1 Keith Chong CLA 2010-11-18 16:41:29 EST
In Step 3, how exactly are you validating fileA.wsdl?
Comment 2 seth CLA 2010-11-18 16:42:40 EST
(In reply to comment #1)
> In Step 3, how exactly are you validating fileA.wsdl?

I am using the standalone wst wsdl validator
Comment 3 Keith Chong CLA 2010-11-18 17:56:02 EST
How are you invoking the validator and specifying the wsdl file from the network path/share ?
Comment 4 seth CLA 2010-11-18 18:02:40 EST
(In reply to comment #3)
> How are you invoking the validator and specifying the wsdl file from the
> network path/share ?

I have written a java program with GUI to browse the file over network path.Here is the snippet for calling the validator.


WSDLValidator validator = new WSDLValidator()
IValidationReport validationReport = validator.validate(
							ResourceUtils.createURI(uriString).toString(),
							inputStream, getValidationConfiguration());
Comment 5 seth CLA 2010-11-18 18:03:43 EST
(In reply to comment #4)
> (In reply to comment #3)
> > How are you invoking the validator and specifying the wsdl file from the
> > network path/share ?
> 
> I have written a java program with GUI to browse the file over network
> path.Here is the snippet for calling the validator.
> 
> 
> WSDLValidator validator = new WSDLValidator()
> IValidationReport validationReport = validator.validate(
>                             ResourceUtils.createURI(uriString).toString(),
>                             inputStream, getValidationConfiguration());

	private WSDLValidationConfiguration getValidationConfiguration() {
		if (configuration == null) {
			configuration = new WSDLValidationConfiguration();
			configuration.setProperty(Constants.XMLSCHEMA_CACHE_ATTRIBUTE,
					new InlineSchemaModelGrammarPoolImpl());
			configuration.setProperty(Constants.XML_CACHE_ATTRIBUTE,
					new XMLGrammarPoolImpl());
		}
		return configuration;
	}

public static URI createURI(String uriString){
		if (isURL(uriString)){
			return URI.createURI(uriString);
		}
		else
			return URI.createFileURI(uriString);
	}