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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:05:47+00:00 2026-05-16T12:05:47+00:00

I am trying to create a quick sample Java client for a SOAP web

  • 0

I am trying to create a quick sample Java client for a SOAP web service we have built with ASP.net.

The web service message schema makes use of many abstract classes with implementations of those, e.g. DeviceIdentifier (abstract), with SerialNumber and ProductNumber (these are hypothetical examples to illustrate the question)

I used wsimport to create the client side proxy to consume the web service from my java code:

wsimport -extension -s c:\theservice -d c:\theservice -p theservice http://server/theservice?wsdl

I then assemble the message as follows:

GetDeviceReq request = new GetProductReq();
DeviceIdentifier id = new SerialNumber();
((SerialNumber)id).setUnitIdentifier(id);
GetDeviceResp response = service.GetDevice(request);

The code compiles perfectly and executes. However, I obtain a SOAPFaultException with the following message from the ASP.net web service:

The specified type is abstract: name='DeviceIdentifier', namespace='http://bogus', at <unitIdentifier xmlns='http://bogus'>.

I understand what the error message means, but I am running out of ideas as to why its happening in this case? I suspect it may have something to do with the way the wsimport tool generated the proxy code?

  • 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-16T12:05:48+00:00Added an answer on May 16, 2026 at 12:05 pm

    I solved my own problem!

    I am using JDK 6, which includes JAX-WS 2.0. It looks like this version doesnt automatically decorate abstract classes with @XmlSeeAlso attributes. I manually modified the proxy code to include these attributes on the abstract classes. For the example give above:

    The code generated by wsimport looks like this:

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "DeviceIdentifier")
    public abstract class DeviceIdentifier {
    }
    

    I then added the @XmlSeeAlso:

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "DeviceIdentifier")
    @XmlSeeAlso({SerialNumber.class, ProductNumber.class})
    public abstract class DeviceIdentifier {
    }
    

    This is similar to the XmlInclude attribute in C#/.Net in System.Xml

    It looks like this problem has been fixed in more recent versions of JAX-WS as per this article.

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

Sidebar

Related Questions

I have a situation where I'm trying to create a quick and easy admin
I'm trying to create an ASP.Net MVC endpoint to authenticate externally. The idea is
I am trying to create a quick search function on the menu of my
I am trying to create a quick hashcode function for a complex number class
I am trying to use the googlecharts gem to create some quick charts. Here
I am trying to create a quick fix for a problem I am having.
I'm trying to learn JPA and I want create a simple Java command line
I'm trying to make a quick sample Backbone.js app that has a Post model,
I was trying to create a quick little script that would insert data into
I'm trying to create a quick and dirty simple menu that is generated by

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.