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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -