Hi H�kan!

Have you created the stub using WSDL2Java?
Then maybe the problem is that in the WSDL-file there's something like:

<service name="XXX">
<port name="YYY" binding="ZZZ">
<soap:address location="http://localhost:8080/axis/services/HakansService"; />
</port>
</service>


By letting WSDL2Java create the stubs automatically, then of course the location in soap:address is used by default.
So if you call the service from another machine than the where Axis is running on, you must of course fail.


Remedy:
Explicitly set the location before service-invocation with something like the following:


java.net.URL portAddress;
portAddress = new java.net.URL(
   "http://serverAxisRunsOn:8080/axis/services/HakansService"; );
XXXLocator loc = new XXXLocator();
YYY myService = loc.getYYY(portAddress);


Did this help?


cheers,
Christoph



Ros�n H�kan wrote:

Hi,
I have deployed a axis-service in Tomcat and written a small java-client
that connects and calls methods in the service.
This works fine when I run the client on my local machine, but when I try to
run it from another machine the connection is refused,
have I missed something here ?

this is what I when running from a different machine
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.ConnectException: Connection refused: connect
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: java.net.ConnectException:
Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
.....


regards /H�kan






Reply via email to