Ich verwende SOAPUI Werkzeug JAX-WS Web Services in Weblogic Einsatz für den Zugriff auf 10.3.2So beheben Sie den Fehler des JAX_WS-Webdienstaufrufs "MustUnderstand-Header werden nicht verstanden"?
Anfrage:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.pc3.polk.com/"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsu:Timestamp wsu:Id="Timestamp-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-12-03T21:10:43Z</wsu:Created> <wsu:Expires>2010-12-03T21:44:03Z</wsu:Expires> </wsu:Timestamp> <wsu:Timestamp wsu:Id="Timestamp-60" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-12-03T20:10:39Z</wsu:Created> <wsu:Expires>2010-12-03T20:43:59Z</wsu:Expires> </wsu:Timestamp> <wsse:UsernameToken wsu:Id="UsernameToken-59" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>rwerqre</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ewrqwrwerqer</wsse:Password> <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Nmw0ksmiOX+hkiSoWb2Rjg==</wsse:Nonce> <wsu:Created>2010-12-03T20:10:39.649Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ws:getMetadata/> </soapenv:Body> </soapenv:Envelope>
Antwort:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>SOAP-ENV:MustUnderstand</faultcode>
<faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring>
</SOAP-ENV:Fault>
</S:Body>
</S:Envelope>
Ich würde gerne mehr Details sehen auf „konfigurieren, um einen Dummy-SOAPHandler für {http://docs.oasis-open.org/wss/2004/01/oasis-200401 -wss-wssecurity-secext-1.0.xsd} Sicherheit, die diesen Header als "verstanden" kennzeichnen würde. " – Jono
Ich würde auch gerne einen solchen Dummy SOAP Handler sehen – Frizz
Implementieren Sie einfach einen [SOAPHandler] (http://docs.oracle.com/javaee/5/api/javax/xml/ws/handler/soap/SOAPHandler.html), die '{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd} Security' von 'getHeaders()' zurückgibt, aber deren 'handle. . 'Methoden tun nichts (zurück wahr). Das ist es. – rustyx