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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:02:44+00:00 2026-06-13T04:02:44+00:00

We are using thirdparty wsdl files that we are generating java files with using

  • 0

We are using thirdparty wsdl files that we are generating java files with using axis2. Now we have a problem that there are duplicate elements in different files but with the same namespace.

Example:

file1.wsdl => <xsd:element name="MyElementName"> 
file2.wsdl => <xsd:element name="MyElementName"> 

So, the result is that the same file is generated twice from different wsdl files so only the last file generated actually exists after file generation.

I was wondering if this really is correct or if it is a design flaw of the wsdl files?
If not, how can I get around this problem using axis2?

EDIT

Ok, so I found a flag that I can use different packages for the classes so now I have

com.package.MyElementName
com.package.ext.MyElementName

However, it still does not work because axis (or xmlbeans) give me the wrong class back.

Take a look at this example. I would assume that this would work but intead I get a ClassCastException

java.lang.ClassCastException: com.package.MyElementName.impl.MyElementNameDocumentImpl cannot be cast to com.package.ext.MyElementNameDocument

com.mypackage.ext.MyElementNameDocument doc1 =
   com.mypackage.ext.MyElementNameDocument.Factory.newInstance();
doc1.addNewMyElementName();

com.mypackage.ext.MyElementNameDocument doc2 = 
  com.mypackage.ext.MyElementNameDocument.Factory.parse(doc1.toString());

EDIT–

Ok, I found the real examples on the web so I might as well show the real ones.

http://dtd.cobaltgroup.com/STAR/5.2.4/WSDL/Templates/

Among many others there are these two

http://dtd.cobaltgroup.com/STAR/5.2.4/WSDL/Templates/GetServiceProcessingAdvisory.wsdl
http://dtd.cobaltgroup.com/STAR/5.2.4/WSDL/Templates/GetStandardCodes.wsdl

As you can see, both of them has the element ProcessMessage. Hopes this clarifies something.

 </xsd:complexType>
     <!--Global Elements used by the Bindings--><xsd:element name="ProcessMessage">
        <xsd:annotation>
           <xsd:documentation source="http://www.starstandard.org">
                Process Message Input
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
           <xsd:sequence>
              <xsd:element name="payload"
 type="starws:GetServiceProcessingAdvisoryPayload" minOccurs="0"
                           maxOccurs="1"
                           form="qualified"/>
           </xsd:sequence>
        </xsd:complexType>
     </xsd:element>


 <!--Global Elements used by the Bindings--><xsd:element name="ProcessMessage">
        <xsd:annotation>
           <xsd:documentation source="http://www.starstandard.org">
                Process Message Input
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
           <xsd:sequence>
              <xsd:element name="payload" type="starws:GetStandardCodesPayload" 
  minOccurs="0"
                           maxOccurs="1"
                           form="qualified"/>
           </xsd:sequence>
        </xsd:complexType>
     </xsd:element>

….

Regards /Johan

  • 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-13T04:02:46+00:00Added an answer on June 13, 2026 at 4:02 am

    At least very bad wsdl-design by the vendor (especially for one, which contains the word “standard” in its company name): Global type/element-definitions should be made once and i.e. put into a separate global XSD-file (like they did here:

     <xsd:include schemaLocation="STARWSDLDataTypes.xsd"/>
    

    ).

    Also, the servicenamespace should be kept service-specific so a flexibility regarding service-versioning is given.

    I fear this actual constellation (duplicate element declaration within same namespaces+wsdls) is a gray area topic – I did not find any clear statement regarding this on the net, so your only solution might be to develop against both wsdl-files completely separated. Meaning axis2-wise 2 applications (1 per wsdl) instead of one shared one.

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

Sidebar

Related Questions

Using axis2's wsdl2java tool and a third-party wsdl I have generated service stub and
Im using a thirdparty class that has the following method: public void print(PrintStream s);
I have to connect to a third party web service that provides no wsdl
I have the following code using require.js. utilities.js: define([thirdparty-script-A.js], function(){ ... }); application.js: define([utilities,
I call a dll from Java using JNI. The DLL calls another thirdparty library
In an iPad app im using a thirdParty cpp file that acts as a
I have a set of nested DIVs that slidetoggle using jQuery as the user
I am using a thirdparty webservice. I got the response in XML format. Now,
I am having difficulty using a thirdparty library registration function to register a callback.
Is it possible in IE8 without using third party plugin like Java?

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.