axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wolfgang Klenk (JIRA)" <>
Subject [jira] Commented: (AXIS-2636) Problem Parameter order
Date Thu, 20 Mar 2008 08:33:27 GMT


Wolfgang Klenk commented on AXIS-2636:

I also have a similar problem with parameter order:

There is a base class specified by the following XSD:

  <xs:complexType name="RootEntity" abstract="true">
      <xs:element name="objectVersion" type="xs:string" minOccurs="0" maxOccurs="1" />
    <xs:attribute name="objectId" type="xs:long" use="optional">

WSDL2Java creates the following constructor for this abstract base class:

public abstract class RootEntity  implements {

    public RootEntity(
           java.lang.String objectVersion,
           java.lang.Long objectId) {
           this.objectVersion = objectVersion;
           this.objectId = objectId;

So far so good.

But if there is an entity defined in the XSD file which is an extension of RootEntity ...

  <xs:complexType name="UpcChannel" abstract="false">
      <xs:extension base="upc-cdm-common-root:RootEntity">
          <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1" />
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" />

... then the following constructor for this class is generated:

    public UpcChannel(
           java.lang.Long objectId,
           java.lang.String objectVersion,
           java.lang.String description,
           java.lang.String name) {
            objectId,                          // Wrong order of superclass constructor parameters
        this.description = description; = name;

As one can see, the parameters of the superclass constructor are in the wrong order.

> Problem Parameter order 
> ------------------------
>                 Key: AXIS-2636
>                 URL:
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>         Environment: Windows XP ,Tomcat 4.1,  Axis 1.4, Java
>            Reporter: Diego Sanchez
>            Priority: Critical
>             Fix For: 1.4
> Hello, 
> I have a webservice which has several methods. Some methods accepts several string parameters
as input.  I deployed the service to the tomcat 4.1 container. Everything seems to be fine.
Now I would like to test the service by calling it from my browser with the following url
> http://localhost:8080/axis/services/CalleGIT.jws?method=cEntSing&provinc=provincia&municip=municipio&entidco=entidadco&entidsi=entidadsi
> It first writes out  the transferred parameters but the assignment is not corrent. The
output is
> Calling cEntSing method with provincia entidadco and municipio provincia and entidadco
entidadsi and entidadsi municipio
> However, the same url but with distinct parameter name  (p4,p3,p2,p1) is OK
> http://localhost:8080/axis/services/CalleGIT.jws?method=cEntSing&p4=provincia&p3=municipio&p2=entidadco&p1=entidadsi
> Calling cEntSing method with provincia provincia and municipio municipio and entidadco
entidadco and entidadsi entidadsi
> public class CallEGIT {
> ......
> public String cEntSing(String provinc, String municip, String entidco, String entidsi)
> System.out.println("Calling cEntSing method with provincia " + provinc+ " and municipio
" + municip + "and entidadco " + entidco + " and entidadsi " + entidsi);  
> }
> }
> WSSDD (partly)
>      <<operation name="cEntSing" qname="operNS:services.cEntSing" xmlns:operNS="http://services"
returnQName="cEntSingReturn" returnType="rtns:string" xmlns:rtns="http://services" >
>        <parameter name="provinc"   type="tns:string" xmlns:tns=""/>
>        <parameter name="municip"   type="tns:string" xmlns:tns=""/>
>        <parameter name="entidco"   type="tns:string" xmlns:tns=""/>
>        <parameter name="entidsi"   type="tns:string" xmlns:tns=""/>
>      </operation>
> Any ideas what could be wrong here?
> Diego Sanchez

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message