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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:26:27+00:00 2026-06-02T02:26:27+00:00

I generated a lot of classes using Apache Axis based on a WSDL for

  • 0

I generated a lot of classes using Apache Axis based on a WSDL for a .NET SOAP web service. The generated methods for the web methods return Result classes that just have some generic org.apache.axis.message.MessageElement[] value. I instead want a Result class that corresponds perfectly to the XML that the web method returns. I used JAX to create a couple Java classes based on the XSD for the XML returned by one of my web methods, and those generated classes are annotated and have properties that match my XML:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "content"
})
@XmlRootElement(name = "fields")
public class Fields {
    @XmlValue
    protected String content;

    @XmlAttribute(required = true)
    @XmlSchemaType(name = "anySimpleType")
    protected String parameters;

    public String getContent() {
        return content;
    }

    public void setContent(String value) {
        this.content = value;
    }

    public String getParameters() {
        return parameters;
    }

    public void setParameters(String value) {
        this.parameters = value;
    }
}

I’m now trying to integrate the JAX classes, like Fields above, into the Result class that Apache Axis generated. I don’t know how to go about this. The Apache Axis-generated class has the following methods that might be useful:

public static org.apache.axis.encoding.Serializer getSerializer(
        java.lang.String mechType, java.lang.Class _javaType,
        javax.xml.namespace.QName _xmlType) {
    return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
        _xmlType, typeDesc);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
        java.lang.String mechType, java.lang.Class _javaType,
        javax.xml.namespace.QName _xmlType) {
    return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
        _xmlType, typeDesc);
}

Can I somehow take the MessageElement[] that comes into my Result class constructor (its only parameter), and populate the a Fields instance, based on how Fields is annotated with @XmlRootElement and the like? Or did something go awry when generating the Apache Axis classes based on my .NET WSDL, to cause the generated Result classes to be so generic?

Edit: Michael’s comment made me check the WSDL, and it has this bit in wsdl:types:

<s:element name="MyResponse">
    <s:complexType>
        <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="MyResult">
                <s:complexType mixed="true">
                    <s:sequence>
                        <s:any/>
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:sequence>
    </s:complexType>
</s:element>

That’s all the mention I saw of MyResult, and that complexType / sequence / any looks pretty generic. Maybe I need to do something more with my .NET web service, then generate Java classes with Axis.

  • 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-02T02:26:28+00:00Added an answer on June 2, 2026 at 2:26 am

    Michael’s comment about checking the WSDL pointed me in the right direction. A couple of my web methods were just returning XmlDocument, so the WSDL was very generic about them. I changed the web methods to return custom classes with the [Serializable] attribute and now the WSDL is more specific, so the Axis-generated code is more specific.

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

Sidebar

Related Questions

We've generated some (well a lot) of classes using HyperJAXB. All of the classes
I generated a web-service client using JBoss utils (JAX-WS compatible) using Eclipse 'web service
I'm developing a JSF 2.0 app that consumes a SOAP-based web service. I want
I auto-generated some classes using xsd.exe for a project I am working on. I
I need to generate a lot of random numbers. I've tried using random.random but
I generated a new form using sean-gen (seam new-form) and added another field to
I created a Java Project in Eclipse using the Web services Top down approach
I have the following situation: Three concrete service classes implement a service interface: one
I have designed some classes using Visual Studio class diagramming. Now I would like
I'm using rails31 & coffeescript and have defined some classes that extend from a

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.