The WSDL is illegal.  Two problems with parameterOrder.  First, as you
said, it should list the parts.  Secondly, as Sanjiva tells me, if
parameterOrder is used at all, it is illegal to NOT list all input
parameters.  Yes, this is a doc/lit WSDL, but that really just means that
it sends a doc/lit message.  We're generating RPC-style bindings whether or
not it's rpc/encoded, so we can't ignore the parameterOrder "hint".

It looks like this is an attempt to hand roll a .NET-style doc/lit WSDL.
But a number of things don't quite follow the pattern.  If we remove the
parameterOrder attribute (since there's only one input part it's rather
meaningless), we get an SEI that looks like:

public interface ICreditSoap extends java.rmi.Remote {
    public net.xmethods.www.ChargeResponse
charge(net.xmethods.www.ChargeRequest chargeRequest) throws
java.rmi.RemoteException;
}

The input and output are structs, as JAX-RPC defines.  WSDL2Java, if it
recognizes a .NET style WSDL, will generate different mappings.  But to get
there, we have to make more changes to the WSDL:

- all message parts should be named "parameters".
- the complexType for input parameters must be named the same as the
operation (WSDL2Java doesn't check this yet, but it should; I think it
would result in a runtime failure if we used a .NET server).

With these changes, here's what the SEI looks like:

public interface ICreditSoap extends java.rmi.Remote {
    public java.lang.String charge(java.lang.String customerID, float
amount) throws java.rmi.RemoteException;
}

There are other things that probably should change, too, to strictly follow
the .NET pattern.  The input message should be named "<operation>SoapIn"
and the output message should be named "<operation>SoapOut", but I didn't
have to correct that for WSDL2Java.  I don't know whether .NET would handle
"charge0SoapIn".

Here's the corrected .NET-style WSDL:  (See attached file: ICredit.wsdl).

Russell Butek
[EMAIL PROTECTED]


Sam Ruby/Raleigh/IBM@IBMUS on 05/30/2002 08:51:04 PM

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:
Subject:    WSDL Parameter order w/doclit



Just rambling out loud...

   wsdl2java http://www.xmethods.net/idemo/wsdl/ICredit.wsdl

... results in a complaint that the parameter order does not list  all of
the input parts.  From WSDL2Java's perspective, the charge operation has a
single input part, namely chargeRequest.  Clearly the author of this WSDL
intended for this attribute to specify the order of the elements in the
chargeRequest - something that is arguably unnecessary (the schema
specifies sequence and not all).

The definition of parameterOrder in WSDL specifies 'Note that this
information serves as a "hint" and may safely be ignored by those not
concerned with RPC signatures'.  In this WSDL, the binding specifies style
="document" use="literal".

- Sam Ruby

Attachment: ICredit.wsdl
Description: Binary data

Reply via email to