Hi Don,
I think you set the properties http.proxyUser and http.proxyPassword
using the same method.
System.setProperty("http.proxyUser", "your_proxy_server_username");
System.setProperty("http.proxyPassword", "your_proxy_server_password");
I dont have authentication here so i didnt try it!!
Brian.
Don Tam wrote:
Hi Brian,
Actually, I have one more question. My proxy server requires
authentication. How do I put that in?
Thanks,
Brian Shields wrote:
Hi Don,
I recently resolved an issue like this...my problem was with proxy
settings. Your client can probably access the service, but the
service is hanging when trying to connect to the remote stock quote
service! Try requesting the stock value for the company "XXX", it is
a test that doesnt require a remote service. If that works then you
have a proxy problem and need to est your proxy details using...
System.setProperty("http.proxyHost", "your_proxy_server");
System.setProperty("http.proxyPort", "your_proxy_port_number");
I just put this at the top of the getQuote method of my service and
worked fine after that!!
Brian.
Don Tam wrote:
Hi,
I've followed the instructions exactly. I've gone through the
Creating the Service part and it was successful, and I've also
created the client using the code provided (substituting of course
with my server and port). I know this is successful because I can
access the webservice directly through
http://server:port/axis/services/stock-wss-01 in my browser and axis
also lists it as one of its services.
Now, when I get to running the client with
java -cp $WSS4J_CP samples.stock.client.StockServiceClient IBM
All I get is a connection timeout:
Exception in thread "main" AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection timed out
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:deathstar
java.net.ConnectException: Connection timed out
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:713)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:798)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at
samples.stock.client.StockWss01SoapBindingStub.getQuote(StockWss01SoapBindingStub.java:106)
at
samples.stock.client.StockServiceClient.main(StockServiceClient.java:16)
What am I doing wrong? The server and port seems to be right in all
the java files generated from the WSDL2Java command.
Thanks,
--
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]