Disculpen, había cometido un error
Necesitamos usar el mecanismo llamado "Attachment" para enviar el fichero como un adjunto en la petición SOAP; y no el mecanismo alternativo, conocido como "MTOM"
Hemos añadido las siguientes líneas en el Cliente Web:
Set file=##class(%Library.FileCharacterStream).%New()
Set file.Filename="application.zip"
while (fichero.AtEnd '= 0){
do file.Write($system.Encryption.Base64Decode(fichero.Read()))
}
Set mim
epart=##class(%Net.MIMEPart).%New()
Set mimepart.Body=file
Do mimepart.SetHeader("Content-Disposition", "attachment; name=""application.zip""")
do ..Attachments.Insert(mimepart)Siguiendo la documentación:
Using SOAP with Attachments: Web Client
¿Qué podría significar que el sistema destino nos devuelva un código http 511?
ERROR #6242: La solicitud HTTP a SOAP WebService ha devuelto un estado inesperado: 511.Parece que podría indicar lo siguiente:
"El código de estado de respuesta HTTP 511 Network Authentication Required indica que el cliente necesita autenticarse para obtener acceso a la red."
En estos casos, ¿qué se suele necesitar?
En el LOGSOAP veríamos:
10/15/2021 15:51:56 *********************
Output from Web client with SOAP action = http://ws.regvacuWs.ms.es/FicheroVacu/cargarFichero
----boundary1980.3529411764705881780.294117647058824--
Content-Type: text/xml; charset="UTF-8"
Content-Transfer-Encoding: 8bit
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema' xmlns:wsa='http://www.w3.org/2005/08/addressing'>
<SOAP-ENV:Header>
<wsa:Action>cargarFichero</wsa:Action>
<wsa:MessageID>7148b7422dc711eca7e1005056b672a4</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>https://regvacu-svc-pre.sns.gob.es/sssns/regvacu-bus-r01/PS/CCAA/Canarias/RegVacu_PS?wsdl</wsa:To>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<CargarFicheroVacuRequest xmlns="http://ws.regvacuWs.ms.es/regvacu/ws/FicheroVacuService">
<fichero>
<![CDATA[;;;47B7F6BF1C6D7174A920B3...;12010070;]]>
</fichero>
<ccaaId>01</ccaaId>
<tipoFichero>2</tipoFichero>
</CargarFicheroVacuRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
----boundary1980.3529411764705881780.294117647058824--
Content-Disposition: attachment; name="application.zip"
----boundary1980.3529411764705881780.294117647058824----
10/15/2021 15:51:56 *********************
Input to Web client with SOAP action = http://ws.regvacuWs.ms.es/FicheroVacu/cargarFichero
ERROR #6242: La solicitud HTTP a SOAP WebService ha devuelto un estado inesperado: 511.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<soapenv:Body/>
</soapenv:Envelope>**** SOAP client return error. method=cargarFichero, action=http://ws.regvacuWs.ms.es/FicheroVacu/cargarFichero
ERROR #6242: La solicitud HTTP a SOAP WebService ha devuelto un estado inesperado: 511.¿se implementaría una autenticación desde nuestra Operacion SOAP o Cliente Web, hacia el sistema destino?
¿qué recomiendan ustedes?
¿cómo continuaríamos? ¿cuáles son los siguientes pasos?
Gracias por leernos, y por su ayuda con las respuestas
- Inicie sesión para enviar comentarios
.png)
.png)
.png)
.png)
.png)
