Hi,

I have no control over the web service, if that is the application that 
you mean.

When I use the web service, conceptually, I am trying to use the class 
library that is being served. Each endpoint is an object with state. 
Each operation operates on the object's state.

What axis wsdl2java generates (not using jibx) is a class for each 
method (a bean). So, the program logic has to go through contortions to 
use the inverted interface to the classes that are being served.

The tutorials and examples for jibx are all using beans (structures 
instead of classes), so there is no problem because the application is 
designed as functions operating on data.

I imagine that I can create custom marshall/unmarshall code to recreate 
the objects that are being served. But, if there is a typical way to do 
this without custom code, I would like to know.

Kendall

On 03/16/2013 03:04 PM, Dennis Sosnoski wrote:
> 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
>
>


------------------------------------------------------------------------------
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