【问题标题】:Allow for unquoted soap action JAX-WS允许未引用的肥皂动作 JAX-WS
【发布时间】:2014-09-29 21:18:51
【问题描述】:

如何放宽 jax-ws Web 服务的请求验证规则?我需要能够接收带有未引用的肥皂动作的请求并处理它们。目前所发生的只是客户端收到 400 错误,我收到警告(com.sun.xml.internal.ws.transport.http.HttpAdapter fixQuotesAroundSoapAction Received WS-I BP non-conformant Unquoted SoapAction HTTP header)

我对传入的请求没有任何控制权,也不能强制它们符合要求。

这是 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 

【问题讨论】:

  • 错误消息显示:javax.xml.stream.XMLStreamException: ParseError at [row,col]:[100,496] 消息:XML 文档结构必须在同一实体内开始和结束,而不是警告您在您的帖子中提及。

标签: java web-services soap jax-ws


【解决方案1】:

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

【讨论】:

  • 你救了我的命,真的。我已经收到同样的错误将近两个星期了,直到几分钟前才终于注意到这是数据问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-11-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多