cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ffrench <pffre...@micropower.com>
Subject Namespace Failure in WS-Discovery
Date Wed, 09 Dec 2015 04:31:52 GMT
Using the ONVIF Test utility (from www.onvif.org)  to generate WS-Discovery
probe messages to a slightly modified CXF smaples/ws_discovery test program
ended up in getting the following message from JAXBUtils.unmarshall() call
in WSDiscoveryServiceTmpl.java:
"javax.xml.bind.UnmarshalException: prefix dn is not bound to a namespace".

The modifications to the sample program were to define appropriate types and
scopes so that WS-Discovery service could work for implementing an ONVIF
Server.  

The probe message from the ONVIF Test Utility is:
<?xml version="1.0" encoding="utf-8"?><Envelope
xmlns:dn="http://www.onvif.org/ver10/network/wsdl"
xmlns="http://www.w3.org/2003/05/soap-envelope"><Header><wsa:MessageID
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:c62c79b3-21d4-49a2-972e-49e912549f4b</wsa:MessageID><wsa:To
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To><wsa:Action
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</wsa:Action></Header><Body><Probe
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/ws/2005/04/discovery"><Types>dn:NetworkVideoTransmitter</Types><Scopes
/></Probe></Body></Envelope>

And so "dn" is defined in the Envelope but it looks to be that only the Body
of the SOAP message is passed to the invoke routine in
WSDiscoveryServiceTemp.java.  Since "dn" is not defined as a namespace in
the Body of the message, the call to JAXBUtils.unmarshall() is failing. 

So, any recommendations on how to fix this since cannot change the ONVIF
test utility?

Currently thinking about adding an interceptor and copying any namespace
definitions in the Envelope into the body.  This is slightly messy and so
looking for a cleaner solution.  Any possibility of a simple change in
WSDiscoveryServiceTmpl.java to address this?




--
View this message in context: http://cxf.547215.n5.nabble.com/Namespace-Failure-in-WS-Discovery-tp5763732.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message