Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invoking Live Search Web Service - via Axis Client -error AxisFault connection abort

James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to invoke this web service:
Using this i want to be able to do a search.

The error is get is:
org.apache.axis2.AxisFault: Software caused connection abort: recv failed

Either i am doing something wrong in the code i.e giving wrong service name or parameter etc. OR This is a Proxy problem OR the service itself is not active.

My code for invoking the web service is :

import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;

public class WeatherClient {

public static void main(String[] args) throws Exception {
System.setProperty("http.proxyHost", "");
System.setProperty("http.proxyPort", "3128");

ServiceClient client = new ServiceClient();
// create option object
Options opts = new Options();
//setting target EPR
opts.setTo(new EndpointReference(""));
//Setting action ,and which can be found from the wsdl of the service
OMElement res = client.sendReceive(createPayLoad());


public static OMElement createPayLoad() {
OMFactory fac = OMAbstractFactory.getOMFactory();
//OMNamespace omNs = fac.createOMNamespace("", "ns1");
OMNamespace omNs = fac.createOMNamespace("", "ns1");
OMElement method = fac.createOMElement("SearchMessage", omNs);
OMElement value = fac.createOMElement("Search", omNs);
value.setText("New York India Tarrif rangeela desi no way meet up ranso");
return method;

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic