Consume a web service which redirects using HTTP 302

Posted by jbijker on 16-Aug-2017 07:57

When trying to consume a web service on a address we have a redirect rule set up to issue a standard HTTP 302 location response, meaning the client should make another request to the whatever is specified in the location header.

But this is causing interesting results from ABL. We're getting (lots of) 15634 and 11748 errors in the log file:

WS -- Agent failed to receive data. Error -3 Invalid Header Read  (15634)

Error loading WSDL document <address> : end tag name should be 'hr' not 'body' at line 9 and column 8 (11748)

It looks like the agent can't recover from this and must eventually be killed.

We're running on OE11.3.3 on CentOS 6 64-bit.

This is the headers returned from the initial request:

GET http://our.initial.address.com HTTP/1.0

HTTP/1.1 302 Found
Date: Wed, 16 Aug 2017 12:13:10 GMT
Server: Apache/2.2.15 (CentOS)
Location: http://our.new.address.com
Content-Length: 322
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="...">here</a>.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at our.server.com Port 80</address>
</body></html>

Anyone knows if this is fixed in later releases?

All Replies

Posted by gdb390 on 16-Aug-2017 08:03

should the <hr> tag not be like  <hr/> ?

Posted by jbijker on 16-Aug-2017 08:07

Don't think so. HTML is a lot less strict compared to XML.

Posted by gdb390 on 16-Aug-2017 08:13

the error specifies that there is something wrong with the tags and especially the hr tag

Posted by jbijker on 16-Aug-2017 08:16

Indeed - but I think this is a bug. It should try to interpret the HTML as a WSDL, instead it should follow the location link to get to the real WSDL.

Posted by jbijker on 16-Aug-2017 08:16

sorry - should NOT interpret the HTML as WSDL

This thread is closed