Hi Raymond,
How can I specify the "contextPath" or "classes" when using JAXB data
binding in binding.ws? Without them NPE was thrown from the code below since
JAXBContext does not allow pass null to newInstance():
String contextPath = (String) bindingContext.getMetadata(JAXB_CONTEXT_PATH);
JAXBContext context = null;
if (contextPath != null)
context = JAXBContext.newInstance(contextPath);
else {
Class[] classes = (Class[]) bindingContext.getMetadata(JAXB_CLASSES);
context = JAXBContext.newInstance(classes);
}
In your test code, I saw you used this:
targetDataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH,
contextPath);
But how can I configure it when using binding.ws? Or you can do automatic
detection?
Thanks!
Li
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]