You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Raffaele Spazzoli <rs...@imolinfo.it> on 2007/12/19 16:25:08 UTC

problem with @WebParameter

Hi,
I have a problem in generating a wsdl starting fron annotated java
classes.
The problem is that is seems that the @WebParameter annotation is not
processed correctly and so the name of the element in the wsdl is not
correct.
I'm attaching the classes I use for the generation (only classes, I
don't have the sources because this is a server side generation).
I attach also an asm view of the interface class where the annotations
can be seen.
Finally I'm attacching the generated wsdl.
To highlight the problems, here is what happens, starting from this
fragment of annotated interface:

  // access flags 1025
  public abstract
echoValueType(Lit/imolinfo/jbi4corba/test/testprovidercomplex/EchoVT;)Lit/imolinfo/jbi4corba/test/testprovidercomplex/EchoVT;
  @Ljavax/jws/WebMethod;(operationName="echoValueType")
    @Ljavax/jws/WebParam;(name="e") // parameter 0

I get this fragment of wsdl:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:jbi4corba/test-provider-complex"
xmlns:ns1="http://testprovidercomplex.test.jbi4corba.imolinfo.it/"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="urn:jbi4corba/test-provider-complex">
    <xs:import
namespace="http://testprovidercomplex.test.jbi4corba.imolinfo.it/"/>
...
<xs:element name="echoVT" type="ns1:echoVT"/>
...
    <xs:element name="echoValueType">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="echoVT"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="echoValueTypeResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element minOccurs="0" ref="echoVT"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

the ns1:echoVT complex type is defined in another section with
targetnamespace http://testprovidercomplex.test.jbi4corba.imolinfo.it/
The problem is that the requested webparam should be "e" while here it
is echoVT (<xs:element name="echoVT" type="ns1:echoVT"/>, <xs:element
name="e" type="ns1:echoVT"/>).

I've noticed that if I use the same datatype but only one namespace, the
parameter name is interpreted correctly.

Any cloue on how to get the correct behaviour?

thanks
Raffaele