[JBoss Web Services] - org.jboss.ws.WSException --> org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source
by Amit Srivastava
Amit Srivastava [http://community.jboss.org/people/amitsriv99] created the discussion
"org.jboss.ws.WSException --> org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source"
To view the discussion, visit: http://community.jboss.org/message/536016#536016
--------------------------------------------------------------
Hi,
I'm using JBoss 5.1.0.GA for the Web Service deployment. Please find attached the relevant code snippets in "Code snippets.txt".
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:
+System.out.println("Making the dynamic invocation of the Web Service method now...");
HelloResponseVO responseVO = (HelloResponseVO)call.invoke(params);
+
I'm getting the following exception when invoking the WebService method from the client:
*Note:* 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.
Messages at client-side:
+ [java] Making the dynamic invocation of the Web Service method now...
[java] java.rmi.RemoteException: Call invocation failed; nested exception is:
[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?
[java] at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:535)
[java] at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:275)
[java] at ae.co.etisalat.cbcm.stubbed.webservices.testclient.TestClientStubbedWS.callUsingJAX_RPC(Unknown Source)
[java] at ae.co.etisalat.cbcm.stubbed.webservices.testclient.TestClientStubbedWS.main(Unknown Source)
[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?
[java] at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:249)
[java] at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:96)
[java] at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
[java] at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)
[java] at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:261)
[java] at org.jboss.ws.core.EndpointInvocation.getReturnValue(EndpointInvocation.java:195)
[java] at org.jboss.ws.core.CommonClient.syncOutputParams(CommonClient.java:511)
[java] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:397)
[java] at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:516)
[java] ... 3 more+
Messages on the server console:
+13:32:04,291 INFO [DefaultEndpointRegistry] register: jboss.ws:context=Stubbed_WS,endpoint=HelloWS
13:32:04,447 INFO [TomcatDeployment] deploy, ctxPath=/Stubbed_WS
13:32:05,166 INFO [WSDLFilePublisher] WSDL published to: file:/D:/Amit/JBoss/server/standard/data/wsdl/Stubbed_WS.war/HelloWS.wsdl
13:32:05,275 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
13:32:05,291 WARNING [config] Unable to process deployment descriptor for context '/jmx-console'
13:32:05,291 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/jmx-console'
13:32:05,338 INFO [TomcatDeployment] deploy, ctxPath=/root
13:32:05,354 WARNING [config] Unable to process deployment descriptor for context '/root'
13:32:05,354 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/root'
13:32:05,385 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
13:32:05,400 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
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
13:32:33,963 INFO [STDOUT] Inside HelloWS.getDetailedHelloMessage()
13:32:33,963 INFO [STDOUT] Sending the following message to client : Hello Maganwaa !!!
13:32:33,963 INFO [STDOUT] Exiting HelloWS.getDetailedHelloMessage()+
I have tried changing the occurrence modifiers wsdl without luck..
From:
+<xs:complexType name='helloResponseVO'>
<xs:sequence>
<xs:element minOccurs='0' name='name' type='xs:string'/>
<xs:element minOccurs='0' name='fullGreetingMessage' type='xs:string'/>
<xs:element minOccurs='0' name='greetingMessage' type='xs:string'/>
</xs:sequence>
</xs:complexType>+
To:
+<xs:complexType name='helloResponseVO'>
<xs:all>
<xs:element minOccurs='0' name='name' type='xs:string'/>
<xs:element minOccurs='0' name='fullGreetingMessage' type='xs:string'/>
<xs:element minOccurs='0' name='greetingMessage' type='xs:string'/>
</xs:all>
</xs:complexType>+
Any help in this regards will be highly appreciated.
Thanks in advance...
Amit Srivastava
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536016#536016]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[JBoss Tools] - Confortable testing with SWTBot
by Libor Zoubek
Libor Zoubek [http://community.jboss.org/people/lzoubek%40redhat.com] created the document:
"Confortable testing with SWTBot"
To view the document, visit: http://community.jboss.org/docs/DOC-15111
--------------------------------------------------------------
There is a great option to run SWTBot tests in separate window. No more watching SWTBot "doing the work"
This can be accomplished by http://www.freedesktop.org/wiki/Software/Xephyr Xephyr. As a Xorg extension it should be available on every linux distro.
Xephyr is able to run another X session in a window in current session. The only problem is, that you cannot run multiple (gnome/xfce/kde) sessions at one time. I recommend to install some lightweight desktop manager like fluxbox, twm, enlightenement etc or run nested session under different user.
I've created simple shell script called nestedX which can do some bothering stuff for you. Just pick it, slightly edit (comment out you favorite wm) and use.
Once nestedX runs, new session in window should appear.
Eclipse with SWTBot tests and of course whatever can run inside.
When developing tests and you've started your IDE in current session, you can modify run configuration of your SWTBot test and define environment variable DISPLAY with value of new display (nestedX script tells it).
There is also an option to pass a program as an argument to script. Program will be executed few seconds after starting window manager in nested session.
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15111]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
16 years
ClassCastException in jBPM Graphical Process Designer
by Bender Heri
Hello
Just installed the new dev-Studio (3.0.0 GA) and try to understand the todolist tutorial example of the seam reference (http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5....)
I created the file todo.jpdl.xml in the root of my todoList project (ear-Project) and copied the content of the tutorial page into it. Opening this this file with the "jBPM Graphical Process Designer" ("open with...") produces following exception:
java.lang.ClassCastException: org.eclipse.core.internal.resources.Project cannot be cast to org.eclipse.core.resources.IFolder
at org.jbpm.gd.common.editor.Editor.checkReadOnly(Editor.java:339)
at org.jbpm.gd.common.editor.Editor.createPages(Editor.java:95)
at org.jbpm.gd.jpdl.editor.JpdlEditor.createPages(JpdlEditor.java:132)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:662)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1417)
at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:942)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$28.runWithException(Workbench.java:1384)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2316)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
What's going wrong? Am I missing something?
Thanks for help
Heri Bender
16 years