簡體   English   中英

允許未引用的肥皂動作JAX-WS

[英]Allow for unquoted soap action JAX-WS

如何放松對jax-ws Web服務的請求驗證的規則? 我需要能夠接收帶有未引用肥皂操作的請求並進行處理。 當前所有發生的事情是客戶端收到一個400錯誤,並且我收到警告(com.sun.xml.internal.ws.transport.http.HttpAdapter fixQuotesAroundSoapAction收到WS-I BP不合格Unquoted SoapAction HTTP標頭)

我對傳入的請求沒有任何控制權,不能強迫它們保持一致。

這是HTTP跟蹤。 如果相關,我可以發布wsdl。

POST /delivery HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.225)
Content-Type: text/xml; charset=utf-8
SOAPAction: http://schemas.cjse.gov.uk/endpoint/wsdl/submit
Host: localhost:8080
Content-Length: 11918
Expect: 100-continue
Connection: Keep-Alive

<?xml version="1.0" encoding="utf-8"?><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><NS2:SubmitRequestMes xmlns:NS2="http://schemas.cjse.gov.uk/endpoint/types/"><NS2:RequestID>leeflaxington_Z00CJSE_09251446338592</NS2:RequestID><NS2:SourceID>Z00CJSE</NS2:SourceID><NS2:DestinationID>00101PoliceCaseSystem</NS2:DestinationID><NS2:ExecMode>ASYNCH</NS2:ExecMode><NS2:Timestamp>2014-09-25T14:48:00.9375+01:00</NS2:Timestamp><NS2:Message>message data</NS2:Message></NS2:SubmitRequestMes></soap:Body></soap:Envelope>
HTTP/1.1 100 Continue
Content-Length: 0

HTTP/1.1 500 Internal Server Error
Date: Thu, 25 Sep 2014 14:03:37 GMT
Transfer-encoding: chunked
Content-type: text/xml; charset=utf-8

1ce
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope" xmlns=""><faultcode>S:Server</faultcode><faultstring>javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[100,496]
Message: XML document structures must start and end within the same entity.]</faultstring></S:Fault></S:Body></S:Envelope>
0

HTTP/1.1 400 Bad Request
Content-Length: 40
Content-Type: text/html

<h1>400 Bad Request</h1>Bad request line 

原來命令行錯誤是一個紅色鯡魚。 問題是帖子正文的內容長度不正確。 這導致無效的xml信封,因此顯示了soap錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM