[ 
https://issues.apache.org/jira/browse/AXIS-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580696#action_12580696
 ] 

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:sequence>
      <xs:element name="objectVersion" type="xs:string" minOccurs="0" 
maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="objectId" type="xs:long" use="optional">
    </xs:attribute>
  </xs:complexType>

WSDL2Java creates the following constructor for this abstract base class:

public abstract class RootEntity  implements java.io.Serializable {

...
    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:complexContent>
      <xs:extension base="upc-cdm-common-root:RootEntity">
        <xs:sequence>
          <xs:element name="description" type="xs:string" minOccurs="0" 
maxOccurs="1" />
          <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" 
/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

... 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) {
        super(
            objectId,                          // Wrong order of superclass 
constructor parameters
            objectVersion);
        this.description = description;
        this.name = name;
    }

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

> Problem Parameter order 
> ------------------------
>
>                 Key: AXIS-2636
>                 URL: https://issues.apache.org/jira/browse/AXIS-2636
>             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
> CODE
> 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="http://www.w3.org/2001/XMLSchema"/>
>        <parameter name="municip"   type="tns:string" 
> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>        <parameter name="entidco"   type="tns:string" 
> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>        <parameter name="entidsi"   type="tns:string" 
> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>      </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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to