membrane / soa-model

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

Calling parse() with a WSDL URL Containing No Host, Results in an internal Error #214

Closed rsolton closed 10 years ago

rsolton commented 10 years ago

Calling parse() with a WSDL URL containing an http scheme, but no host component, results in an internal error "Negative array index [-2] too large for array size 1"

For example, the following will produce that error:

WSDLParser parser = new WSDLParser();
Definitions defs = parser.parse("http");
predic8 commented 10 years ago

Thanks for reporting. But that is ok. Parse expects a valid URL or a file Path. We can consider throwing a nicer exception.

rsolton commented 10 years ago

Yes, of course parse expects a valid URL. However, it's pretty sloppy to have such a basic internal error such as this. There should be standard url validation in place. You are not intentionally throwing this error. This error happens as a result of a missing check.

predic8 commented 10 years ago

You are right that it is not intentionally. And that a check is missing. We should add this check.

thanks, Thomas

Am 02/04/14 17:26, schrieb Randy Solton:

Yes, of course parse expects a valid URL. However, it's pretty sloppy to have such a basic internal error such as this. There should be standard url validation in place. You are not /intentionally/ throwing this error. This error happens as a result of a missing check.

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

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