<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss Native WS - problem with Abstract class as output Parameter in WebService
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/prakash_pethe">prakash pethe</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/611596#611596">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I've a problem to use abstract class in a Web Service like WebMethod output parameter. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong class="name">Environment:</strong>  </p><p class="value" id="environment-val">- jboss-5.1.0.GA <br/>- eclipseHelios <br/>-windowsXp- SP3 </p><p><br/>I'm using JBOSS-5.1.0.GA and java runtime Version 6. It always return emtpry tag for abstract tag.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have completed below step as wellWhen running under Java 6 you need to manually copy the following libraries from the JBOSS_HOME/client directory to the JBOSS_HOME/lib/endorsed directory, so that the JAX-WS 2.0 apis supported by JBossWS are used:</p><p>jbossws-native-saaj.jar<br/>jbossws-native-jaxrpc.jar<br/>jbossws-native-jaxws.jar<br/>jbossws-native-jaxws-ext.jar </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>for below section of WSDL:</p><p><xsd:complexType name="Personne" abstract="true" /><br/><xsd:complexType name="PersonnePhysique"><br/><xsd:complexContent><br/><xsd:extension base="<strong>Personne</strong>"> </p><p><xsd:complexType name="<strong>PersonnePhysique</strong>"></p><p>        <xsd:complexContent></p><p>          <xsd:extension base="Personne"></p><p>            <xsd:sequence></p><p>              <xsd:element name="idFonctionnel" type="IdFonctionnel" maxOccurs="1"</p><p>                           minOccurs="1" /></p><p>              <xsd:element name="civilite" type="Civilite" maxOccurs="1"</p><p>                           minOccurs="0" /></p><p>                          minOccurs="0" />                          </p><p>            </xsd:sequence></p><p>          </xsd:extension></p><p>        </xsd:complexContent></p><p>      </xsd:complexType></p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left">Below is ant target we are using to generate code.</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><target name="consume" depends="init" ><br/>  <echo message="Génération des classes à partir du WSDL"/></p><p>  <wsconsume <br/>    fork="true"<br/>    verbose="true"<br/>    destdir="${classes.dir}"<br/>    sourcedestdir="${srcgen.dir}"<br/>    keep="true"<br/>    extension ="true"  <br/>       wsdl="../${wsdl.dir}/${wsdlName}"/><br/></target></p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left">We actualy using Personne as response from web service.</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><p>  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p align="left"><p>  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Getting below error stack:</p><p><strong>javax.xml.ws.WebServiceException: javax.xml.bind.UnmarshalException: Unable to create an instance of com.sfr.sigc.rechercherpersonneetroles.Personne</strong></p><ul><li>with linked exception:<br/><span class="error">[java.lang.InstantiationException]</span><br/>at org.jboss.ws.core.jaxws.JAXBDeserializer.handleUnmarshallException(JAXBDeserializer.java:110)<br/>at org.jboss.ws.core.jaxws.JAXBDeserializer.deserialize(JAXBDeserializer.java:78)<br/>at org.jboss.ws.core.binding.DeserializerSupport.deserialize(DeserializerSupport.java:58)<br/>at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:179)<br/>at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:96)<br/>at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)<br/>at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:85)<br/>at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)<br/>at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:261)<br/>at org.jboss.ws.core.EndpointInvocation.getReturnValue(EndpointInvocation.java:195)<br/>at org.jboss.ws.core.CommonClient.syncOutputParams(CommonClient.java:511)<br/>at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:397)<br/>at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)<br/>at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)<br/>at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)<br/>at $Proxy309.rechercherPersonneEtRoles(Unknown Source) </li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The same was working fine with CXF stack before. Please suggest solution without changinf WSDL as we can't chnage that.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/611596#611596">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>