You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alessio Soldano (JIRA)" <ji...@apache.org> on 2009/03/12 18:26:50 UTC

[jira] Created: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Missing parameterOrder attribute in java2wsdl generated RPC wsdls
-----------------------------------------------------------------

                 Key: CXF-2110
                 URL: https://issues.apache.org/jira/browse/CXF-2110
             Project: CXF
          Issue Type: Sub-task
          Components: Tooling
    Affects Versions: 2.1.4
            Reporter: Alessio Soldano
            Assignee: Alessio Soldano


This is related to https://jira.jboss.org/jira/browse/JBWS-2528

java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
For instance for a method like this:

@WebMethod
   public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
         @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
         @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
         throws NameException
   {
      return "Hello " + name;
   }

we get this portType:

 <wsdl:portType name="JBWS2528Endpoint">
    <wsdl:operation name="hello3">
      <wsdl:input name="hello3" message="tns:hello3">
    </wsdl:input>
      <wsdl:output name="hello3Response" message="tns:hello3Response">
    </wsdl:output>
      <wsdl:fault name="NameException" message="tns:NameException">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>


instead of

 <wsdl:portType name="JBWS2528Endpoint">
    <wsdl:operation name="hello3" parameterOrder="id Name Employee">
      <wsdl:input name="hello3" message="tns:hello3">
    </wsdl:input>
      <wsdl:output name="hello3Response" message="tns:hello3Response">
    </wsdl:output>
      <wsdl:fault name="NameException" message="tns:NameException">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>

This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Posted by "Alessio Soldano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681409#action_12681409 ] 

Alessio Soldano commented on CXF-2110:
--------------------------------------

The provided patch solved the issue. Please evaluate its integration in the CXF sources. I've run the whole testsuite coming with 2.1.4 src distribution and I see 5 failures only because of testcases that would need to be fixed too as they compare the generated wsdl with wsdl coming from files (and the latter do not have the parameterOrder attribute).

