<!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">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;">
org.jboss.ws.WSException --> org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/amitsriv99">Amit Srivastava</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/536016#536016">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm using JBoss 5.1.0.GA for the Web Service deployment. Please find attached the relevant code snippets in "Code snippets.txt".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Refer to the "Client code" section # 2 in the attached code snippet. The call seems to be failing some time after the Web Service method returns at the following line:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em>System.out.println("Making the dynamic invocation of the Web Service method now...");<br/>HelloResponseVO responseVO = (HelloResponseVO)call.invoke(params);<br/></em></p><p>I'm getting the following exception when invoking the WebService method from the client:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>Note:</strong> The problem seems to be only when the return type from the Web Service method is a complex type data (a POJO)Things are working fine when I use the primitive data types instead of POJOs.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">Messages at client-side:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em>     [java] Making the dynamic invocation of the Web Service method now...<br/>     [java] java.rmi.RemoteException: Call invocation failed; nested exception is: <br/>     [java]  org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source: fullGreetingMessage cannot appear in this position. Expected content of return is sequence: fullGreetingMessage? greetingMessage? name?<br/>     [java]  at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:535)<br/>     [java]  at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:275)<br/>     [java]  at ae.co.etisalat.cbcm.stubbed.webservices.testclient.TestClientStubbedWS.callUsingJAX_RPC(Unknown Source)<br/>     [java]  at ae.co.etisalat.cbcm.stubbed.webservices.testclient.TestClientStubbedWS.main(Unknown Source)<br/>     [java] Caused by: org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source: fullGreetingMessage cannot appear in this position. Expected content of return is sequence: fullGreetingMessage? greetingMessage? name?<br/>     [java]  at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:249)<br/>     [java]  at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:96)<br/>     [java]  at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)<br/>     [java]  at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)<br/>     [java]  at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:261)<br/>     [java]  at org.jboss.ws.core.EndpointInvocation.getReturnValue(EndpointInvocation.java:195)<br/>     [java]  at org.jboss.ws.core.CommonClient.syncOutputParams(CommonClient.java:511)<br/>     [java]  at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:397)<br/>     [java]  at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:516)<br/>     [java]  ... 3 more</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">Messages on the server console:</span> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em>13:32:04,291 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=Stubbed_WS,endpoint=HelloWS<br/>13:32:04,447 INFO  [TomcatDeployment] deploy, ctxPath=/Stubbed_WS<br/>13:32:05,166 INFO  [WSDLFilePublisher] WSDL published to: file:/D:/Amit/JBoss/server/standard/data/wsdl/Stubbed_WS.war/HelloWS.wsdl<br/>13:32:05,275 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console<br/>13:32:05,291 WARNING [config] Unable to process deployment descriptor for context '/jmx-console'<br/>13:32:05,291 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jmx-console'<br/>13:32:05,338 INFO  [TomcatDeployment] deploy, ctxPath=/root<br/>13:32:05,354 WARNING [config] Unable to process deployment descriptor for context '/root'<br/>13:32:05,354 INFO  [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/root'<br/>13:32:05,385 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080<br/>13:32:05,400 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009<br/>13:32:05,400 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 24s:578ms<br/>13:32:33,963 INFO  [STDOUT] Inside HelloWS.getDetailedHelloMessage()<br/>13:32:33,963 INFO  [STDOUT] Sending the following message to client : Hello Maganwaa !!!<br/>13:32:33,963 INFO  [STDOUT] Exiting HelloWS.getDetailedHelloMessage()</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have tried changing the occurrence modifiers wsdl without luck..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>From:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em> <xs:complexType name='helloResponseVO'><br/>    <xs:sequence><br/>     <xs:element minOccurs='0' name='name' type='xs:string'/><br/>     <xs:element minOccurs='0' name='fullGreetingMessage' type='xs:string'/><br/>     <xs:element minOccurs='0' name='greetingMessage' type='xs:string'/><br/>    </xs:sequence><br/>   </xs:complexType></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>To:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em> <xs:complexType name='helloResponseVO'><br/>    <xs:all><br/>     <xs:element minOccurs='0' name='name' type='xs:string'/><br/>     <xs:element minOccurs='0' name='fullGreetingMessage' type='xs:string'/><br/>     <xs:element minOccurs='0' name='greetingMessage' type='xs:string'/><br/>    </xs:all><br/>   </xs:complexType></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any help in this regards will be highly appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks in advance...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Amit Srivastava</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/536016#536016">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>