Hi Kendall,

You might be able to do this with JiBX/WS, but I haven't tried and 
wouldn't guarantee it would work correctly. The most likely problem 
would be that you're marshalling the same class as several different 
elements. JiBX allows this, but you'd need to have a way of identifying 
the particular element representation you're using based on the method.

That said, this approach of using the object itself to hold the data for 
any of several method calls seems pretty ugly. Is there perhaps a better 
way of representing things in your application?

   - Dennis

On 03/17/2013 07:52 AM, Kendall Shaw wrote:
> Hi,
>
> I am using a webservice that has effectively an endpoint representing a
> class, with operations representing methods. With jibx (or axis
> wsdl2java) the result is a class per method. Aside from writing custom
> marshaller/unmarshaller, is there a typical way to bind a sequence of
> documents to a class?
>
> The interaction would be like:
>
> d = new Document()
> d.name("el doco")
> d.text("<blah/>")
> d.owner("fred")
>
> Marshall
>
> d.create()
>
> out:
>
> <create xmlns="document">
>     <name>el doco</name>
>     <owner>fred</owner>
>      <data>
>        <blah xmlns=""/>
>      </data>
> </create>
>
> in:
>
> <createResponse xmlns="document">
>     <id>XYZABC</id>
> </createResponse>
>
> Unmarshall
>
> if (d == null)
> d = new Document()
>
> d.objectWithId("XYZABC")
>
> out:
>
> <object xmlns="document">
>     <id>XYZABC</id>
> </object>
>
> in:
>
> <objectResponse xmlns="document">
>     <id>XYZABC</id>
>     <name>el doco</name>
> </objectResponse>
>
> d.owner()
>
> out:
>
> <owner xmlns="document">
>     <name>el doco</name>
> </owner>
>
> in:
>
> <ownerResponse xmlns="document">
>      <owner>fred</name>
> </ownerResponse>
>
> d.text()
>
> out:
> <text xmlns="document">
>     <name>el doco</name>
> </text>
>
> in:
> <textxResponse xmlns="document">
>      <data>
>        <blah xmlns=""/>
>      </data>
> </textResponse>
>
> Kendalll
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to