Multiple Parameters & JAXWS 
----------------------------

         Key: XFIRE-360
         URL: http://jira.codehaus.org/browse/XFIRE-360
     Project: XFire
        Type: Bug

  Components: JAX-WS  
    Versions: 1.1-beta-1    
    Reporter: Randy Secrist
 Assigned to: Dan Diephouse 
     Fix For: 1.1-beta-1


I created a simple POJO annotated with jaxws as my service:
{{monspaced}}
package blah.Calculator

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

/**
 * Can find this under:
 * http://localhost:8080/services/Calculator?wsdl
 */
@WebService (
            targetNamespace="http://localhost:8080/";
)
public class Calculator {

        public Calculator() {
        }

    @WebMethod(operationName="add")
    @WebResult(name="sum")
        public int addOp(@WebParam(name="X", header=true) int x, 
@WebParam(name="Y", header=true) int y) {
            int z = x + y ;
            System.out.println(x + "+" + y +" = " + z);
            return z;
    }
}
{{monspaced}}
        public void testCallServer() throws Throwable {         
                Client client = new Client(new 
URL("http://localhost:8080/services/Calculator?wsdl";));
                Object[] results = client.invoke("addOp", new Object[] { 3, 2 
});
                // Service returns a double of the currency conversion rate.
                assertTrue((Integer) results[0] == 5);
        }
{{monspaced}}
  <service>
    <name>Calculator</name>
    <namespace>http://localhost:8080</namespace>
    <serviceClass>blah.Calculator</serviceClass>
  </service>

{{monspaced}}

The response was 6 not 5 as expected.  (first parameter is duplicated).  This 
does not happen if I don't use jaxws.  (Verified this using the latest 
snapshot, as well as the SVN source.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to