> On Aug 7, 2018, at 10:08 AM, [email protected] wrote: > we are facing an issue where our web services requests are getting "Fault > error" response because of additional unused namespaces were sent the request. > > Can anyone know how we can make cxf ignore to add the unused namespaces into > request ?
This isn’t really CXF doing this, it’s JAXB. JAXB doesn’t walk the entire object tree to determine which namespaces it needs for that marshal, it just writes out all the namespaces and then uses those while marshaling. I BELIEVE (not 100% positive) that if you generate the code without the package annotations, then jaxb won’t output the namespaces until needed. For wsdl2java that would be adding the -xjc-npa flag. However, the size of the messages may go up if it needs to output the same namespace multiple times. -- Daniel Kulp [email protected] <mailto:[email protected]> - http://dankulp.com/blog <http://dankulp.com/blog> Talend Community Coder - http://talend.com <http://coders.talend.com/>
