Hello. I'm very new to web services (I've not written one yet) and I've got what
is probably a very straightforward question. By the way, I'm using AXIS.
I'd like to have my client send one type of parameter (a string containing XML)
but the service receives a different type (a Document object).
What are the different ways I can set AXIS up to do this?
If you want to know the gory design reasons:
I'd like to pass some complex but flexible data to a web service and an XML
document seems ideal. I'd like to implement that service in Java. As far as I
can see there are several ways to pass the XML document to the service,
including:
a) Pass a string parameter containing the XML document
b) Pass a Document / Element object
i) The object is serialised by converting it to the underlying XML
document
ii) The object is serialised by serialising its properties
c) Some other representation of an XML document
Let's discount c as it smacks of reinventing the wheel.
Both a and b-i result in a straightforward representation "on the wire" that
could be reproduced by a non-Java client. On the other hand, b-ii would mean
that a non-Java client would have to reproduce the complex properties of the
Java Document object from its own representation of an XML document.
>From the point of view of the service b-i has the advantage that the conversion
of the XML document parameter to a Document object will be done by the
infrastructure which simplifies the service implementation.
>From the point of view of the client, however, there are three possibilities:
1. It has a string containing an XML document
2. It has a Document / Element object
3. It has some other representation of the XML document
Option a implies that when the client has a string containing an XML document
the serialisation is trivial; when it has an XML object it is serialised to an
XML document.
Option b-i, however, implies that when the client has a string containing an XML
document it must be converted to an XML object and then serialised back to an
XML string.
Sounds like option a is best for the client.
The client and service have different requirements - I'd like to combine my
options and have the client send a string parameter and the service receive a
Document object.
As I said before - I'm new to web services and AXIS so please feel free to point
out any obvious better solutions I've missed.
Chris.
Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer
den im Adressfeld ausgewiesenen Adressaten bestimmt.
Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir um eine kurze Nachricht. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die
Echtheit oder Vollstaendigkeit der in dieser Nachricht
enthaltenen Informationen garantieren koennen, schliessen wir
die rechtliche Verbindlichkeit der vorstehenden Erklaerungen
und Aeusserungen aus. Wir verweisen in diesem Zusammenhang
auch auf die fuer die Bank geltenden Regelungen ueber die
Verbindlichkeit von Willenserklaerungen mit verpflichtendem
Inhalt, die in den bankueblichen Unterschriftenverzeichnissen
bekannt gemacht werden.
This message is confidential and may be privileged. It is
intended solely for the named addressee. If you are not the
intended recipient please inform us. Any unauthorised
dissemination, distribution or copying hereof is prohibited.
As we cannot guarantee the genuineness or completeness of
the information contained in this message, the statements
set forth above are not legally binding. In connection
therewith, we also refer to the governing regulations of
WestLB concerning signatory authority published in the
standard bank signature lists with regard to the legally
binding effect of statements made with the intent to
obligate WestLB.