java - How to rename the element of SOAP respond in CXF? -


I use CXF for web services, and I want to rename return element. node type Jxb class is generated from the xsd schema, how can any idea change it?

I have:

  & lt; Soaps: Envelope xmlns: Soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; Soaps: Body & gt; & Lt; GetNodesRespond & gt; & Lt; Return & gt; & Lt; IdNode & gt; 1 & lt; / IdNode & gt; ... & lt; / Return & gt; ... & lt; / GetNodesRespond & gt; & Lt; / Soap: Body & gt; & Lt; / Soap: Envelope & gt;   

I want to:

  & lt; Soap: Envelope xmlns: Soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; Soaps: Body & gt; & Lt; GetNodesRespond & gt; & Lt; Node & gt; & Lt; IdNode & gt; 1 & lt; / idNode & gt; ... & lt; / Node & gt; ... & lt; / GetNodesRespond & gt; & Lt; / Soap: Body & gt; & Lt; / Soap: Envelope & gt;    

Apply XML element annotations in the interface to the method. @XmlElement (name = "node")

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -