Hello Paul,
I'm not sure what you are asking. Let me briefly describe WSDL messages and how they relate to an invocation in WSIF.
WSDL 1.1 describes how WSDL message parts are mapped to a SOAP message. Usually one needs to specify in the binding where the WSDL message part goes in within the SOAP envelope (for example if it part of the SOAP header or message body), and what the encoding is (SOAP specifies standard ways of representing structured data in XML; this is used to convert the message part, defined according to a particular schema, into the XML that goes in a SOAP envelope). That is all one needs to know.
As another example, the java binding defined in WSIF maps abstract WSDL message parts to parameters in a java method invocation. The message types (i.e. the schema types) are mapped to java types.
The WSIF API lets you make "abstract invocations". Roughly speaking, as you described, you identify the WSDL, port type and operation, create the necessary WSIF messages and do the invocation. A WSIF message mirrors a WSDL abstract message: it is essentially a map of part names to values. The value for a particular part in the WSIF message must be permissible for the corresponding schema type for that WSDL message. For example if the WSDL message part is of schema type string, the value of the corresponding WSIF message part must be a java.lang.String and so on. Once you create your input message properly WSIF does the invocation using an appropriate binding (or the one you might have specified), taking care of message conversions as required by that particular protocol - for example, serialization into XML in case you use a SOAP binding.
Hope that helps,
Nirmal.
| Paul Duffin <[EMAIL PROTECTED]>
02/20/2003 06:41 AM
|
To: [EMAIL PROTECTED] cc: Subject: Using XML to represent web service invocation. |
As I understand it the WSIF is designed to allow Java code to
programmatically invoke any web service that has a wsdl description. The
client code does not have to know anything about specific bindings or
locations of web services, they just provide a url to the wsdl, the name
of the operation they want to invoke and any 'parameters'.
Assuming that the above is a correct (and probably simplistic) summary I
need to do a very similar thing except that I need to represent the web
service invocation using an abstract XML representation instead of
coding it directly into Java.
The WSDL contains an abstract XML representation of a message and so I
would like to use that if I could as it seems perfect for it. Section
2.3.2 of WSDL Note (http://www.w3.org/TR/wsdl#_abstract-v) even says
> Message definitions are always considered to be an abstract
> definition of the message content. A message binding describes how
> the abstract content is mapped into a concrete format. However, in
> some cases, the abstract definition may match the concrete
> representation very closely or exactly for one or more bindings, so
> those binding(s) will supply little or no mapping information.
> However, another binding of the same message definition may require
> extensive mapping information. For this reason, it is not until the
> binding is inspected that one can determine "how abstract" the
> message really is.
The first two sentences indicate to me that it should be possible to
provide mappings direct from the abstract message format through to the
underlying bindings. These mappings would only depend on the abstract
message format and the binding type, they would not need application
specific knowledge such as is required for mapping from Java objects
through to specific bindings.
However, my problem is that I cannot seem to find any confirmation of my
interpretation of the specification, either through examples of how it
can be done, or code to actually do it.
I have read the WSDL many times now and the binding definitions do not
seem to elaborate on ".. how the abstract content is mapped into a
concrete format.". In particular it seems to be in need of a lot of
examples that show how abstract message definitions (in XML Schema) are
represented in each binding.
As WSIF operates at a similar abstract level I was wondering whether
anyone on this group could enlighten me on whether it is possible and if
so how, or even better tell me that WSIF already does this.
If it is not possible for all binding types / WSDL structures then I am
prepared to limit its applicability, such as to the WS-I Basic Profile.
http://www.ws-i.org/Profiles/Basic/2003-01/BasicProfile-1.0-WGD.pdf
