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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:29:04+00:00 2026-06-02T08:29:04+00:00

I’m sucessfully exposing a contract-first JAX-WS web service on a Tomcat servlet container with

  • 0

I’m sucessfully exposing a contract-first JAX-WS web service on a Tomcat servlet container with Jax-WS Spring support. I’m having troulbes with xs:idref types though. The original XSD file contains a complex type

  <xs:complexType name="DocumentScopeOptionalTypeReferenceIdentifier">
    <xs:simpleContent>
      <xs:extension base="DocumentScopeReferenceIdentifierContent">
         ...
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:simpleType name="DocumentScopeReferenceIdentifierContent">
    <xs:restriction base="xs:IDREF">
      <xs:minLength value="1"/>
      <xs:maxLength value="64"/>
    </xs:restriction>
  </xs:simpleType>

which xjc correctly compiles to

public class DocumentScopeOptionalTypeReferenceIdentifier {

  @XmlValue
  @XmlIDREF
  protected Object value;

  ...
}

When I deploy the webservice, however, the @XmlIDREF annotation gets ignored and I end up with an xs:anyType in the namespace declaration of the resulting WSDL

<xs:complexType name="DocumentScopeOptionalRoleReferenceIdentifier">
<xs:simpleContent>
<xs:extension base="xs:anyType">
...
</xs:extension>
</xs:simpleContent>
</xs:complexType>

Clients of the webservice in question report, that they cannot generate Client stubs (using C#) with this anyType present. How would I change that back to xs:idref? Thanks.

  • 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-06-02T08:29:05+00:00Added an answer on June 2, 2026 at 8:29 am

    Ok, I guess my approach was a little bit too naiv. After doing a bit of research I came to the conclusion that customizing the generated WSDL is not possible. I now switched to a contract first approach and specify a hand-crafted WSDL file manually.

    I’ve read that any WSDL file located under META-INF/wsdl should be picked up automatically by JAX-WS, if it contains a corresponding service and port name. This didn’t work for me, so I had to specify the WSDL file explicitely using the wsdlLocation attribute on the @WebService annotation

    @WebService(
       targetNamespace = "...", 
       serviceName = "...", 
       portName = "...", 
       wsdlLocation = "/META-INF/wsdl/mywebservice.wsdl"
    )
    public class MyWebService { ... }
    

    Deploying the webservice on Tomcat was straight forward following the instructions on the Jax-WS community page

    • 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
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what 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
I am writing an app with both english and french support. The app requests
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker
I have just tried to save a simple *.rtf file with some websites and

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.