Buonasera
Ho sviluppato un WS (seguendo quanto indicato in "exposing SOAP Web Services") e l'ho testato utilizzando SOAP UI. Il WS risponde correttamente:
Richiesta:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://www.webml.org/webservices/wsdl">
<soapenv:Header/>
<soapenv:Body>
<wsdl:RicercaProvincia>
<CriterioRicerca>
<Sigla>vc</Sigla>
</CriterioRicerca>
</wsdl:RicercaProvincia>
</soapenv:Body>
</soapenv:Envelope>
Risposta:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP:Body>
<m:CriterioRicercaResponse xmlns:m="http://www.webml.org/webservices/wsdl">
<ProvinciaITA>
<Dettaglio>
<codice_provincia>002</codice_provincia>
<provincia>Vercelli</provincia>
<citta_metropolitana>-</citta_metropolitana>
<nome_citta_metropolitana/>
<sigla_automobilistica>VC</sigla_automobilistica>
<codice_regione>1</codice_regione>
</Dettaglio>
</ProvinciaITA>
</m:CriterioRicercaResponse>
</SOAP:Body>
</SOAP:Envelope>
Il WS l'ho esposto alla porta 8080.
Ho poi seguito le indicazioni di "Invoking SOAP Web Service" ed ho realizzato un funzionalità con la quale invoco il WS (dando come input la targa automobilistica). e l'ho esposta alla porta 9080 (un secondo tomcat).
Ad ogni esecuzione ottengo il seguente errore:
11 May 2015 17:32:50,269 ERROR [http-apr-9080-exec-5] (com.webratio.units.ws.rtx.SoapRequestResponseUnitService:73) - [2A8D938DE37426BFF46CCB06DFE7A468][miu2][opm1][rru2]Unable to execute service
com.webratio.rtx.RTXException: An error occurred dispatching the SOAP message
at com.webratio.rtx.ws.SoapMessageDispatcher.dispatch(SoapMessageDispatcher.java:223)
at com.webratio.units.ws.rtx.AbstractRequestResponseUnitService.execute(AbstractRequestResponseUnitService.java:172)
at com.webratio.rtx.core.OperationModuleService._execute(OperationModuleService.java:209)
at com.webratio.rtx.core.OperationModuleService.execute(OperationModuleService.java:133)
at
...
...
...
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:280)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.webratio.rtx.ws.SoapMessageDispatcher.dispatch(SoapMessageDispatcher.java:183)
... 67 more
Ho fanne numerose prove... ma non capisco il motivo dell'errore.
Avete qualche suggerimento in merito?
Grazie
Luca Massimi