title: How to pass the parameters in wsdl
body: <p>Below class will read the input from parameter and read the corresponding excel sheet, at last it will return the data set from excel.</p>
  
  <pre><code> @WebService 
   public class ReadExcelData { 
  
      @SuppressWarnings( { }) 
      public String nameDisplay(String date, String shiftNo, String userName, 
                      String pwd) throws IOException, PropertyException, JAXBException { 
              String xmlValues = null; 
              System.out.println("Inside the webservice call"); 
              String filename = "D:\\final.xls"; 
              String dateToCheck = date; 
              String shiftNumber = shiftNo; 
              System.out.println("Date--&gt;" + dateToCheck + "Shift number--&gt;" 
                              + shiftNumber); 
              String userNameLogin = userName; 
              String password = pwd; 
              if ((userNameLogin.equalsIgnoreCase("DEVA")) 
                              &amp;&amp; (password.equalsIgnoreCase("DEVA"))) { 
                      FileInputStream file = new FileInputStream(new File(filename)); 
                      HSSFWorkbook workbook = new HSSFWorkbook(file); 
                      HSSFSheet sheet = workbook.getSheetAt(0); 
                      Iterator&lt;Row&gt; rowItr = sheet.iterator(); 
                      while (rowItr.hasNext()) { 
                              HSSFRow row = (HSSFRow) rowItr.next(); 
                              String dateToCheckExcel = row.getCell(0).getStringCellValue(); 
                              String shiftNumberExcel = row.getCell(1).getStringCellValue(); 
                              if (dateToCheckExcel.equalsIgnoreCase(dateToCheck)) { 
                                      if (shiftNumberExcel.equalsIgnoreCase(shiftNumber)) { 
                                              StAnomaliaUTE StAnomaliaUTE = new StAnomaliaUTE(); 
                                              StAnomaliaUTE.setCodStabilimento(row.getCell(2).getStringCellValue()); 
                                              StAnomaliaUTE.setCodModello(row.getCell(3).getStringCellValue()); 
                                              StAnomaliaUTE.setCodVersione(row.getCell(4).getStringCellValue()); 
                                              StAnomaliaUTE.setCodSerie(row.getCell(5).getStringCellValue()); 
                                              StAnomaliaUTE.setCodAreaUnita(row.getCell(6).getStringCellValue()); 
                                              StAnomaliaUTE.setNumUte(row.getCell(7).getStringCellValue()); 
                                              StAnomaliaUTE.setNumLinea(row.getCell(8).getStringCellValue()); 
                                              StAnomaliaUTE.setNumDominio(row.getCell(9).getStringCellValue()); 
                                              StAnomaliaUTE.setCodComponente(row.getCell(10).getStringCellValue()); 
                                              StAnomaliaUTE.setCodColore(row.getCell(11).getStringCellValue()); 
                                              StAnomaliaUTE.setCodAnomalia(row.getCell(12).getStringCellValue()); 
                                              StAnomaliaUTE.setCodPosizione(row.getCell(13).getStringCellValue()); 
                                              StAnomaliaUTE.setCodTipologia(row.getCell(14).getStringCellValue()); 
                                              StAnomaliaUTE.setDataRilevamento(row.getCell(15).getStringCellValue()); 
                                              StAnomaliaUTE.setDataRisoluzione(row.getCell(16).getStringCellValue()); 
                                              StAnomaliaUTE.setNumeroCasi(Integer.parseInt(row.getCell(17).getStringCellValue())); 
                                              StAnomaliaUTE.setTotaleVetture(Integer.parseInt(row.getCell(18).getStringCellValue())); 
                                              DataSet dataSet = new DataSet(); 
                                              dataSet.setDataset(new ArrayList&lt;StAnomaliaUTE&gt;()); 
                                              dataSet.getDataset().add(StAnomaliaUTE); 
                                              xmlValues = DataSetXmlGenerator.getSerializedDataSet(dataSet); 
                                      } 
                              } 
  
                      } 
  
              } 
              return xmlValues; 
  
      } 
    } 
  </code></pre>
  
  <p>This is the main method to publish the webservice</p>
  
  <pre><code>  package com.chrysler.main; 
  
    import java.io.IOException; 
    import javax.xml.bind.JAXBException; 
    import javax.xml.bind.PropertyException; 
    import javax.xml.ws.Endpoint; 
    import com.chrysler.helper.ReadExcelData; 
  
     public class GenerateDataSet { 
  
      /** 
       * @param args 
       */ 
      private static final String WEBSERVICE_PUBLISHED = "Webservice Published"; 
      public static void main(String[] args) throws PropertyException, IOException, JAXBException { 
              System.out.println("Hello"); 
              Endpoint.publish("http://localhost:9111/PFSWebServices/ReadExcel", 
                              new ReadExcelData()); 
              //String finalXml=readExcel.nameDisplay("19900627","2","deva","deva"); 
              //System.out.println("Final Xml is --&gt;&gt;&gt;" +finalXml); 
              System.out.println(WEBSERVICE_PUBLISHED); 
      } 
  
   } 
  
  
   Published URL : http://localhost:9111/PFSWebServices/ReadExcel?wsdl
  </code></pre>
  
  <p>When i hit the URL in browser i got the below XML schema</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
    - &lt;!-- 
     Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. 
      --&gt; 
    - &lt;!-- 
     Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. 
      --&gt; 
    - &lt;definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://helper.chrysler.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://helper.chrysler.com/" name="ReadExcelDataService"&gt; 
    - &lt;types&gt; 
    - &lt;xsd:schema&gt; 
      &lt;xsd:import namespace="http://helper.chrysler.com/" schemaLocation="http://localhost:9111/PFSWebServices/ReadExcel?xsd=1" /&gt; 
      &lt;/xsd:schema&gt; 
      &lt;/types&gt; 
    - &lt;message name="nameDisplay"&gt; 
      &lt;part name="parameters" element="tns:nameDisplay" /&gt; 
      &lt;/message&gt; 
    - &lt;message name="nameDisplayResponse"&gt; 
      &lt;part name="parameters" element="tns:nameDisplayResponse" /&gt; 
      &lt;/message&gt; 
    - &lt;message name="IOException"&gt; 
      &lt;part name="fault" element="tns:IOException" /&gt; 
      &lt;/message&gt; 
    - &lt;message name="PropertyException"&gt; 
      &lt;part name="fault" element="tns:PropertyException" /&gt; 
      &lt;/message&gt; 
    - &lt;message name="JAXBException"&gt; 
      &lt;part name="fault" element="tns:JAXBException" /&gt; 
      &lt;/message&gt; 
    - &lt;portType name="ReadExcelData"&gt; 
    - &lt;operation name="nameDisplay"&gt; 
      &lt;input message="tns:nameDisplay" /&gt; 
      &lt;output message="tns:nameDisplayResponse" /&gt; 
      &lt;fault message="tns:IOException" name="IOException" /&gt; 
      &lt;fault message="tns:PropertyException" name="PropertyException" /&gt; 
      &lt;fault message="tns:JAXBException" name="JAXBException" /&gt; 
      &lt;/operation&gt; 
      &lt;/portType&gt; 
    - &lt;binding name="ReadExcelDataPortBinding" type="tns:ReadExcelData"&gt; 
      &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /&gt; 
    - &lt;operation name="nameDisplay"&gt; 
      &lt;soap:operation soapAction="" /&gt; 
    - &lt;input&gt; 
      &lt;soap:body use="literal" /&gt; 
      &lt;/input&gt; 
    - &lt;output&gt; 
      &lt;soap:body use="literal" /&gt; 
      &lt;/output&gt; 
    - &lt;fault name="IOException"&gt; 
      &lt;soap:fault name="IOException" use="literal" /&gt; 
      &lt;/fault&gt; 
    - &lt;fault name="PropertyException"&gt; 
      &lt;soap:fault name="PropertyException" use="literal" /&gt; 
      &lt;/fault&gt; 
    - &lt;fault name="JAXBException"&gt; 
      &lt;soap:fault name="JAXBException" use="literal" /&gt; 
      &lt;/fault&gt; 
      &lt;/operation&gt; 
      &lt;/binding&gt; 
    - &lt;service name="ReadExcelDataService"&gt; 
    - &lt;port name="ReadExcelDataPort" binding="tns:ReadExcelDataPortBinding"&gt; 
      &lt;soap:address location="http://localhost:9111/PFSWebServices/ReadExcel" /&gt; 
      &lt;/port&gt; 
      &lt;/service&gt; 
      &lt;/definitions&gt; 
  </code></pre>
  
  <p>Now i passed the URL in browser to get the excel data</p>
  
  <pre><code>http://localhost:9111/PFSWebServices/ReadExcel/nameDisplay?date="19900627"&amp;shiftNo="2"&amp;userName="deva"&amp;pwd="deva" 
  </code></pre>
  
  <p>But i'm getting <strong>400 server error</strong></p>
  
  <p>Let me know whether i'm passing the parameter incorrectly???</p>
  
  <p>Please help me to resolve this error.</p>