1

I´m making a request. I should return a String.

My Answer should be:

    <GETSOMETHING>
      <result>
         1
      </result>
   </GETSOMETHING>

My atually answer is this:

<GETSOMETHING>
<Nothing here>
  <result>
     1
  </result>
</Nothing here>
</GETSOMETHING>

My Wrapper class:

@XmlRootElement(name="Nothing here")
public class Result_Response_WRAPPER_XML_Object implements Serializable {

    private String fields = "";

    public Result_Response_WRAPPER_XML_Object () {
    }


    @XmlElement(name="result")
    public String getFields() {
        return fields;
    }


    public void setFields(String fields) {
        this.fields = fields;
    }

}

My Web Service is this:

//Web Method should return a String.

@WebMethod(operationName = "get_result")
    @Produces(MediaType.APPLICATION_XML)
    public void get_result(@WebParam(name = "requests") RequestObject obj,
            @WebParam(name = "GETSOMETHING", mode = WebParam.Mode.OUT) Holder<String> response,
             {

            //Call my string from class Operation
            String result= operation.getResult(obj);

How to get rid off tag?

Goldbones
  • 1,407
  • 3
  • 21
  • 55

0 Answers0