I have list of String objects defined as List<String> and I want to split this List into sublist such that each sublist should be of length <=6 and number of chars in each sublist should not exceed 240 chars.
Any idea how to achieve this in java 8 ?
Special condition : If the total no. of chars in the sublist exceeds 240 chars then we have to decrease the no. of elements in the sublist such that it meets the length of 240 and shift the rest elements in next sublist and so on.
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"
'pdBranchCustomerNotification' is defined in the xsd PDNotification-20180914.xsd having targetNameSpace = "http://www.example.org/PDNotification" but unmarshaller is not taking it.
I am using jrocket 1.6 which has jaxb implementation vJAXB 2.1.10
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