axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hernand Azevedo (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-1746) POJO client call failed with "Unexpected subelement"
Date Tue, 24 May 2011 18:08:47 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-1746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038694#comment-13038694
] 

Hernand Azevedo commented on AXIS2-1746:
----------------------------------------

I have just solved this problem by ordering the pojo┬┤s attributes in alphabetical order inside
the wsdl.

> POJO client call failed with "Unexpected subelement"
> ----------------------------------------------------
>
>                 Key: AXIS2-1746
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1746
>             Project: Axis2
>          Issue Type: Bug
>          Components: rpc
>         Environment: Axis2 1.1 release
>            Reporter: Kinichiro Inoguchi
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>         Attachments: ShipmentStatusService.aar, Src.zip, TestPojoService.aar, client_src.zip,
service_src.zip
>
>
> I created stub by WSDL2JAVA tool, and call that service.
> Client program failed with "Unexpected subelement".
> I think mismatch of javabeans' namespace is an issue.
> Top level element of javabeans should belongs to parent's namespace, should not ?
> <I generated stub like this>
> C:\work>%AXIS2_HOME%\bin\wsdl2java -uri http://localhost:8080/axis2/services/TestPojoService?wsdl
-o test
> Using AXIS2_HOME:   C:\work\axis2-1.1
> Using JAVA_HOME:    C:\j2sdk1.4.2_04
> C:\work>
> <stack trace>
> java.lang.RuntimeException: java.lang.RuntimeException: Unexpected subelement ret20
> 	at myservice.service.TestPojoServiceStub.fromOM(TestPojoServiceStub.java:14552)
> 	at myservice.service.TestPojoServiceStub.getBean(TestPojoServiceStub.java:152)
> 	at TestClient.main(TestClient.java:15)
> Caused by: java.lang.RuntimeException: Unexpected subelement ret20
> 	at myservice.service.TestPojoServiceStub$DataBean1$Factory.parse(TestPojoServiceStub.java:9455)
> 	at myservice.service.TestPojoServiceStub$GetBeanResponse$Factory.parse(TestPojoServiceStub.java:4570)
> 	at myservice.service.TestPojoServiceStub.fromOM(TestPojoServiceStub.java:14546)
> 	... 2 more
> Exception in thread "main" 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message