On Tue, Aug 25, 2009 at 10:38 PM, Remko Dobber <[email protected]>wrote:

>  Hello,
>
>
>
> I’ve been using Axis2 successfully to generate client stubs for several
> commercial products such as HP Service Manager to integrate our monitoring
> tool with those products using web services. My problem is that the
> commercial tools allow for some customization of the web services so they
> expose some additional fields. When I generate the stubs using a vanilla
> system, and then give my code to another customer that has exposed a
> user-defined field, I always get the
> “org.apache.axis2.databinding.ADBException: Unexpected subelement”
> exception. My code does not need those user-defined fields, and always
> leaves them empty.
>
>
>
> I would really like to share the same code with all customers, but this
> exception makes it impossible. Does anyone have any tips for me?
>

The only possible solution with ADB is to,

Get the wsdl and put all the possible fields to it.
Then make all optional fields as minOccurs = 0

Or else you can try with a different databinding like xmlbeans (-d xmlbeans)

thanks,
Amila.

>
>
> I’ve considered putting the stubs in a dynamically loaded class, and
> generating them at each customer. Would that work? Is there an easier way?
>
>
>
> Thanks,
>
> Remko Dobber
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to