I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namesp
Was facing this issue, Solved by adding package-info in my package
and the following code in it:
@XmlSchema(
namespace = "http://www.w3schools.com/xml/",
elementFormDefault = XmlNsForm.QUALIFIED,
xmlns = {
@XmlNs(prefix="", namespaceURI="http://www.w3schools.com/xml/")
}
)
package com.gateway.ws.outbound.bean;
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;