Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Validation and capturing response

 
Minni Rose
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am having 2 types of messages 1) Request and 2) Response.
.
I need to write a dummy application inorder to accpte the XML and validate the contents of both Request and Response.I have constructed a Response.xml which is of generic type and also an input file passing the requeste message details. I need to validate the input.xml and capture the response.

Can any one suggest me a route hou to go ahead.

Thanks in Advance!!

 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By validate, do you mean well formed? Or do you mean against a defined XSD or DTD?
 
Minni Rose
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your quick response.

not in both formats infact.
let's say for a field ex:login field , they might send a response or they might send some code so we need to validate that.

We can get the output with the help https or anything else but we need to validate the data like we will send the expected response data and compare to the actual data.
 
Minni Rose
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My generic response xml will be in this form:

<response>
<command type="@@entityType@@" name="@@eventName@@">
<entityresponse>
<faultcode></faultcode>
<faultstring></faultstring>
</entityresponse>
<entitydata entitytype="">
<datafield datatype="">
<name></name>
<value></value>
</datafield>
</command>
</response>


and Input.xml is:

<header>
<authinfo>
<username></username>
<password>s0n*l1Nk!</password>
</authinfo>
</header>
<body>
<request>
---some values ---
</request>
<response>
---some values ---

</response>
</request>
</body>
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Minni

I think you need to provide a simple example to make it clear what you are trying to achieve. Remember to use the appropriate tags when you do.
 
Minni Rose
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,

Infact I didnt develop anything as of now need some guidance in gng ahead. I need to validate some data passed thru xml and chk whether the contents in response are proper or not for the values passed.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic