axis web service parameters lose their names.

Discussion in 'Java' started by jeremy, Jul 3, 2007.

  1. jeremy

    jeremy Guest

    I have written a method that I expose as an axis web service. The
    parameter names in my java code do not get exported correctly to the
    wsdl and I don't know why.

    The java method syntax looks like:

    public void UpdateIt(long lId, bool bGetBooleanFields)
    {
    }

    and the wsdl looks like (snippets):

    <wsdl:eek:peration name="UpdateIt" parameterOrder="in0 in1">
    <wsdl:input message="impl:UpdateItRequest" name="UpdateItRequest" /
    >

    <wsdl:eek:utput message="impl:UpdateItResponse"
    name="UpdateItResponse" />
    </wsdl:eek:peration>

    <wsdl:message name="UpdateItRequest">
    <wsdl:part name="in0" type="xsd:long" />
    <wsdl:part name="in1" type="xsd:boolean" />
    </wsdl:message>
     
    jeremy, Jul 3, 2007
    #1
    1. Advertising

  2. On Jul 3, 11:56 am, jeremy <> wrote:
    > I have written a method that I expose as an axis web service. The
    > parameter names in my java code do not get exported correctly to the
    > wsdl and I don't know why.
    >
    > The java method syntax looks like:
    >
    > public void UpdateIt(long lId, bool bGetBooleanFields)
    > {
    >
    > }
    >
    > and the wsdl looks like (snippets):
    >
    > <wsdl:eek:peration name="UpdateIt" parameterOrder="in0 in1">
    > <wsdl:input message="impl:UpdateItRequest" name="UpdateItRequest" /
    >
    > <wsdl:eek:utput message="impl:UpdateItResponse"
    > name="UpdateItResponse" />
    > </wsdl:eek:peration>
    >
    > <wsdl:message name="UpdateItRequest">
    > <wsdl:part name="in0" type="xsd:long" />
    > <wsdl:part name="in1" type="xsd:boolean" />
    > </wsdl:message>


    If you examine the .class file you'll discover that the method
    bytecode does not include names for symbols, including parameters.
    You need to annotate the individual method parameters with
    @WebParam(name="foo") or use the corresponding XML configuration in
    order to control the names in the generated WSDL and web service
    invocation mapping.
     
    Owen Jacobson, Jul 3, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jimmy
    Replies:
    3
    Views:
    1,470
    Lau Lei Cheong
    Jun 27, 2005
  2. Replies:
    0
    Views:
    945
  3. hocho888
    Replies:
    1
    Views:
    657
  4. gnewsgroup
    Replies:
    2
    Views:
    528
    gnewsgroup
    Oct 31, 2007
  5. Sfdesigner Sfdesigner
    Replies:
    5
    Views:
    170
    Chris Shea
    Aug 13, 2007
Loading...

Share This Page