Java SOAP through HTTP firewall?

R

Robert M. Gary

Is it true that there is no way to push a SOAP message from behind a
firewall because java's SOAP implementation does not allow the use of
proxys? The SOAPConnction object only allows a URL to be given (not a
URLConnection that supports proxys).

You must do...
URL endpoint = new
URL("http://soapclient.com/xml/SQLDataSoap.WSDL");
SOAPMessage response = connection.call(message, endpoint);

but really want to be able to do...

URL endpoint = new
URL("http://soapclient.com/xml/SQLDataSoap.WSDL");
URLConnection conn = endpoint.openConnection(proxy);
//Send the message
SOAPMessage response = connection.call(message, conn );



-Robert
 
R

Robert M. Gary

BTW: I'm already setting...
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "http://foo.com");
System.getProperties().put("proxyPort", 8088);
System.getProperties().put("socksProxyHost",
"http://foo.com");
System.getProperties().put("http.proxyHost",
"http://http://foo.com");
System.getProperties().put("http.proxyPort", 8088);

System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", "http://foo.com");
//System.setProperty( "http.proxyPort", "8088");
System.setProperty("http.proxyUser", "joe");
System.setProperty("http.proxyPassword", "trust");

System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "http://foo.com");
//System.setProperty("http.proxyPort", 8088);
System.setProperty("http.proxyUser", "joe");
System.setProperty("http.proxyPassword", "trust");
 
R

Roedy Green

The SOAPConnction object only allows a URL to be given (not a
URLConnection that supports proxys).

how did you learn that? I was under the impression that SOAP
piggybacked on HTTP and as such would not be meddling in such affairs.
 
R

Rogan Dawes

Robert said:
BTW: I'm already setting...
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "http://foo.com");
System.getProperties().put("proxyPort", 8088);
System.getProperties().put("socksProxyHost",
"http://foo.com");
System.getProperties().put("http.proxyHost",
"http://http://foo.com");
System.getProperties().put("http.proxyPort", 8088);

System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", "http://foo.com");
//System.setProperty( "http.proxyPort", "8088");
System.setProperty("http.proxyUser", "joe");
System.setProperty("http.proxyPassword", "trust");

System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "http://foo.com");
//System.setProperty("http.proxyPort", 8088);
System.setProperty("http.proxyUser", "joe");
System.setProperty("http.proxyPassword", "trust");

And therein lies your problems:

Does "http://foo.com" look like a hostname?

Rogan
 
R

Robert M. Gary

I made it up because I didn't want you to know the name of my actual
proxy host. Should I also publish my user and password? Would that be
helpful?

-Robert
 
L

Luc The Perverse

Robert M. Gary said:
I made it up because I didn't want you to know the name of my actual
proxy host. Should I also publish my user and password? Would that be
helpful?

Being a smart ass is an excellent way to get experts to assist you.

Bravo!

Perhaps a more appropriate reaction would have been the realization that you
need to explain if you are going to change the code before asking others to
review it.
 
R

Rogan Dawes

I said:
And therein lies your problems:

Does "http://foo.com" look like a hostname?

Rogan

I made it up because I didn't want you to know the name of my actual
proxy host. Should I also publish my user and password? Would that be
helpful?

-Robert

My point was, you entered an URL, not a hostname. I don't care what the
name of your host was, just that what you entered could not possibly be one.

To spell it out to you in words of one syllable (oops - 3 right there!),
you should have done:

System.getProperties().put("proxyHost", "foo.com");

Rogan
 
R

Roedy Green

hould I also publish my user and password? Would that be

Possibly, but you would set up a dummy account with just enough power
to let others help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top