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

WSDLParser.parse({wsdlURL}) does not handle 302 redirect #212

Closed rsolton closed 8 years ago

rsolton commented 10 years ago

If a WSDL URL returns a 302, then attempting to WSDLParser.parse() it, the redirected URL is not followed. Instead, this exception occurs:

com.predic8.xml.util.ResourceDownloadException

Here's an example URL:

http://apistrategy-test.apigee.net/v1/wsdl-redirect/NewsService/Service.asmx?WSDL

predic8 commented 10 years ago

thanks for reporting

rsolton commented 10 years ago

If you're using an HttpURLConnection object, then you just need to do this:

    httpURLConnection.setInstanceFollowRedirects(true);

But, that should already be the default:

I could not find the source for this. Where can I find it, so I can contribute?

predic8 commented 10 years ago

Hi, i think SOA model uses the Apache HTTP Client. The code is in the ExternalResolver class.

Thomas

Am 15/03/14 18:02, schrieb Randy Solton:

If you're using an HttpURLConnection object, then you just need to do this:

httpURLConnection.setInstanceFollowRedirects(true);

But, that should already be the default:

I could not find the source for this. Where can I find it, so I can contribute?

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

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