Just FYI:  this is per JAX-WS spec.

Section 3.6.1 states:
♦ Conformance (Parameter naming): The javax.jws.WebParam annotation (see 
7.11.4) MAY be used to specify the name of the wsdl:part or XML Schema 
element declaration corresponding to a Java parameter. If both the name 
and partName elements are used in the javax.jws.WebParam annotation then 
the partName MUST be used for the wsdl:part name attribute and the name 
element from the annotation will be ignored. If not specified, the 
default is “argN”, where N is replaced with the zero-based argument 
index. Thus, for instance, the first argument of a method will have a 
default parameter name of “arg0”, the second one “arg1”and so on.


Dan


On Wednesday 25 July 2007 16:56, Christopher Moesel wrote:
> Hi Corey,
>
> If you are doing a JAX-WS Java-first service, you can use the
> @WebParam annotation to specify web parameter names.  It's in the
> documentation guide here:
>
> http://cwiki.apache.org/CXF20DOC/developing-a-service.html#Developinga
>Se [EMAIL PROTECTED]
>
> (tiny url: http://tinyurl.com/yr2q2w)
>
> -Chris
>
> -----Original Message-----
> From: Yeroc [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 25, 2007 4:48 PM
> To: [email protected]
> Subject: WSDL method parameter names?
>
>
> All...
>
> I'm doing Java-first development on a service and the WSDL file being
> generated (I'm using Tomcat v5.5 as my container with the CXFServlet)
> is using arg0, arg1 etc. as the parameter names for my service methods
> rather
> than using the actual parameter name specified in my Java code.  Is
> this a
> known shortcoming or am I doing something wrong?  The WSDL isn't very
> self-documenting with parameter names like this!
>
> Here's an example wsdl snippet:
>
> <xs:element name="moveItem" type="tns:moveItem"/>
>   <xs:complexType name="moveItem">
>   <xs:sequence>
>     <xs:element minOccurs="0" name="arg0" type="xs:string"/>
>     <xs:element minOccurs="0" name="arg1" type="xs:string"/>
>     <xs:element minOccurs="0" name="arg2" type="xs:string"/>
>     <xs:element minOccurs="0" name="arg3" type="xs:dateTime"/>
>     <xs:element minOccurs="0" name="arg4" type="xs:string"/>
>     <xs:element minOccurs="0" name="arg5" type="xs:string"/>
>     <xs:element minOccurs="0" name="arg6" type="xs:string"/>
>   </xs:sequence>
> </xs:complexType>
>
> Thanks,
> Corey

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to