File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strip Out XML From SOAP to Validate

 
Michael Craghead
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure out how to properly strip out the XML from a SOAP message so that I can validate it.

I guess I have a multi-part question. First, I've parsed the original SOAP message and have it represented as DOM Document because the examples I looked at did it that way, but based on some of the things that I've read about since I created my code it looks like SAX might be more efficient since I only need the XML from the SOAP message. Should I use DOM or SAX (at this point I really just want it to 'work')? Second, how do I strip the XML out of the SOAP so that I can validate it? I think I have the validation code. I just need to strip out the XML so that I'm only validating the XML.

I'm using AXIS2 if that makes a difference. Thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly what do you need to validate? If Axis does not throw an exception than the SOAP message is valid XML.

Are you working with somebody else's SOAP service or do you have control over the service too?

Bill
 
Michael Craghead
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:
Exactly what do you need to validate? If Axis does not throw an exception than the SOAP message is valid XML.

Are you working with somebody else's SOAP service or do you have control over the service too?

Bill


All of this web service stuff, and even Java to some extent, is new to me, so hopefully I can explain it without being confusing.

I'm actually working on validation as it relates to JMS messages in a test application. The test application allows users to simulate requests coming in from clients without needing them to come in from the out side. The application allows SOAP requests that are manually created to be placed on various queues that simulate coming in from clients. My intent is to allow the user to validate these requests since they are hand-made, but they include the SOAP part and not just the request message. I have a schemas that I'm validating against for a given request type.

Was that clear? I hope so, as I'm still learning so that's kind of the best that I can explain it. If not, let me know and I will try and clarify or find an answer.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic