Yes, tried that. Axis1 does not even manage to serialise abstract
classes... As you can see from the extract below, only type information
is included for simple abstract classes, and complex abstract classes
(idmethod) are completely empty:
<soapenv:Body>
<confirmCustomerReq.xmlns="http://www.nrs.eskom.co.za/xmlvend/revenue/2.0/schema">
<ns1:clientID
mlns:ns1="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"/>
<ns2:terminalID
xmlns:ns2="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"/>
<ns3:msgID dateTime="now1" uniqueNumber="1"
mlns:ns3="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"/>
<idMethod/>
</confirmCustomerReq>
</soapenv:Body>
It seems axis1 is a dead loss (does not even serialise abstract classes
correctly, axis2 is possible with a number of ugly hacks (incorect type
attribute namespace, cannot expose deserialised abstract classes),
pocketSOAP is a dead loss (crashes in compile), JWSDP is a dead loss
(does not generate fault exceptions correctly)...
It seems the only WSDL comiler that can hack it is wsdl.exe from VS,NET
:-( (and I really don't want to go there).
Unless someone can save me from it, it looks like I will have to go to
windoze :-(.
-justin
Anne Thomas Manes wrote:
Have you tried Axis 1?
On 2/23/06, *Justin Schoeman* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Either you have completely lost me, or we are thinking of different
things.
Constructors for the objects work, and casting them up for serialisation
works. Deserialisation also works, but casting them down to the
implemented class does not...
-justin
robert lazarski wrote:
> Sorry to leave you hanging Justin, been busy and this question
> required a bit of thinking.
>
> You can do inheritance and abstract classes via xml binding. See
this
> jira for how it works:
>
> http://issues.apache.org/jira/browse/AXIS2-310 - this got fixed
in axis
> 1.3 and I found a work around for axis2.
>
> So you'll get this signature in axis 1.3 using the referenced wsdl:
>
> public class ReturnWeb_Login extends
> com.callcentreweb.types.ReturnWeb_Base implements
java.io.Serializable
>
> The abstract class your looking for. In axis2, here we use xmlbeans
> (same basic wsdl only with different names, and this time using doc /
> lit ) .
>
> public interface SmartLoginResponse extends
swasmartns.types.ReturnWebBase
>
> I wasn't able to get extends to work using adb.
>
> Does this help?
> Robert
> http://www.braziloutsource.com/ <http://www.braziloutsource.com/>
>
>
>
>
> On 2/23/06, *Justin Schoeman* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>
wrote:
>
> Hi again,
>
> I am begging now - I have tried everything that I can think
of. This is
> my last effort before scrapping Linux/Apache/Axis for this
project and
> switching to Widoze/C# :-(
>
> The problem is:
>
> I need to implement a webservice for XMLVend (generated by a
standards
> body) that uses abstract types for just about
everything. The abstract
> types contain no methods/properties of their own - they are
just there
> to allow for various data types to be plugged in as required.
>
> As an example, one abstract type is DeviceID (abstract) for
which we use
> the GenericDeviceID implementation. On the client, this looks
like:
>
> EANDeviceID id = EANDeviceID.Factory.newInstance();
> id.setEAN("hello");
> req.setClientID (id);
>
> All works fine up till now. Call out the client, and get this
bit of xml
> over the wire:
> <clientID.xmlns="
http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"
> xmlns:sch="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"
> ean="1234567890123" type="sch:EANDeviceID" />
>
> As you can see, all is fine (except that type= should be
xsi:type=, but
> client and server are Axis2, so not an issue here).
>
> On the server, I retrieve the ClientID with:
>
> DeviceID = req.getClientID();
> System.out.println(id.getClass().getName());
>
> This outputs:
> 'za.co.eskom.nrs.www.xmlvend.base._2_0.schema.impl.DeviceIDImpl'
>
> NOW: HOW DO I GET FROM THE DeviceIDImpl TYPE BACK TO THE
EANDeviceID?
> Casting does not work, and I can think of nothing else.
>
> As a simple test, I plugged the id back into the response:
>
> resp.setClientID(id);
>
> and look at the response on the wire:
>
> <clientID xmlns="
http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema
<http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema>"
> xmlns:sch="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"
> ean="1234567890123" type="sch:EANDeviceID" />
>
> So 'id' does definitely have the type and value information,
but I
> cannot figure out how to get it out programatically!
>
> If anybody can give me some advice before I go totally
insane, I would
> greatly appreciate it ;-)
>
> Thanks,
>
> -justin
>
> PS - There is nothing quite as frustrating as KNOWING that
the data is
> right there, and KNOWING there must be a simple way of
getting at it,
> but not being able to do it...
>
>