问题
This problem is driving me mad, because many similar solutions are suggested but no one fixes it.
Firstly, sending request from SoapUI goes fine. However in the insequence the same soap request shows this log:
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: /services/consultarProcedimientosPorPersonasInternoPR01.consultarProcedimientosPorPersonasInternoPR01HttpsSoap11Endpoint, WSAction: urn:cji:jjj:es:pc:servicios:consultarProcedimientosPorPersonas, SOAPAction: urn:cji:jjj:es:pc:servicios:consultarProcedimientosPorPersonas, MessageID: urn:uuid:dbe04861-efdf-412f-b0a0-b9f6c92c9fcb, Direction: request, Retorno = De vuelta y vuelta, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:consultarProcedimientosPorPersona xmlns:ns1="urn:cji:jjj:es:pc:servicios:datos:internos:1.0.0"><ns1:criteriosBusqueda><ns1:identificacionVictima><ns1:tipoDocumento>DNI</ns1:tipoDocumento><ns1:documentoIdentificacion>65545465</ns1:documentoIdentificacion></ns1:identificacionVictima><ns1:identificacionVictimario><ns1:documentoIdentificacion>-1</ns1:documentoIdentificacion></ns1:identificacionVictimario></ns1:criteriosBusqueda><ns1:sistemas><ns1:sistema>SIS</ns1:sistema></ns1:sistemas><ns1:datosGenericos><ns1:solicitante><ns1:identificadorSolicitante>11111111H</ns1:identificadorSolicitante><ns1:nombreSolicitante>M.</ns1:nombreSolicitante><ns1:unidadTramitadora>DG</ns1:unidadTramitadora><ns1:funcionario><ns1:documento>11111111H</ns1:documento><ns1:nombreCompleto>M. M. G.</ns1:nombreCompleto></ns1:funcionario><ns1:finalidad>Consultas desde el sistema PC</ns1:finalidad></ns1:solicitante></ns1:datosGenericos></ns1:consultarProcedimientosPorPersona></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "POST /WSSava HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "Content-Type: text/xml; charset=UTF-8[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "SOAPAction: "http://wssava.cj.es/webservice/consultarPersonas"[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "Host: 17.244.188.177[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "8ed[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-134b41c2-7d27-48ed-9745-dadad95eae48"><wsse:Username>userr</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">passss</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">FNECq4WoVjNMQwp5qr5Usg==</wsse:Nonce><wsu:Created>2018-08-31T11:05:03Z</wsu:Created></wsse:UsernameToken><wsu:Timestamp wsu:Id="TS-134b41c2-7d27-48ed-9745-dadad95eae48"><wsu:Created>2018-08-31T11:05:03Z</wsu:Created><wsu:Expires>2018-08-31T11:10:03Z</wsu:Expires></wsu:Timestamp></wsse:Security></soapenv:Header><soapenv:Body><wssava:consultarPersonas xmlns:wssava="http://wssava.cj.es/webservice" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cjii="urn:cji:jjj:es:pc:servicios:datos:internos:1.0.0">[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:filtrosPersonas>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:tipoDocumento>DNI</wssava:tipoDocumento>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:documento>65545465</wssava:documento>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " </wssava:filtrosPersonas>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:sistemas>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:sistema>PC</wssava:sistema>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " </wssava:sistemas>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:datosGenericos>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:solicitante>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:identificadorSolicitante>11111111H</wssava:identificadorSolicitante>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:nombreSolicitante>M.</wssava:nombreSolicitante>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:unidadTramitadora>DG</wssava:unidadTramitadora>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:funcionario>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:nifFuncionario>11111111H</wssava:nifFuncionario>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:nombreCompletoFuncionario>M. M. G.</wssava:nombreCompletoFuncionario>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " </wssava:funcionario>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " <wssava:finalidad>Consultas desde el sistema PC</wssava:finalidad>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " </wssava:solicitante>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << " </wssava:datosGenericos>[\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "</wssava:consultarPersonas></soapenv:Body></soapenv:Envelope>[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "0[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 << "[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "HTTP/1.1 200 OK[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "Server: Apache-Coyote/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Type: text/html;charset=UTF-8[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Length: 1166[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "Date: Fri, 31 Aug 2018 11:05:03 GMT[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><LINK type="text/css" rel="stylesheet" href="/WSSava/?stylesheet=1"><meta http-equiv=content-type content="text/html; charset=UTF-8"><title>CXF - Service list</title></head><body><span class="heading">Available SOAP services:</span><br/><table cellpadding="1" cellspacing="1" border="1" width="100%"><tr><td><span class="porttypename">ServicioConsultarExpedientesSavaPortType</span><ul><li>consultarProcedimientos</li><li>consultarPersonas</li></ul></td><td><span class="field">Endpoint address:</span> <span class="value">https://17.244.188.177/WSSava/WSSava</span><br/><span class="field">WSDL :</span> <a href="https://17.244.188.177/WSSava/WSSava?wsdl">{http://wssava.cj.es/webservice}ServicioConsultarExpedientesSava</a><br/><span class="field">Target namespace:</span> <span class="value">http://wssava.cj.es/webservice</span></td></tr></table><br/><br/><span class="heading">Available RESTful services:</span><br/><table cellpadding="1" cellspacing="1" border="1" width="100%"></table></body></html>" {org.apache.synapse.transport.http.wire}
ERROR {org.apache.synapse.transport.passthru.util.RelayUtils} - Error while building Passthrough stream {org.apache.synapse.transport.passthru.util.RelayUtils}
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:65)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:177)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:136)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:99)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:431)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:182)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:36)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 17 more
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:11f22290-0a4d-4b5f-89f0-169efa49a1dc, Direction: request, SecuenciaSISConsultarPersonas = Respuesta SIS recibida, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
WARN {org.apache.synapse.mediators.transform.XSLTMediator} - Found empty soap body, skipping XSLT transformation and continuing the mediation {org.apache.synapse.mediators.transform.XSLTMediator}
INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: http://www.w3.org/2005/08/addressing/anonymous,WSAction: ,SOAPAction: ,MessageID: urn:uuid:11f22290-0a4d-4b5f-89f0-169efa49a1dc,Direction: request,Respuesta = Respuesta SIS formada!!,Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
I've already tried add every message transformer and builder in axis2.xml, such as text/html, besides I've tried adding Content-type property to change it in the request, as the log shows:
DEBUG {org.apache.synapse.transport.http.wire} - HTTPS-Sender I/O dispatcher-1 >> "Content-Type:text/html
Curiously same sequence works in wso2 ESB 4.8.1. What on earth has changed in wso2 EI 6.1.1?
Any idea, any help will be welcome.
I leave here the ENDPOINT calling:
<header name="Action" scope="default" value="http://wss.jus.jj.es/webservice/consultarPersonas"/>
<!-- Mediador para el UsernameToken y su pass a la Header. -->
<class name="org.codigolibre.utmediator.UTMediator"/>
<log level="custom" separator=",">
<property name="SisavaConsultarPersonas_TSEQ.xml" value="Cargaddo UsernameToken y Password"/>
<property expression="$ctx:userNameToken" name="usuarioWSSava"/>
<property expression="$ctx:passwordToken" name="passwordWSSava"/>
</log>
<log description="Peticion a Servicio SIS" level="full">
<property name="SecuenciaSisavaConsultarPersonas" value="CALL Peticion a Servicio SIS"/>
</log>
<call>
<endpoint key="gov:/endpoints/WSSava.xml"/>
</call>
来源:https://stackoverflow.com/questions/52114823/wso2-ei-6-1-1-doctype-is-not-allowed