Unable to create an instance of abtract class (called from web services)

Hello,
I generated the java code from wsdl. The generated abtract class is as below
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NABC", propOrder = {
    "rType"
})
@XmlSeeAlso({
    D_NABC.class,
    B_NABC.class
})
public abstract class NABC {

    @XmlElement(nillable = true)
    protected RType rType;
    @XmlAttribute(required = true)
    protected String format;
/**
     * Gets the value of the rType property.
     *
     * @return
     *     possible object is
     *     {@link RType }
     *    
     */
    public RType getRType() {
        return rType;
    }

    /**
     * Sets the value of the rType property.
     *
     * @param value
     *     allowed object is
     *     {@link RType }
     *    
     */
    public void setRType(RType value) {
        this.rType = value;
    }

    /**
     * Gets the value of the format property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *    
     */
    public String getFormat() {
        return format;
    }

    /**
     * Sets the value of the format property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *    
     */
    public void setFormat(String value) {
        this.format = value;
    }
}

The webservice has a method
 @WebMethod
  @WebResult(targetNamespace="")
  @RequestWrapper(localName="create", targetNamespace="http://abcde.services.com/", className="com.abcde.Create")
  @ResponseWrapper(localName="createResponse", targetNamespace="http://abcde.services.com/", className="com.abcde.CreateResponse")
  public abstract ABC create(@WebParam(name="nabc", targetNamespace="") NABC n_abc)
    throws SerializableException;

I created a subclass of NABC as below:
public class Sub_NABC extends NABC {
    String path;
    public Sub_NABC() {
         super();
    }

    public String getPath() {return path;}
    public String setPath(String path) {this.path = path;}
}

---
When I call the create method by passing Sub_NABC, I got the message error
[javax.xml.bind.UnmarshalException: Unable to create an instance of NABC
-> we can not pass Sub_NABC to the web service method? Is there any way to do it?
Please help.
Thank you very much.
ndhaiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sciuriwareCommented:
By definition you can not instantiate an abstract class.
It is a building block that becomes usable by extending it and defining its abstract members.
So, create your own class derived from the abstract class and fill in the gaps first.

;JOOP!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sciuriwareCommented:
Example from the JAVADOC:   java.util.AbstractSet
which is the root of a.o. the HashSet and TreeSet classes.

;JOOP!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.