[java] How do I instantiate a JAXBElement<String> object?

I need to create one of these as the interface requires it. Can someone please let me know how to create one, as there doesn't seem to be a c'tor defined?

This question is related to java jaxb

The answer is

When you imported the WSDL, you should have an ObjectFactory class which should have bunch of methods for creating various input parameters.

ObjectFactory factory = new ObjectFactory();
JAXBElement<String> createMessageDescription = factory.createMessageDescription("description");

Similar questions with java tag:

Similar questions with jaxb tag: