Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Strip Out XML From SOAP to Validate

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic