Thanks now I am able to unmarshall the xml (without doing schema validation), but when I am trying to validate the xml by creating the schema object from the InfoMessageBroker-v2016.xsd and setting it into the Unmarshaller object, it is giving me following error
My main method is as below
The error which I am getting while trying to unmarshal with schema validation.
I followed the steps but now I am getting this error when trying to generate the java pojos from the changed xsd "InfoMessageBroker-v2016.xsd"
parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'pdn:EventBodyType' to a(n) 'type definition' component.
line 18 of file:/C:/Users/dharkhu/eclipse/temp/myTest/TestJAXB/src/InfoMessageBroker-v2016.xsd
This is because EventBodyType is not defined inside "PDNotification-20180914.xsd"
I want to unmarshall the ml message using jaxb 2.1 implementation, InfoMessageBroker xsd has a complexType "EventBodyType" which contains the message body but it has generic declaration like below
The problem is how I can import PDNotification xsd in InfoMessageBroker xsd and change the EventBodyTag defination so that the xml message can be correctly unmarshall and gives me populated java object BranchCustomerNotificationType