Dennis Sosnoski <[EMAIL PROTECTED]> wrote :
> The JiBX way of representing this call
> would be using a class that holds the
> parameter values, in this case something like:
>
> public class AdditionParams {
> private int value1;
> private int value2;
> ...
> }
That makes sense - I think I was missing the fact that the top level object
(AdditionParams in this case) would not appear in the SOAP xml message. I can also
see this being a problem with what I'm doing, in that I have 100's of methods to
expose, all with different sets of parameters. I'd rather not create loads more
classes to match the structure of each call.
>>I was toying yesterday with having a SOAPCallParameters
>>class, which implements IMarshallable and IUnmarshallable,
>>and contains a Vector of IMarshallable instances. This
>>could then be passed to the call method as a
>>single parameter, and would have the following
>> implementation for marshall
> While this would work (at least for complex types - it
> would have a problem with Integer and such, which cannot
> be made to implement IMarshallable and IUnmarshallable),
What I was going to do for simple types (Integer, String etc), was create a simple
SimpleParameter class, which knew the tag name and data to go into the tag, and then
this class would implement the required interfaces. The marshal() method would then
manually create Xml to add to the big message (but I don't know how to do this
marshall code).
> it wouldn't really satisfy most web service users
> who want to have a stub method that matches the
> parameter list they're expecting to use for the service.
Surely it would if you generate wrapper code that has the right stub, which then uses
the SOAPCallParameters class internally to do the actual call?
> The problem with this is that it creates a new instance
> for each call, which generally is not going to be what
> you want.
True. Axis allows the web service class to be specified in Application, Session or
Request scope, so state can be held for all users, the user's session or not at all.
If you want to add this sort of functionality, then you need control over when the
instance is created - my simple code just did the request scope stuff for simplicity.
I agree it's slightly slower, but I'd rather not impact my application code and make
all exposed methods static. I'll probably be doing performance tests at some point,
so I'll look into the performance hit.
Tim.
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
jibx-devs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-devs