<!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;">&#160;</p><p><strong class="name">Environment:</strong>&#160; </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;">&#160;</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;">&#160;</p><p>for below section of WSDL:</p><p>&lt;xsd:complexType name="Personne" abstract="true" /&gt;<br/>&lt;xsd:complexType name="PersonnePhysique"&gt;<br/>&lt;xsd:complexContent&gt;<br/>&lt;xsd:extension base="<strong>Personne</strong>"&gt; </p><p>&lt;xsd:complexType name="<strong>PersonnePhysique</strong>"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:complexContent&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:extension base="Personne"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:sequence&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:element name="idFonctionnel" type="IdFonctionnel" maxOccurs="1"</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; minOccurs="1" /&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:element name="civilite" type="Civilite" maxOccurs="1"</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; minOccurs="0" /&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; minOccurs="0" /&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/xsd:sequence&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/xsd:extension&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/xsd:complexContent&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;/xsd:complexType&gt;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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;">&#160;</p><p>&lt;target name="consume" depends="init" &gt;<br/>&#160; &lt;echo message="G&eacute;n&eacute;ration des classes &#224; partir du WSDL"/&gt;</p><p>&#160; &lt;wsconsume <br/>&#160;&#160;&#160; fork="true"<br/>&#160;&#160;&#160; verbose="true"<br/>&#160;&#160;&#160; destdir="${classes.dir}"<br/>&#160;&#160;&#160; sourcedestdir="${srcgen.dir}"<br/>&#160;&#160;&#160; keep="true"<br/>&#160;&#160;&#160; extension ="true"&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160; wsdl="../${wsdl.dir}/${wsdlName}"/&gt;<br/>&lt;/target&gt;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left"><p>&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left"><p>&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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;">&#160;</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;">&#160;</p></p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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>