Hi! I'm trying to access a gSOAP server (2.7.10) running on http://localhost:8081 using axis2-1.4. The Client-Stub, generated by wsdl2java, insists on connection to localhost:80, regardless of which targetEndpoint I'm passing to the constructor.
The WSDL I'm using was generated by gSOAP. The (imho) relevant sections are: [...] <definitions name="dss" targetNamespace="http://localhost:8080/dss.wsdl" xmlns:tns="http://localhost:8080/dss.wsdl" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dss="urn:dss:1.0" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/" xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> [...] <service name="dss"> <documentation>gSOAP 2.7.10 generated service definition</documentation> <port name="dss" binding="tns:dss"> <SOAP:address location="http://localhost:8081/"/> </port> </service> </definitions> Which, in my understanding, will point the client to http://localhost:8081/. Turning on logging in the HTTPClient showed that It's trying to connect to the port 80: 2008/07/24 12:46:38:066 CEST [DEBUG] MultiThreadedHttpConnectionManager - HttpConnectionManager.getConnection: config = HostConfiguration[host=http://localhost:8081, proxyHost=http://], timeout = 0 2008/07/24 12:46:38:068 CEST [DEBUG] MultiThreadedHttpConnectionManager - Allocating new connection, hostConfig=HostConfiguration[host=http://localhost:8081, proxyHost=http://] 2008/07/24 12:46:38:075 CEST [DEBUG] HttpConnection - Open connection to :80 2008/07/24 12:46:38:124 CEST [DEBUG] HttpMethodDirector - Closing the connection. 2008/07/24 12:46:38:126 CEST [INFO] HttpMethodDirector - I/O exception (java.net.ConnectException) caught when processing request: Connection refused Using netcat to listen on port 80 showed that axis is indeed accessing localhost:80: overlord patrick # nc -l -p 80 POST http://localhost:8081/ HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: "" User-Agent: Axis2 Host: localhost:8081 Proxy-Connection: Keep-Alive Transfer-Encoding: chunked 115 <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns2:Authenticate xmlns:ns2="urn:dss:1.0"><userName>admin</userName><password>nothing</password></ns2:Authenticate></soapenv:Body></soapenv:Envelope> 0 The POST line looked suspicious to me so I've changed the creation of the stub to: stub = new DssStub("http://wontresolve:1234/"); which resulted in the following post request: POST http://wontresolve:1234/ HTTP/1.1 [...] So, targetEndpoint is apparently != server URI. Where does axis get the server URI from? Any pointers? (RTFM links most welcome ;-) Thanks in advance! Patrick -- futureLAB AG tel: +41 (0)52 260 22 22 Schwalmenackerstr. 4 fax: +41 (0)52 260 22 23 CH-8400 Winterthur e-mail: [EMAIL PROTECTED] Switzerland mission: delivering tomorrow's applications today --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
