com.webratio.rtx.RTXException: An error occurred dispatching the SOAP message

11 May '15, 05:38 PM
9,975 Views
No Forum Badges

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

 
x 0
Follow
Answer Answer at this question and get points!
No Forum Badges

Salve Luca,

la porta che utilizzi per il tuo servizio probabilmente è bloccata dal tuo firewall ovvero stai puntando ad una url del servizio sbagliata.

Spero di esserti stato di aiuto

saluti

Renato

 

 
x 0
No Forum Badges

La porta sulla quale espongo il WS e' la 8080 ed infatti se utilizzo SOAP UI non ho problemi. La macchina utilizzata non ha alcun fw attivo. Deve esserci qualcosa che mi sfugge! Grazie Luca

 
x 0
No Forum Badges

Scoperto l'inghippo... nel WSDL è scritto:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.webml.org/webservices/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.webml.org/webservices/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:nsx1="urn:slp1" xmlns:nsx2="urn:rsp1">
  <wsdl:types>
    <xsd:schema><xsd:import namespace="urn:slp1" schemaLocation="../../xsd.do?res=slp1"/><xsd:import namespace="urn:rsp1" schemaLocation="../../xsd.do?res=rsp1"/></xsd:schema>
  </wsdl:types>
  <wsdl:message name="CriterioRicercaResponse">
    <wsdl:part name="ProvinciaITA" type="nsx2:ProvinciaITA">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="RicercaProvincia">
    <wsdl:part name="CriterioRicerca" type="nsx1:CriterioRicerca">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="CercaProvinciaType">
    <wsdl:operation name="RicercaProvincia">
      <wsdl:input message="tns:RicercaProvincia">
    </wsdl:input>
      <wsdl:output message="tns:CriterioRicercaResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="CercaProvincia" type="tns:CercaProvinciaType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="RicercaProvincia">
      <soap:operation soapAction=""/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="CercaProvincia">
    <wsdl:port name="CercaProvincia_Port" binding="tns:CercaProvincia">
      <soap:address location="http://127.0.0.1/ExposeWS_SOAP/WebService/CercaProvincia.do"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

http://127.0.0.1/ExposeWS_SOAP/WebService/CercaProvincia.do

ma poi io eseguo il deploy sulla 8080 di tomcat. 

Con SOAP UI dirigo correttamente la richiesta vs. quella porta. Dal processo WebRatio di Request/Response utilizzando il WSDL la richiesta finisce sulla 80!

 

Come posso creare un WS ed assegnare la porta che voglio io? 

Insomma, il WSDL dovrebbe presentarsi 

<soap:address location="http://127.0.0.1:xxxx/ExposeWS_SOAP/WebService/CercaProvincia.do"/>

 

 

 
x 0
Answer at this question and get points!

Related questions

Access wsdl in https Can not get generate and run option for DataService Project Cannot invoke method selectSingleNode() on null object Can't generate and run database or start tomcat server! CelsiusToFahrenheit Example Could not create service Custom Unit and AJAX / SOAP Description: Unknown tag 'wr:LinkResource' Exception REST Post request Exposing SOAP Web SERVICE on port different from 80 Generation options problem Getting started with Web Services How can I invoke a Rest Web Service having dynamic parameters? How to change smtp port invoking a webservice using REST java.lang.NullPointerException No cloud accounts available No database on my cloud account Parameters order in a webservice request Problema generando la logica de un proyecto Problemas al invocar webservice Properties of the XSD Resource (File) Publish a web service publish web service for storing information in PostgreSQL DB following XSD Resource Sync DataService Project with Mobile Project usuarios y grupos WebRatio and MySQL WebRatio Mobile Platform Community edition - Restful request WebService DateTime value is not parsed to Date. Web service provider newline problem web service request using XSD Web service - Synchronize XSD When stars web ratio between dofollow and nofollow backlink has affected? When using web services, what kind authentication is used? which of these three models is closer to webratio/ifml way of creating web applications XML Out Unit and Soap Request Response Unit XML Schema Definition Support XML Schema Definition Support