Hi All,

I wanted to develop a service which take in 3 parameters. But the params
should come from a class.

package com.accenture.apsp.adapter;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import com.accenture.apsp.adapter.InputNums;

@WebService
public interface CXFClient {
        @WebMethod
        public String callAddTwoNumbers(@WebParam(name="Input_Nums") InputNums
theNumbers);
}

InputNums  is a class Please see below.

package com.accenture.apsp.adapter;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "Input_Nums", propOrder = {
            "fNumber", "sNumber", "operation"
})
public class InputNums implements Serializable {

        private static final long serialVersionUID = -7838175521863324639L;

        @XmlElement(name = "fNumber", required = true)
        String fNumber;
        @XmlElement(name = "sNumber", required = true)
        String sNumber;
        @XmlElement(name = "operation", required = true)
        String operation;

        public String getfNumber() {
                return fNumber;
        }
        public void setfNumber(String fNumber) {
                this.fNumber = fNumber;
        }
        public String getsNumber() {
                return sNumber;
        }
        public void setsNumber(String sNumber) {
                this.sNumber = sNumber;
        }
        public String getOperation() {
                return operation;
        }
        public void setOperation(String operation) {
                this.operation = operation;
        }
}

When I deploy and run the service and Test using SOAP I am seeing the
following

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:adap="http://adapter.apsp.accenture.com/";>
   <soapenv:Header/>
   <soapenv:Body>
      <adap:callAddTwoNumbers>
         
         <Input_Nums>?</Input_Nums>
      </adap:callAddTwoNumbers>
   </soapenv:Body>
</soapenv:Envelope>

I wanted to see as below

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:adap="http://adapter.apsp.accenture.com/";>
   <soapenv:Header/>
   <soapenv:Body>
      <adap:callAddTwoNumbers>
         
         <Input_Nums>
            <First_Num>?</First_Num> 
           <Second_Num>?</Second_Num>
            <Operation>?</Operation>
            </Input_Nums>
      </adap:callAddTwoNumbers>
   </soapenv:Body>
</soapenv:Envelope>


All three should be mandatory.


Thanks in advance.




--
View this message in context: 
http://cxf.547215.n5.nabble.com/How-can-I-see-parameters-from-a-class-tp5735398.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to