我有一个本地环境和一个生产环境。在本地环境中,SOAP请求(来自SoapUI)可以很好地工作。但是,当我将其指向生产环境时,它会因以下错误而失败:
ServletRequestHandledEvent: url=[...]; client=[...]; method=[POST];
servlet=[vmonline]; session=[null]; user=[null]; time=[2ms];
status=[failed: org.jboss.ws.core.CommonSOAPFaultException: org.xml.sax.SAXParseException:
The markup in the document preceding the root element must be well-formed.]
因为SOAP请求在本地环境中工作,但在生产中失败,所以我非常有信心请求没有格式错误。我所知道的唯一区别是生产的端点在https之后,而本地设置的设置在http上。这是请求
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:vmo="...">
<soap:Header>
<wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1014" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>...</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">...</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>
<soapenv:Body>
<CheckStatusRequest>
<Voucher>
<ActivationCode>820551399636</ActivationCode>
</Voucher>
</CheckStatusRequest>
</soapenv:Body>
</soapenv:Envelope>
我无法弄清楚可能是什么问题。任何帮助将不胜感激。
编辑:我通过curl尝试了相同的请求,并且它有效... curl和SoapUI执行请求之间有什么区别