允许不带引号的soap动作JAX-WS

时间:2014-09-25 14:46:18

标签: java web-services soap jax-ws

如何放宽jax-ws Web服务请求验证的规则?我需要能够接收带有不带引号的soap操作的请求并处理它们。目前所发生的一切都是客户端收到400错误而且我收到警告(com.sun.xml.internal.ws.transport.http.HttpAdapter fixQuotesAroundSoapAction收到WS-I BP不符合要求的不带引号的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 

1 个答案:

答案 0 :(得分:1)

原来,命令行错误是一个红色的鲱鱼。问题是帖子的内容长度不正确。这导致无效的xml信封,从而显示出肥皂错误。