Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Setting up the Deployment Descriptor and Deployment Plan

  1. Expand WEB-INF/web.xml and add the following code
    Code Block
    titleweb.xml
    borderStylesolid
    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:calc="urn:geronimo-samples-jws"
    xmlns="http://java.sun.com/xml/ns/javaee"
    version="2.5">
    <servlet>
    <display-name>CalculatorService</display-name>
    <servlet-name>CalculatorService</servlet-name>
    <servlet-class>
    org.apache.geronimo.samples.jws.CalculatorService
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>CalculatorService</servlet-name>
    <url-pattern>/calculator</url-pattern>
    </servlet-mapping>
    <service-ref>
                <service-ref-name>services/Calculator</service-ref-name>
                <service-interface>javax.xml.ws.Service</service-interface>
                <wsdl-file>WEB-INF/CalculatorService.wsdl</wsdl-file>
            </service-ref>
    </web-app>
    
  2. Similarly double click geronimo-web.xml and add the following code.
    Code Block
    titlegeronimo-web.xml
    borderStylesolid
    
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:moduleId>
    <dep:groupId>org.apache.geronimo.samples.jws</dep:groupId>
    <dep:artifactId>Calculator</dep:artifactId>
    <dep:version>1.0</dep:version>
    <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
    </dep:dependencies>
    </dep:environment>
    <context-root>/jaxws-calculator-1.0</context-root>
    <service-ref>
       <service-ref-name>services/Calculator</service-ref-name>
       <port>
          <port-name>CalculatorPort</port-name>
          <protocol>http</protocol>
          <host>localhost</host>
          <port>8080</port>
          <uri>/jaxws-calculator/calculator</uri>
       </port>
     </service-ref>
    </web-app>
    

Deploy and Run