> Missing parameterOrder attribute in java2wsdl generated RPC wsdls
> -----------------------------------------------------------------
>
>                 Key: CXF-2110
>                 URL: https://issues.apache.org/jira/browse/CXF-2110
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Tooling
>    Affects Versions: 2.1.4
>            Reporter: Alessio Soldano
>            Assignee: Alessio Soldano
>         Attachments: CXF-2110.txt
>
>
> This is related to https://jira.jboss.org/jira/browse/JBWS-2528
> java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
> For instance for a method like this:
> @WebMethod
>    public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
>          @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
>          @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
>          throws NameException
>    {
>       return "Hello " + name;
>    }
> we get this portType:
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> instead of
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3" parameterOrder="id Name Employee">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Posted by "Alessio Soldano (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano updated CXF-2110:
---------------------------------

    Attachment: CXF-2110.txt

Attaching a patch to add the parameterOrder attribute to the generated (RPC) wsdl.

> Missing parameterOrder attribute in java2wsdl generated RPC wsdls
> -----------------------------------------------------------------
>
>                 Key: CXF-2110
>                 URL: https://issues.apache.org/jira/browse/CXF-2110
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Tooling
>    Affects Versions: 2.1.4
>            Reporter: Alessio Soldano
>            Assignee: Alessio Soldano
>         Attachments: CXF-2110.txt
>
>
> This is related to https://jira.jboss.org/jira/browse/JBWS-2528
> java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
> For instance for a method like this:
> @WebMethod
>    public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
>          @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
>          @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
>          throws NameException
>    {
>       return "Hello " + name;
>    }
> we get this portType:
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> instead of
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3" parameterOrder="id Name Employee">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2110.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.5
                   2.0.11

Patch (with changes) applied.  Thanks!

> Missing parameterOrder attribute in java2wsdl generated RPC wsdls
> -----------------------------------------------------------------
>
>                 Key: CXF-2110
>                 URL: https://issues.apache.org/jira/browse/CXF-2110
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Tooling
>    Affects Versions: 2.1.4
>            Reporter: Alessio Soldano
>            Assignee: Alessio Soldano
>             Fix For: 2.0.11, 2.1.5
>
>         Attachments: CXF-2110.txt
>
>
> This is related to https://jira.jboss.org/jira/browse/JBWS-2528
> java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
> For instance for a method like this:
> @WebMethod
>    public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
>          @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
>          @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
>          throws NameException
>    {
>       return "Hello " + name;
>    }
> we get this portType:
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> instead of
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3" parameterOrder="id Name Employee">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Posted by "Alessio Soldano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681647#action_12681647 ] 

Alessio Soldano commented on CXF-2110:
--------------------------------------

Hi Daniel,
yes, the modified version is fine for me. And I agree, when there aren't any in/out and out params, the part order should be enough.
Thanks for evaluating the patch.

> Missing parameterOrder attribute in java2wsdl generated RPC wsdls
> -----------------------------------------------------------------
>
>                 Key: CXF-2110
>                 URL: https://issues.apache.org/jira/browse/CXF-2110
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Tooling
>    Affects Versions: 2.1.4
>            Reporter: Alessio Soldano
>            Assignee: Alessio Soldano
>         Attachments: CXF-2110.txt
>
>
> This is related to https://jira.jboss.org/jira/browse/JBWS-2528
> java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
> For instance for a method like this:
> @WebMethod
>    public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
>          @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
>          @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
>          throws NameException
>    {
>       return "Hello " + name;
>    }
> we get this portType:
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> instead of
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3" parameterOrder="id Name Employee">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2110) Missing parameterOrder attribute in java2wsdl generated RPC wsdls

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681458#action_12681458 ] 

Daniel Kulp commented on CXF-2110:
----------------------------------


Alessio,

Can you try:

    private void setParameterOrder(Method method, Class[] paramClasses, OperationInfo op) {
        if (isRPC(method)) {
            List<String> paramOrdering = new LinkedList<String>();
            boolean hasOut = false;
            for (int j = 0; j < paramClasses.length; j++) {
                if (Exchange.class.equals(paramClasses[j])) {
                    continue;
                }
                if (isInParam(method, j)) {
                    paramOrdering.add(getInPartName(op, method, j).getLocalPart());
                    if (isOutParam(method, j)) {
                        hasOut = true;
                    }
                } else if (isOutParam(method, j)) {
                    hasOut = true;
                    paramOrdering.add(getOutPartName(op, method, j).getLocalPart());
                }
            }
            if (!paramOrdering.isEmpty() && hasOut) {
                op.setParameterOrdering(paramOrdering);
            }
        }
    }


Basically, if there aren't any in/out or out params, there shouldn't be any need to set the parameter order.   Right?   The above change takes that into account.

> Missing parameterOrder attribute in java2wsdl generated RPC wsdls
> -----------------------------------------------------------------
>
>                 Key: CXF-2110
>                 URL: https://issues.apache.org/jira/browse/CXF-2110
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Tooling
>    Affects Versions: 2.1.4
>            Reporter: Alessio Soldano
>            Assignee: Alessio Soldano
>         Attachments: CXF-2110.txt
>
>
> This is related to https://jira.jboss.org/jira/browse/JBWS-2528
> java2wsdl does not generate the parameterOrder attribute in the wsdl portType/operation element. This is required to preserve the original method signature of a webmethod in cases where soapHeader and IN/OUT parameters are used at the same time.
> For instance for a method like this:
> @WebMethod
>    public String hello3(@WebParam(name = "id", targetNamespace = "hello3/Name", header = true) String name,
>          @WebParam(name = "Name", mode = WebParam.Mode.OUT) Holder<Name> name2,
>          @WebParam(name = "Employee", mode = WebParam.Mode.INOUT) Holder<Employee> employee)
>          throws NameException
>    {
>       return "Hello " + name;
>    }
> we get this portType:
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> instead of
>  <wsdl:portType name="JBWS2528Endpoint">
>     <wsdl:operation name="hello3" parameterOrder="id Name Employee">
>       <wsdl:input name="hello3" message="tns:hello3">
>     </wsdl:input>
>       <wsdl:output name="hello3Response" message="tns:hello3Response">
>     </wsdl:output>
>       <wsdl:fault name="NameException" message="tns:NameException">
>     </wsdl:fault>
>     </wsdl:operation>
>   </wsdl:portType>
> This is relevant when doing java -> wsdl -> java (using CXF tools) and expecting the generated endpoint interface to be the same as the initial one. This issue was revealed when running the JavaEE 5 CTS TCK using JBossWS-CXF and configuring the jws/webparam3 reverse test. Without the parameterOrder attribute, a different interface is generated and the client test does not compile because of that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.