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

  • SEARCH
  • Home
  • 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 7662695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:52:00+00:00 2026-05-31T13:52:00+00:00

I’m developing a web-service in some kind of contract-first terms – firstly, I create

  • 0

I’m developing a web-service in some kind of contract-first terms – firstly, I create xsd schemes, secondly, generate classes with JAXB upon them, and then, I want to attach these schemes to WSDL. Here is my applicationContext,xml:

<jaxws:endpoint id="webService" 
                implementor="#wsImplementer" 
                address="/service">

   <jaxws:schemaLocations>
       <jaxws:schemaLocation>classpath:/xsd/RequestWrapper.xsd</jaxws:schemaLocation>
    </jaxws:schemaLocations>

</jaxws:endpoint>

The problem is: the RequestWrapper.xsd contains <xs:include schemaLocation="ComplexTypes.xsd"/> and the
ComplexTypes.xsd contains <xs:include schemaLocation="SimpleTypes.xsd"/>. So, when CXF generates the WSDL, it contains the RequestWrapper.xsd scheme with such an include http://service/path?xsd=ComplexTypes.xsd which is ok, but if you walk to this link you’ll see ComplexTypes.xsd with <xs:include schemaLocation="SimpleTypes.xsd"/>. Of course, this is not a valid WSDL cause it cannot load the SimpleTypes.xsd.

I’ve managed to find the workaround:

1) create a new scheme which consists of includes:

<?xml version="1.0" encoding="utf-8"?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
       targetNamespace="http://custom/data"
       xmlns="http://custom/data">

<xs:include schemaLocation="SimpleTypes.xsd"/>
<xs:include schemaLocation="ComplexTypes.xsd"/>
<xs:include schemaLocation="RequestWrapper.xsd"/>

2) delete all the includes from the other schemes.

3)

<jaxws:schemaLocations>
       <jaxws:schemaLocation>classpath:/xsd/comprise.xsd</jaxws:schemaLocation>
</jaxws:schemaLocations> 

That worked for me, but, as you can see, all the schemes are not valid (there is no includes). That looks really dull to comment includes all the time before exposing a web service. Can anybody please help me? How to go through this?

So that, I need some kind of scheme location resolver…

  • 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-31T13:52:01+00:00Added an answer on May 31, 2026 at 1:52 pm

    I wonder why you specify xsd schemas in applicationContext.xml? May be i don’t fully understand your question but when i developed web services using JAXB simply included

    <wsdl:definitions name="myWebService" ...>
      <wsdl:types>
        <xsd:schema>
          <xsd:include namespace="your namespace comes here" schemaLocation="RequestWrapper.xsd"/>
        </xsd:schema>
      </wsdl:types>
    ...other part of wsdl
    

    So request wrapper includes other xsd files and you can make “includes” inside RequestWrapper.xsd as much as you need.

    p.s. in xsd file import like this

    <import namespace="here your namespace" schemaLocation="common.xsd"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to create an if statement in PHP that prevents a single post

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.