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 6745015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:09:12+00:00 2026-05-26T12:09:12+00:00

Part of my project involves heavy transformations of user-defined schema documents. I need to

  • 0

Part of my project involves heavy transformations of user-defined schema documents. I need to be able to change target namespaces, support type cross-references and build wsdl upon multiple schema documents.
One of the most commonly used operations is changing namespace prefix prior to importing schema into wsdl file. I’m using org.xml.sax.ContentHandler and it’s startPrefixMapping method to handle namespaces. All works fine and flawless unless I want to change element types.

Here is simple schema fragment

<schema xmlns="http://www.w3.org/2001/XMLSchema">
  <complexType name="Param">
    <sequence>
      <element name="key" type="string"/>
      <element name="value" type="string"/>
    </sequence>
  </complexType>
<!-- omitted -->

which must be placed inside wsdl as follows:

<definitions xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <types>
    <xs:schema>
      <xs:complexType name="Param">
        <xs:sequence>
          <xs:element name="key" type="xs:string"/> <!-- 'xs:' to be added -->
          <xs:element name="value" type="xs:string"/> <!-- 'xs:' to be added -->
        </xs:sequence>
      </xs:complexType>
<!-- omitted -->

The problem is that some schema’s attribute values (type in <element>, base in <extension>) are namespace-aware and are subject to change in the above example. As I can see, neither DOM, nor SAX parsers are able to handle this situation so I’m currently using ugly string operations to retrieve namespace info from particular attribute values.

Am I missing somethiing? Are there any api’s, libraries or other schema-specific tools to handle such sort of tasks?

  • 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. Editorial Team
    Editorial Team
    2026-05-26T12:09:12+00:00Added an answer on May 26, 2026 at 12:09 pm

    yes, this is a major bug in xml schema/wsdl. utilizing the xml namespace prefixes inside of attribute values was a giant mistake (since the prefix values themselves are not significant, only placeholders for the actual namespaces). unfortunately, i don’t know of any good solution to the problem (i’ve had to implement virtually the same sort of idea: merging multiple user defined schemas into one schema/wsdl). i do know that xerces has an xml schema model api, but i don’t know if it has support for merging together multiple schemas and generating the resulting output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As part of my project I need to use some Unamanged code dlls in
As part of a project I'm working on we have a requirement to support
Greetings! As part of Ruby learning, I am working on a project that involves
I need help with my latest asp.net project. It involves graphics. I need to
As part of a project I have assigned myself as a way of improving
For part of a project I'm working on I am implementing a RTPpacket where
This is the last part of this project, thanks to all who've helped with
I am a part of TFS project. We use Visual Studio 2005. It was
I ask this question in anticipation as part of a project. I have experience
I am working on an SWT project as part of a team. We are

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.