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

Probelm accessing a Webservice via a proxy

Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to access a Webservice via a proxy.
I am using AXIS 1.4.
To do the above I set the proxy settings in the following manner:
Properties props= new Properties(System.getProperties());
props.put("http.proxySet", "true");
props.put("http.proxyHost", "");
props.put("http.proxyPort", "8080");
Properties newprops = new Properties(props);

However when I run the client I get the following Exception:
org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

I even tried setting the proxy properties using AxisProperties in the proxy stub.
AxisProperties.setProperty("http.proxyHost", "");
AxisProperties.setProperty("http.proxyPort", "8080");

It still gives me the smae exception.

When I do not use the proxy settings, I can connect to the Webservice without any problems.

Can setting the above properties gurantee that my client is "Proxy aware"?
Is there a better way of doin it?
Why do I get that exception which I feel should not be related to the proxy settings in any way?

Your help in any form would be highly appreciated.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic