0

I have such issue. I have web service

@WebService
@SOAPBinding(style = Style.RPC)
public interface ServerWebService {

@WebMethod
    WSResponse calculateValue(@WebParam(name = "WSRequest") WSRequest request) throws ServerFault, TfmRequestInputFault;
}

with POJO for request:

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class WSRequest implements Serializable {

    @XmlElement(required = true)
    private String promotionData;

    public String getPromotionData() {
        return promotionData;
    }

    public void setPromotionData(String promotionData) {
        this.promotionData = promotionData;
    }

}

Xml request is something like this:

<soapenv:Envelope>
   <soapenv:Body>
      <cal:calculateValue>
         <WSRequest>
            <promotionData>
                **<anotherXML>....</anotherXML>**
            </promotionData>
         </WSRequest>
      </cal:calculateValue>
   </soapenv:Body>
</soapenv:Envelope>

When the request come to web service, XML from is not saved to String field of my POJO. Tell me please what i'm doing wrong? This issue happens only with xml as field, when simple string comes as - everything works fine.

0 Answers0