Johan Rylander

2010-05-03

”no xml was provided” in axis 1.4 call

Postat i: java, Programming — Johan Rylander @ 16:09

When using axis 1.4 to call a legacy web service we got the not so explaing error ”no xml was provided”. The fault was found (after some wireshark fun) to be that the call was done using chunked encoding.

Now then, setting the chunked encoding would normally be done by overriding the createCall method in org.apache.axis.client.service by using call.setProperty(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED, false); but doing that changed nothing. What did work was doing:

Map<String, Object> headers = (Hashtable<String, Object>) call.getProperty(HTTPConstants.REQUEST_HEADERS);
if (headers == null) {
headers = new Hashtable<String, Object>();
}
headers.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED, false);
call.setProperty(HTTPConstants.REQUEST_HEADERS, headers);

Kommentera »

Inga kommentarer ännu.

RSS-flöde för kommentarer till det här inlägget. TrackBack URI

Lämna en kommentar

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter-bild

You are commenting using your Twitter account. Logga ut / Ändra )

Facebook-foto

You are commenting using your Facebook account. Logga ut / Ändra )

Ansluter till %s

Tema: Silver is the New Black. Blogga med WordPress.com.

Follow

Get every new post delivered to your Inbox.