Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The following example illustrates the requirement from Geronimo of having the same name the request elements. Look for the three occurences of myOperation".

Code Block
xml
xml
borderStylesolidxml
<wsdl:definitions targetNamespace="http://myService.com/service"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://myService.com/service"
        xmlns:types="http://myService.com/service/types">
    
    <wsdl:types>
        <xsd:schema targetNamespace="http://myService.com/service/types">
            <xsd:element name="myOperation">...</xsd:element>
            <xsd:element name="myOperationResponse">...</xsd:element>
        </xsd:schema>
    </wsdl:types>

    <wsdl:message name="myOperationRequest">
        <wsdl:part element="types:myOperation" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="myOperationResponse">
        <wsdl:part element="types:myOperationResponse" name="result"/>
    </wsdl:message>

    <wsdl:portType name="myServicePortType">
        <wsdl:operation name="myOperation">
            <wsdl:input message="tns:myOperationRequest"
                    name="myOperationRequest"/>
            <wsdl:output message="tns:myOperationResponse"
                    name="myOperationResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    ...
</wsdl:definitions>

...

In addition to the compiled Java classes and the previously mentioned WSDL and JAXP-RPC mapping files the WEB-INF directory of the archive contains standard web.xml and webservices.xml deployment descriptors and a descriptor specific to JBoss jboss-web.xml. The JBoss deployment descriptor is illustrated in the following example.

Code Block
xml
xml
borderStylesolid
titlejboss-web.xmlxml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC
        "-//JBoss//DTD Web Application 2.3//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">

<jboss-web>
    <context-root>/webservices</context-root>
</jboss-web>

...

The Search a Phone Directory Web services sample application uses WSDL names convention supported by both servers. Therefore the only thing that you need to do prior to deploy the application on Geronimo is to replace the deployment descriptor specific to JBoss with one specific to Geronimo. The geronimo-web.xml file is located in the <webservices_home>/web/WEB-INF directory and its contents is listed below.

Code Block
xml
xml
borderStylesolid
titlegeronimo-web.xmlxml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/web" 
        configId="com/ibm/j2g/webservices.war">

    <context-root>/webservices</context-root>

</web-app>

...