Hi ,
First if you can please try with Axis2 nightly builds , or create a JIRA
and attach your service code.
Thanks
Deepal
> Hi,
>
> I get the "java.lang.RuntimeException: Unexpected subelement" problem too.
> Here is my situation.
>
> I have a simple pojo (a transfer object) which is
> 'com...transferobject.AttachmentDetail'. I have my service class which is
> 'com...webservices.AttachmentService'. In the service class, I have a
> service method declared as:
>
> public AttachmentDetail getAttachmentDetail(long attachmentId) {..}
>
> Problem 1: When I deployed my services, the auto generated wsdl put
> AttachmentDetail with 'http://transferobject...com.xsd' namespace.
>
> Next I generated client classes with adb databinding option.
>
> Then I ran a test using the client classes and checked the response coming
> from the getAttachmentDetail using soap monitor. The response xml puts
> AttachmentDetail in 'http://webservices...com' namespace.
>
> I kind of figured the difference in the name spaces is causing the
> unexpected subelement error on the client.
>
> I am doing something wrong?
>
> I tried to edit the generated wsdl to make target namespace for
> AttachmentDetail type as 'http://webservices....'. This produced unexpected
> compilation errors in the generated client classes.
>
> Problem 2: The autogenerated wsdl puts 'xs:sequence' tags around the
> attributes in the AttachmentDetail class. The xml seen through the soap
> monitor unfortunately does not have the attributes in the same sequence.
> This again causes the same error. I got around this by editing the wsdl to
> use xs:all instead. That seems to have solved that problem.
>
> Is there a way I can avoid editing the wsdl? Is there a way I can have xml
> generated in sequence or make wsdl use xs:all?
>
> I am newbie and cant find a solution. I would appreciate if anybody can
> help. I am just trying to get pojos transferred back and forth to the
> client. If anybody has a good other way please let me know.
>
> Thank you!
>
> Bala
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]