membrane / soa-model

Toolkit and Java API for WSDL, WADL and XML Schema.
http://www.membrane-soa.org/soa-model/
Apache License 2.0
94 stars 73 forks source link

Problem finding relative referenced Schema after WSDL Import #198

Closed ithena closed 10 years ago

ithena commented 10 years ago

When a WSDL imports another WSDL, parsing of the imported WSDL keeps using the original baseDir of the parent WSDL.

This causes problems when the imported WSDL references Schema's using a relative schemaLocation (../xxx)

predic8 commented 10 years ago

The baseDir should be changed within the imported WSDL. I think we have some tests to ensure this. Kaveh will have a look at this after his vacation (till 2014/1/15).

Thanks again for reporting.

ithena commented 10 years ago

The problem occurs when using the ExternalResourceResolver and the imported WSDL is in another location than the parent WSDL.

predic8 commented 10 years ago

Are you getting the WSDL using file or http?

Am 30/12/13 09:41, schrieb Ruben:

The problem occurs when using the ExternalResourceResolver and the imported WSDL is in another location than the parent WSDL.

— Reply to this email directly or view it on GitHub https://github.com/membrane/soa-model/issues/198#issuecomment-31337331.

Viele Grüße, Thomas Bayer

predic8 GmbH Moltkestr. 40

53173 Bonn

http://predic8.de Tel: +49 (0) 228 5552576-0 Fax: +49 (0) 228 5552576-50

Amtsgericht Bonn HRB 16152 Geschäftsführer: Thomas Bayer

ithena commented 10 years ago

We are using files on the local file system.

predic8 commented 10 years ago

There is a test to insure that relative referenced Schemas are found:

https://github.com/membrane/soa-model/blob/1100e529966e3b61abc1c3098e76b539dc4ced6f/core/src/test/groovy/com/predic8/schema/ImportTest.groovy

but it uses ClasspathResolver. Maybe ExternalResouceResolver is different. When Kaveh is back, we will extend this test using ExternalResouceResolver.

Am 30/12/13 10:43, schrieb Ruben:

We are using files on the local file system.

— Reply to this email directly or view it on GitHub https://github.com/membrane/soa-model/issues/198#issuecomment-31338950.

Viele Grüße, Thomas Bayer

predic8 GmbH Moltkestr. 40

53173 Bonn

http://predic8.de Tel: +49 (0) 228 5552576-0 Fax: +49 (0) 228 5552576-50

Amtsgericht Bonn HRB 16152 Geschäftsführer: Thomas Bayer

keshavarzi commented 10 years ago

@ithena Thank you for your valuable bug report. The baseDir updating method was only handling schema imports and not WSDLs! This is fixed in 31fb8b4de990cb49ded573124ccad1771981f316