My client is sending an incorrect message (we are migrating from Weblogic10 to Tomee 8.0.15. The first one was more permissive with incorrect xml's acording with de wsdl), so I have been trying to avoid the error
Unmarshalling Error: element unexpeted (URI:"", local:"foo"). Expected elements are < ...
So I concluded that adding the following config in openjb-jar.xml (as appear here)
<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar>
<ejb-deployment ejb-name="MyService">
<properties>
cxf.jaxws.properties = MyServiceProperties
</properties>
</ejb-deployment>
And this resources.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<Service id="MyServiceProperties" class-name="java.util.Properties">
set-jaxb-validation-event-handler = false
schema-validation-enabled = false
</Service>
</resources>
or this annotation in the definition of my WebService class
@EndpointProperties({
@EndpointProperty(key = "set-jaxb-validation-event-handler", value = "false")
})
@WebService(name="MyService",targetNamespace="http://my.namespace/MyService" )
public class MyService {
...
}
should avoid the problem.
I'm deploying this services in Tomee 8.0.15, using JAX-WS and Apache CXF.
Any clue why this is not working? I expect that the error of unmarshalling not appear any more.