The web service is invoked, an return an ELEMENT type, the I have a SOAP Exception. I'm using the new Snapshot version.
This is the EndPoint code. I introduce a try--catch just before the return code... as you can see the Exception goes after the return code...Code:2006-07-06 11:28:44,129 INFO [STDOUT] 2006-07-06 11:28:44,129 INFO [xxx.controlservidores.ws.ReceptorFtpEndPoint] - Devolvemos como resultado OK 2006-07-06 11:28:44,145 INFO [STDOUT] 2006-07-06 11:28:44,145 DEBUG [org.springframework.ws.soap.SoapMessageDispatcher] - Testing endpoint exception resolver [org.springframework.ws.soap.endpoint.SimpleSoapExceptionResolver@131ebb3] 2006-07-06 11:28:44,160 INFO [STDOUT] 2006-07-06 11:28:44,160 WARN [org.springframework.ws.soap.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with SOAP Fault java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547)
Thanks in advance...Code:protected Element invokeInternal(Element requestElement, Document document) throws Exception { logger.info("invokeInternal. " + requestElement.getNamespaceURI() + " - " + requestElement.getLocalName()); Assert.isTrue(NAMESPACE_URI.equals(requestElement.getNamespaceURI()), "Invalid namespace"); Assert.isTrue(ECHO_REQUEST_LOCAL_NAME.equals(requestElement.getLocalName()), "Invalid local name"); NodeList children = requestElement.getChildNodes(); Text requestText = null; for (int i = 0; i < children.getLength(); i++) { if (children.item(i).getNodeType() == Node.TEXT_NODE) { requestText = (Text) children.item(i); break; } } if (requestText == null) { throw new IllegalArgumentException("Could not find request text node"); } try { String servidor = requestText.getNodeValue(); logger.info("Se invocó el servicio con valor " + servidor); String resultado = receptorFtpService.setAlive(servidor); Element responseElement = document.createElementNS(NAMESPACE_URI, ECHO_RESPONSE_LOCAL_NAME); Text responseText = document.createTextNode(resultado); responseElement.appendChild(responseText); logger.info("Devolvemos como resultado " + resultado); return responseElement; } catch (Exception e) { logger.fatal(e.getMessage()); return null; }


Reply With Quote