on-internet
← Community

Convert string to JAXBElement using Java

Stack Overflow ·

I'm having some issue while converting String object to JAXBElement string object where I need to set this one This is the target method where I need to set the value public void setData(JAXBElement<String> value) { this.data = ((JAXBElement<String> ) value); } For this one, I have written code something like this ObjectFactory factory = new ObjectFactory(); JAXBElement<ApplicationIngestionRequest> jaxbElement = new JAXBElement( new QName(ApplicationIngestionRequest.class.getSimpleName()), ApplicationIngestionRequest.class, request); StringWriter writer = new StringWriter(); JAXBContext contex

Comments

Sign in or sign up to comment and upvote.

No comments yet.