6 Replies Latest reply on Jul 8, 2004 9:46 AM by kris_moens

    Changing in0,in1,... into more proper parameter names

    kris_moens

      Hi,

      is there a way (using Xdoclet) to change the default parameters in0,in1,...
      of a web service EJB-endpoint method to a more proper descriptive name that will appear in the generated WSDL ?

      I've read sth about @jboss-net.wsdd-operation, but an example was missing. The link to the famous Neal Sanche's site http://www.nsdev.org/jboss that everyone advises is also very DEAD.

      Someone out there can help me with this ?

      Thanx

        • 1. Re: Changing in0,in1,... into more proper parameter names
          fheldt

          Do you mean this?

          /**
           * ...
           * @ejb.interface-method
           * @jboss-net.web-method
           * @jboss-net.wsdd-operation returnQName="key"
           */
          public void doSomething(Short key) throws Exception {
          ...
          }
          



          • 2. Re: Changing in0,in1,... into more proper parameter names
            kris_moens

            Thank you for the reply fheldt

            i tried this :

            /**
            * @ejb:interface-method view-type="local"
            * @ejb.interface-method
            * @jboss-net.web-method
            * @jboss-net.wsdd-operation returnQName="firstname"
            */
            public String hello(String firstname) {
            return "hello " + firstname;
            }


            but it still resulted in :

            <wsdl:message name="helloRequest">
            <wsdl:part name="in0" type="xsd:string" />
            </wsdl:message>
            <wsdl:portType name="myWSLocal">
            <wsdl:operation name="hello" parameterOrder="in0">
            <wsdl:input name="helloRequest" message="impl:helloRequest" />
            <wsdl:output name="helloResponse" message="impl:helloResponse" />
            </wsdl:operation>


            where i want to be "in0" replaced by "firstname".

            And more specific how to do this with more than 1 parameter

            Thanx for your reply

            • 3. Re: Changing in0,in1,... into more proper parameter names
              fheldt

              Do you have the xdoclet-module-jboss-net.jar from
              http://prdownloads.sourceforge.net/jboss/xdoclet-module-jboss-net.jar?download ?

              If so, this one doesn't include support for the jboss.wsdd-operation tag. I got it from http://www.nsdev.org/jboss/stories/jboss-net.html

              Don't know if there is another site, where you can got it from. Will have a look later.

              • 4. Re: Changing in0,in1,... into more proper parameter names
                nehring

                Hi fheldt,

                Which version of xdoclet are you using?

                The xdoclet-module-jboss-net.jar was built in October 2003. I'm not sure if it's compatible with xdoclet-1.2.1. Plus, when I explode the xdoclet-module-jboss-net.jar I don't see a "@jboss-net.wsdd-operation" tag.

                What does your generated web-service.xml look like?

                r,
                Lance

                • 5. Re: Changing in0,in1,... into more proper parameter names
                  tperrigo

                  With the following tags/method declaration, I was able to get meaningful parameter names:

                   /**
                   * @param projectRoleId
                   * @return jobId
                   * @ejb:interface-method view-type="remote"
                   * @jboss-net.web-method returnQName="job_id"
                   */
                   public int importRequestsWLMSRequests(int project_id) throws RemoteException {
                  


                  WSDL:
                  - <!-- WSDL created by Apache Axis version: 1.2beta
                  Built on Apr 26, 2004 (01:40:56 PDT)   -->
                  - <wsdl:message name="importRequestsWLMSRequestsResponse">
                    <wsdl:part name="job_id" type="xsd:int" />
                    </wsdl:message>
                  
                  - <wsdl:message name="importRequestsWLMSRequestsRequest">
                    <wsdl:part name="project_id" type="xsd:int" />
                    </wsdl:message>
                  
                  - <wsdl:portType name="RequestImport">
                  + <wsdl:operation name="importRequestsWLMSRequests" parameterOrder="project_id">
                    <wsdl:input message="impl:importRequestsWLMSRequestsRequest" name="importRequestsWLMSRequestsRequest" />
                    <wsdl:output message="impl:importRequestsWLMSRequestsResponse" name="importRequestsWLMSRequestsResponse" />
                    </wsdl:operation>
                  


                  Hope this helps,
                  Tim

                  • 6. Re: Changing in0,in1,... into more proper parameter names
                    kris_moens

                    fheldt,

                    Indeed, i'm using the one jboss provided, not the one from the nsdev site.
                    I hope this site will be available again soon.

                    thanks for the replies

                    Kris