You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Russell Butek <bu...@us.ibm.com> on 2002/01/22 21:06:21 UTC

WSDL4J bug

Matt, I think I sent you this first bug before, but I have another
variation, now...


1.  When the stanzas are in reverse order -
<binding...><portType...><message...> -  a call to portType.getOperations
().iterator() will return an iterator which returns all operations twice.
This wsdl and test program show the problem:  (See attached file:
duplicate.wsdl), (See attached file: Test.java).


2.  A similar problem is a WSDL with stanzas in the normal order, but with
overloaded operations; in other words, a portType and binding with two
operations called "method" but with different input/output messages.  A
call to binding.getBindingOperations() returns the two BindingOperations.
But a call to portType.getOperations() returns one of the operations twice
and I never see the other one.  Here's a wsdl and test for this variation:
(See attached file: overload.wsdl), (See attached file: Test.java).

Russell Butek
butek@us.ibm.com

Re: WSDL4J bug

Posted by Simon Fell <so...@zaks.demon.co.uk>.
On Tue, 22 Jan 2002 15:06:21 -0500, in soap you wrote:

>Matt, I think I sent you this first bug before, but I have another
>variation, now...
>
>
>1.  When the stanzas are in reverse order -
><binding...><portType...><message...> -  a call to portType.getOperations
>().iterator() will return an iterator which returns all operations twice.
>This wsdl and test program show the problem:  (See attached file:
>duplicate.wsdl), (See attached file: Test.java).

That's not legal WSDL, the spec and schema both define a fixed order
of import, message, portType, binding, service. You should fault if
the order is wrong.

Cheers
Simon

RE: WSDL4J bug

Posted by Chris Haddad <ch...@cobia.net>.
Russell - 

Is the WSDL4J bug you reported the root cause of errors when emitting
overloaded methods using Wsdl2Java?

Attached is an example WSDL file and the resultant SoapBindingStub which
does not compile due to an error in the parameter definitions?

The main snippet is the following:
   <wsdl:message name="getFlightInfoResponse1">
      <wsdl:part type="tns2:FlightInfo"/>
   </wsdl:message>

   <wsdl:message name="getFlightInfoResponse">
      <wsdl:part type="tns2:FlightInfo"/>
   </wsdl:message>

   <wsdl:message name="getFlightInfoRequest">
   </wsdl:message>

   <wsdl:message name="getFlightInfoRequest1">
      <wsdl:part name="idRef" type="xsd:string"/>
   </wsdl:message>
      <wsdl:operation name="getFlightInfo">
         <wsdl:input message="intf:getFlightInfoRequest"/>
         <wsdl:output message="intf:getFlightInfoResponse"/>
      </wsdl:operation>

      <wsdl:operation name="getFlightInfo" parameterOrder="idRef">
         <wsdl:input message="intf:getFlightInfoRequest1"/>
         <wsdl:output message="intf:getFlightInfoResponse1"/>
      </wsdl:operation>

In the SoapBindingStub class, the overloaded method is not being emitted
properly.

    public stub.FlightInfo getFlightInfo(java.lang.String idRef) throws
java.rmi.RemoteException{) is being declared twice instead of once and
an additional declaration with no parameters.


Am I doing something wrong?

/Chris

----------
Chris Haddad
Cobia Communications  - XML and Web Service Solutions
678 431 1656
mailto:chris@cobia.net
 

-----Original Message-----
From: Russell Butek [mailto:butek@us.ibm.com] 
Sent: Tuesday, January 22, 2002 3:06 PM
To: Matthew Duftler
Cc: axis-dev@xml.apache.org
Subject: WSDL4J bug

Matt, I think I sent you this first bug before, but I have another
variation, now...


1.  When the stanzas are in reverse order -
<binding...><portType...><message...> -  a call to
portType.getOperations
().iterator() will return an iterator which returns all operations
twice.
This wsdl and test program show the problem:  (See attached file:
duplicate.wsdl), (See attached file: Test.java).


2.  A similar problem is a WSDL with stanzas in the normal order, but
with
overloaded operations; in other words, a portType and binding with two
operations called "method" but with different input/output messages.  A
call to binding.getBindingOperations() returns the two
BindingOperations.
But a call to portType.getOperations() returns one of the operations
twice
and I never see the other one.  Here's a wsdl and test for this
variation:
(See attached file: overload.wsdl), (See attached file: Test.java).

Russell Butek
butek@us.ibm.com