The reason for this is that we use the wsdl4j to parse the wsdl file. and
the wsdl object structure keeps the message parts in a Map. Axis2 gets the
parts objects from this map when generating the XMLSchema part for the
message. Since map does not preserve the object order it picks parts in a
random order.
So the solution is to fix the AXIS2-1930 issue. Then the order can be
specified in parameter order. I will fix it soon.

Amila.

On 1/25/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

I don't think it is the same problem. In fact, parameters seem to get
back in the right order in the generated 'toEnvelope' method. So I don't
know if the change in parameters order is really an issue. As long as
you read the stub code, you can find out what are is stub method
parameters order, but it is not really easy nor user friendly. I wonder
what is the rationale behind this mix (if there is one).

Maxime Jeanmart


Laurent CHARTIER wrote:
> See Jira 1930 [
> https://issues.apache.org/jira/browse/AXIS2-1930?page=com.atlassian.jira
> .plugin.system.issuetabpanels:all-tabpanel ].
> Maybe it could help you.
>
> Laurent CHARTIER
>
>
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 25 janvier 2007 16:13
> À : [email protected]
> Objet : [Axis2] order of parameters in generated adb stub
>
>
> Hi all,
>
> I generated some stubs using WSDL2java tool. Here is the kind of command
>
> I used:
> WSDL2Java -uri wsdlPath -p stub-d adb -s -uw -o outputDir
>
> Now when I compare the generated stub and the wsdl, I see the order of
> parameters has changed:
>
> WSDL:
>  <message name='Vpn_groupAccessService_help'>
>   <part name='Vpn_group_1' type='ns1:Vpn_group'/>
>   <part name='String_2' type='xsd:string'/>
>   <part name='int_3' type='xsd:int'/>
>  </message>
>
> stub:
> public stub.Vpn_groupStub.HelpResponse help(
>     int param1,
>     stub.Vpn_groupStub.Vpn_group param2,
>     java.lang.String param3)
>
> In that case, the int parameter is switched to the first place. By
> reading the code I see the parameters are mapped to the wsdl values in
> 'toEnvelope" methods.
> I need to automate the call to web services based on these stubs. My
> application knows the order of parameters in the wsdl so I'd like to
> know how the parameters are reordered in the stub to call the methods by
>
> reflection. (Of course, that case is simple because all parameters have
> different types, but it is not always as obvious).
> I've searched the web without finding much info about this. An old
> thread says something about alphabetical order, but it doesn't seem to
> be the case here.
>
> Thanks for your help or suggestions,
>
> Best regards,
>
> Maxime
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> Ce message est protégé par les règles relatives au secret des
correspondances. Il est donc établi à destination exclusive de son
destinataire. Celui-ci peut donc contenir des informations confidentielles.
La divulgation de ces informations est à ce titre rigoureusement interdite.
Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur
dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que
toute pièce jointe.
>
> This message is protected by the secrecy of correspondence rules.
Therefore, this message is intended solely for the attention of the
addressee. This message may contain privileged or confidential information,
as such the disclosure of these informations is strictly forbidden. If, by
mistake, you have received this message, please return this message to the
addressser whose e-mail address is written above and destroy this message
and all files attached.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Amila Suriarachchi,
WSO2 Inc.

Reply via email to