Khuzema Dharwala

Ranch Hand
+ Follow
since Apr 26, 2010
Khuzema likes ...
Java Linux Tomcat Server
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Khuzema Dharwala

Hi Tsuji,

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.





Thanks tsuji,

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"
Hi Stephan

'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
Hi Rob,

Now I am getting following error when I am trying to unmarshal the xml

Not sure why it is looking for pdBranchCustomerNotification in namespace "http://www.db.com/2016/InfoMessageBroker/Types"


PDNotification-20180914.xsd is

InfoMessageBroker-v2016.xsd is

Hi All,

Following are the two xsds and an xml message I have

InfoMessageBroker-v2016.xsd
PDNotification-20180914.xsd
BranchCustomerNotifcation.xml

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






The xml message is


Attaching the second xsd file

PDNotification-20180914.xsd

2 months ago
Attaching the first xsd file

InfoMessageBroker-v2016.xsd

2 months ago
Hello All,

I am facing issue while unmarshalling the xml file using below code




Getting following error while running the code




The xml file is

2 months ago
This is the xsd files

PDNotification-20180914.xsd

2 months ago
Hi All,

I am facing issue while unmarshalling an xml to create the corresponding java object




On running the above program, I am getting below error

2 months ago
Hi All,


Lets say I have a class A which depends on class B

and similarly class B depends on class A


I want to create bean of class A and class B in Spring, can anyone tell how to do this because both classes are interdependent on each other ?

Regards,
Khuzema
1 year ago