Hi,
Thanks for responding. I have tried the nightly build but the problem is
still there.
I noticed that my autogenerated wsdl is with document style (& use=literal).
Is there a way I can make it use rpc style? I am wondering if that is the
problem. I googled for it but havent had much luck.
Thank you.
Deepal Jayasinghe wrote:
>
> 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]
>
>
>
--
View this message in context:
http://www.nabble.com/Unexpected-subelement-tf3763248.html#a11181100
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]