Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:04:38+00:00 2026-05-11T01:04:38+00:00

Among the data my application sends to a third-party SOA server are complex XMLs.

  • 0

Among the data my application sends to a third-party SOA server are complex XMLs. The server owner does provide the XML schemas (.xsd) and, since the server rejects invalid XMLs with a meaningless message, I need to validate them locally before sending.

I could use a stand-alone XML schema validator but they are slow, mainly because of the time required to parse the schema files. So I wrote my own schema validator (in Java, if that matters) in the form of an HTTP Server which caches the already parsed schemas.

The problem is: many things can go wrong in the course of the validation process. Other than unexpected exceptions and successful validation:

  • the server may not find the schema file specified
  • the file specified may not be a valid schema file
  • the XML is invalid against the schema file

Since it’s an HTTP Server I’d like to provide the client with meaningful status codes. Should the server answer with a 400 error (Bad request) for all the above cases? Or they have nothing to do with HTTP and it should answer 200 with a message in the body? Any other suggestion?

Update: the main application is written in Ruby, which doesn’t have a good xml schema validation library, so a separate validation server is not over-engineering.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:04:38+00:00Added an answer on May 11, 2026 at 1:04 am

    It’s a perfectly valid thinking to map error situations in the validation process to meaningful HTTP status codes.

    I suppose you send the XML file to your validation server as a POST content using the URI to determine a specific schema for validation.

    So here are some suggestions for error mappings:

    • 200: XML content is valid
    • 400: XML content was not well-formed, header were inconsistent, request did not match RFC 2616 syntax
    • 401: schema was not found in cache and server needs credentials to use for authentication against the 3rd party SOA backend in order to obtain the schema file
    • 404: Schema file not found
    • 409: the XML content was invalid against the specified schema
    • 412: Specified file was not a valid XMl schema
    • 500: any unexpected exception in your validation server (NullPointerExceptions et al.)
    • 502: the schema was not found in cache and the attempt to request it from the 3rd party SOA server failed.
    • 503: validation server is restarting
    • 504: see 502 with reason=timeout
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 67k
  • Answers 68k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Use returnvalue instead of return [returnvalue: MarshalAs(UnmanagedType::IUknown)] The full list… May 11, 2026 at 12:04 pm
  • added an answer I would encapsulate the whole thing as follows: #include 'stdlib.h'… May 11, 2026 at 12:04 pm
  • added an answer Try/finally is the closest that you will get toe a… May 11, 2026 at 12:04 pm

Related Questions

Among the data my application sends to a third-party SOA server are complex XMLs.
Encoding issues are among the one topic that have bitten me most often during
GNU gcc 4.3 partially supports the upcoming c++0x standard: among the implemented features the
MS's entity framework is considered among developers in the agile community to inhibit test
PHP (among others) will execute the deepest function first, working its way out. For
What are the main differences among them? And in which typical scenarios is it
The server I'm trying to maintain is sassing me. Among other things, I ran
I'm using the jQuery.Validation plugin for client side validation, and among other things I
I am in the process of writing an application which, among other functionality, generates
I am working on converting a CVS repository that has the following symbols (among

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.