You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Björn (Created JIRA)" <ji...@apache.org> on 2012/03/24 19:52:25 UTC

[jira] [Created] (CXF-4201) Error if two methods start with a parameter of the same name

Error if two methods start with a parameter of the same name
------------------------------------------------------------

                 Key: CXF-4201
                 URL: https://issues.apache.org/jira/browse/CXF-4201
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.5.2
         Environment: Java 6, Jetty, Java 5, Glassfish 2
            Reporter: Björn


I have two methods in my webservice that start with the same parameter: 

@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CXF-4201) Error if two methods start with a parameter of the same name

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

Daniel Kulp commented on CXF-4201:
----------------------------------


Every operation in the wsdl should have a single part, yes.  However, most of the toolkits can allow that to be unwrapped into multiple parameters.   In your case, just remove the BARE flags from the annotations and let the wsdl be generated in wrapped mode.   
                
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>            Assignee: Daniel Kulp
>              Labels: jax-ws,
>         Attachments: cxfbug.zip, cxfbug_client.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).
> I have attached cxfbug.zip and cxfbug_client.zip which are test projects where you can start the service with maven and then execute the default client against it, also with maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Attachment: cxfbug.zip

unzip, then with "mvn compile jetty:run" you can start the webservice on http://localhost:8080/cxfbug/services

WSDL at http://localhost:8080/cxfbug/services/dummy?wsdl
                
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip
>
>
> I have two methods in my webservice that start with the same parameter: 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Description: 
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).

I have attached cxfbug.zip and cxfbug_client.zip which are test projects where you can start the service with maven and then execute the default client against it, also with maven.



  was:
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



    
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip, cxfbug_client.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).
> I have attached cxfbug.zip and cxfbug_client.zip which are test projects where you can start the service with maven and then execute the default client against it, also with maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CXF-4201) Error if two methods start with a parameter of the same name

Posted by "Björn (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238895#comment-13238895 ] 

Björn commented on CXF-4201:
----------------------------

Thank you for your reply. Do I read it correctly that in document-literal soap, every method should accept only one parameter? That is I should have written my methods in such a way that they accept one wrapper object as parameter which contains all the other parameters? I wasn't aware of that - in fact I struggled for a long time to make jax-ws/soap behave in such a way as to not generate zillions of extra classes.

Thanks for the info!
                
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>            Assignee: Daniel Kulp
>              Labels: jax-ws,
>         Attachments: cxfbug.zip, cxfbug_client.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).
> I have attached cxfbug.zip and cxfbug_client.zip which are test projects where you can start the service with maven and then execute the default client against it, also with maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Attachment: cxfbug_client.zip

Unzip, cd into directory, with the service running (see other attachment) execute 'mvn clean compile exec:java -Dexec.mainClass="dummy.Dummy_DummyPort_Client"'

This runs the default client that is generated by the maven plugin from the WSDL the service provides.
                
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip, cxfbug_client.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Description: 
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

{quote}
@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}
{quote}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



  was:
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

<pre>
@WebService(targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;, name = &quot;Dummy&quot;)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.lang.String badParam,
        @WebParam(partName = &quot;anotherParam&quot;, name = &quot;anotherParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.math.BigInteger anotherParam


    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.lang.String badParam
    );
}

</pre>


This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



    
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> {quote}
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> {quote}
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CXF-4201) Error if two methods start with a parameter of the same name

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

Daniel Kulp resolved CXF-4201.
------------------------------

    Resolution: Won't Fix
      Assignee: Daniel Kulp


Fixing this would require MASSIVE changes in CXF to buffer the parts coming in, break streaming, recalculate potential operations, etc...   

In addition, such constructs are not WSI-Basic Profile compliant.   Per the profile (section 4.4.1): "For document-literal bindings, the Profile requires that at most one part, abstractly defined with the element attribute, be serialized into the soap:Body element."  In this case, two elements are being serialized into the soap:Body and is thus not compliant.

Furthur, the WSI-BP spec states:  "The profile defines the "operation signature" to be the fully qualified name of the child element of SOAP body of the SOAP input message described by an operation in a WSDL binding."   With only a single element allowed, this makes it simple for frameworks like CXF to map the element to the given operation.   

In anycase, as this issue is outside of the BasicProfile compliance, it's not something we're likely to address.




                
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>            Assignee: Daniel Kulp
>              Labels: jax-ws,
>         Attachments: cxfbug.zip, cxfbug_client.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).
> I have attached cxfbug.zip and cxfbug_client.zip which are test projects where you can start the service with maven and then execute the default client against it, also with maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Description: 
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

<pre>
@WebService(targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;, name = &quot;Dummy&quot;)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.lang.String badParam,
        @WebParam(partName = &quot;anotherParam&quot;, name = &quot;anotherParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.math.BigInteger anotherParam


    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
        java.lang.String badParam
    );
}

</pre>


This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



  was:
I have two methods in my webservice that start with the same parameter: 

@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



    
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> <pre>
> @WebService(targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;, name = &quot;Dummy&quot;)
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
>         java.lang.String badParam,
>         @WebParam(partName = &quot;anotherParam&quot;, name = &quot;anotherParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
>         java.math.BigInteger anotherParam
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = &quot;badParam&quot;, name = &quot;badParam&quot;, targetNamespace = &quot;<a href="http://dummy/">http://dummy/</a>&quot;)
>         java.lang.String badParam
>     );
> }
> </pre>
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CXF-4201) Error if two methods start with a parameter of the same name

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

Björn updated CXF-4201:
-----------------------

    Description: 
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



  was:
I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 

{quote}
@WebService(targetNamespace = "http://dummy/", name = "Dummy")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface Dummy {

    @WebMethod
    public void method(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam,
        @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
        java.math.BigInteger anotherParam
       
       
    );


    @WebMethod
    public void anotherMethod(
        @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
        java.lang.String badParam
    );
}
{quote}

This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)

If I try to call those methods (I call them with the default test client generated with the Maven plugin).



    
> Error if two methods start with a parameter of the same name
> ------------------------------------------------------------
>
>                 Key: CXF-4201
>                 URL: https://issues.apache.org/jira/browse/CXF-4201
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>         Environment: Java 6, Jetty, Java 5, Glassfish 2
>            Reporter: Björn
>              Labels: jax-ws,
>         Attachments: cxfbug.zip
>
>
> I have two methods in my webservice that start with the same parameter (but one has two parameters, I know there is a general SOAP issue if two methods have identical signature): 
> @WebService(targetNamespace = "http://dummy/", name = "Dummy")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface Dummy {
>     @WebMethod
>     public void method(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam,
>         @WebParam(partName = "anotherParam", name = "anotherParam", targetNamespace = "http://dummy/")
>         java.math.BigInteger anotherParam
>        
>        
>     );
>     @WebMethod
>     public void anotherMethod(
>         @WebParam(partName = "badParam", name = "badParam", targetNamespace = "http://dummy/")
>         java.lang.String badParam
>     );
> }
> This causes a javax.xml.ws.soap.SOAPFaultException: Message part {http://dummy/}anotherParam was not recognized.  (Does it exist in service WSDL?)
> If I try to call those methods (I call them with the default test client generated with the Maven plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira