[英]Springws and MTOM client KO when pass through a balancer
I have a problem with a client that sends a pdf binary document with MTOM enabled to a soapservice.我有一个客户端问题,该客户端将启用了 MTOM 的 pdf 二进制文档发送到soapservice。 The service is correctly exposed and served.
服务被正确暴露和服务。 When i call the endpoint of the server that expose the service all goes ok, when i call the same service through a "service gateway" it sends back a "bad request" after it receive all the request.
当我调用暴露服务的服务器端点时一切正常,当我通过“服务网关”调用同一个服务时,它在收到所有请求后发回“错误请求”。
>Accept-Encoding: gzip
>Content-Type: multipart/related;type="application/xop+xml";start-info="text/xml"
>Content-Disposition: attachment
>Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>SOAPAction: "http://ws.documents...."
>Content-Type: Multipart/Related; boundary="----=_Part_1_1067527082.1584978884916"; >type="application/xop+xml"; start-info="text/xml"
>Cache-Control: no-cache
>Pragma: no-cache
>User-Agent: Java/1.8.0_222
>Host: service.xx.yy:8080
>Connection: keep-alive
>Content-Length: 105614
....
> This is the trace of the service gateway:
> v^[¹‹‘HTTP/1.1 400 [ISC.0064.9101] Bad Request Connection: close
> Content-Length: 0
The same service gateway is a passthrough of all other services without mtom and all goes ok.相同的服务网关是没有 mtom 的所有其他服务的直通,一切顺利。 The weird thing is that when i call with soapui with attachment and MTOM enabled through the service gateway the call ends correctly.
奇怪的是,当我使用通过服务网关启用附件和 MTOM 的soapui 呼叫时,呼叫正确结束。 This is the core of the code:
这是代码的核心:
response = (JAXBElement<CreateDocumentsResponseType>) wst.marshalSendAndReceive(uri,request);
Before send the message, i made an interceptor to set the request header with custom authentication.在发送消息之前,我做了一个拦截器来设置带有自定义身份验证的请求标头。
The balancer made a "preflight" that the webservicetemplate don't treat correctly.平衡器进行了 webservicetemplate 未正确处理的“预检”。 Created custom interceptor to handle this.
创建自定义拦截器来处理这个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.