TS 60 CustomizationEditor

WSDL Customization Editor Test Specification for "NetBeans 6.5"

Author: Lukas Jungmann
Version: 1.1
Estimated time: 2 hours
Last update: 11/6/2008
Introduction: This test specification covers the WSDL customization support in the IDE.
Comments: see also Asynchronous JAX-WS Web Service Client End-to-End Scenario

Contents


Test suite: Customization of WSDL in Web Service from WSDL scenario

Purpose: Check modification of WSDL according to actions in the UI
Setup: Java EE 5 based Web project or EJB module with a ws.NumbersImpl web service created from WSDL file.

  1. Changing PortTypes
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Port Types -> AddNumbersPortType section
    3. Uncheck Use Default checkbox next to Java Class textfield and set the name to Add
    4. Uncheck Enable Wrapper Style checkbox
    5. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<portType name="AddNumbersPortType">

   <operation...>
       ...
   </operation
</portType>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<portType name="AddNumbersPortType">
    <operation...>
        ...
    </operation>
    <jaxws:bindings>
        <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
        <jaxws:class name="AddPortType"/>
    </jaxws:bindings>
</portType>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created. 
  1. Changing Port Type Operations
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Port Type Operations -> oneWayInt section
    3. Uncheck Use Default checkbox next to Java Method Name textfield and set it to storeInt
    4. Check Enable Wrapper Style checkbox
    5. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<portType name="AddNumbersPortType">

   ...
   <operation name="oneWayInt">
       <input message="tns:oneWayInt" />
   </operation>
   ...
</portType>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<portType name="AddNumbersPortType">
    ...
    <operation name="oneWayInt">
        <input message="tns:oneWayInt" />
        <jaxws:bindings>
            <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
            <jaxws:method name="storeInt"/>
        </jaxws:bindings>
    </operation>
    ...
</portType>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Port Type Faults
    1. Expand Port Type Faults -> AddNumbersFault section
    2. Uncheck Use Default checkbox next to Java Class textfield and set the name to AddFault
    3. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<portType name="AddNumbersPortType">

   <operation name="addNumbers">
       <input message="tns:addNumbers" name="add"/>
       <output message="tns:addNumbersResponse" name="addResponse"/>
       <fault name="addNumbersFault" message="tns:addNumbersFault"/>
   </operation>
   ...
</portType>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<portType name="AddNumbersPortType">
    <operation name="addNumbers">
        <input message="tns:addNumbers" name="add"/>
        <output message="tns:addNumbersResponse" name="addResponse"/>
        <fault name="addNumbersFault" message="tns:addNumbersFault">
        <jaxws:bindings>
            <jaxws:class name="AddFault"/>
        </jaxws:bindings>
        </fault>
    </operation>
    ...
</portType>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Bindings
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Bindings -> AddNumbersBinding section
    3. Check Enable MIME Content checkbox
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<binding name="AddNumbersBinding" type="tns:AddNumbersPortType">

   <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
   <operation ...>
       ...
   </operation>
</binding>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
    <jaxws:bindings>
        <jaxws:enableMIMEContent>true</jaxws:enableMIMEContent>
    </jaxws:bindings>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <operation ...>
        ...
    </operation>
</binding>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Binding Operations
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Binding Operations -> oneWayInt section
    3. Uncheck Enable MIME Content checkbox
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<binding name="AddNumbersBinding" type="tns:AddNumbersPortType">

   <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
   ...
   <operation name="oneWayInt">
       <soap:operation soapAction="" />
       <input>
           <soap:body use="literal" />
       </input>
   </operation>
</binding>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    ...
    <operation name="oneWayInt">
        <jaxws:bindings>
            <jaxws:enableMIMEContent>false</jaxws:enableMIMEContent>
        </jaxws:bindings>
        <soap:operation soapAction="" />
        <input>
            <soap:body use="literal" />
        </input>
    </operation>
</binding>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Services
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Services -> AddNumbersPortService section
    3. Uncheck Use Default checkbox next to Java Class textfield and set the name to AddService
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<service name="AddNumbersService">

   <port...>
       ...
   </port>
</service>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<service name="AddNumbersService">
    <port...>
        ...
    </port>
    <jaxws:bindings>
        <jaxws:class name="AddService"/>
    </jaxws:bindings>
</service>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Ports
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Ports -> AddNumbersPortType section
    3. Uncheck Use Default checkbox next to Java Class textfield and set the name to AddPort
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<service name="AddNumbersService">

   <port name="AddNumbersPort" binding="tns:AddNumbersBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL" />
   </port>
   ...
</service>
in local WSDL (placed in Configuration Files -> xml-resources -> web-services -> NumbersImpl -> wsdl) is changed to
<service name="AddNumbersService">
    <port name="AddNumbersPort" binding="tns:AddNumbersBinding">
        <soap:address location="REPLACE_WITH_ACTUAL_URL" />
        <jaxws:bindings>
            <jaxws:method name="AddPort"/>
        </jaxws:bindings>
    </port>
    ...
</service>
,
old implementation class is renamed to NumbersImpl.java.old and new one is created 
  1. Changing Global Customization
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Global Customization section
    3. Uncheck Use Default checkbox next to Package Name textfield and set the name to org.mycompany.ws
    4. Uncheck Enable Wrapper Style checkbox
    5. Check Enable MIME Content checkbox
    6. Press "OK" button to close the dialog
    • {{{1}}}
  2. Changing External Binding Files
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand External Binding Filas section
    3. Add binding file using Add button
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT: binding file is copied into the project (relative path to it from the wsdl location is: ../bindings/ws-binding_TS_60_CustomizationEditor.xml)
and refreshed web service implementation class has renamed parameters to a and b 


Test suite: Customization of WSDL in Web Service client scenario

Purpose: Check modification of WSDL according to actions in the UI
Setup: Java EE 5 based Web project, EJB or Application client module or Java SE application with a web service client for the web service created from WSDL file in a web project.

  1. General Customizations
    1. perform test cases 1-7 and 9 from previous test suite
    • EXPECTED RESULT: local WSDL (now placed in Configuration Files -> xml-resources -> web-service-references -> AddNumbersService -> wsdl -> ... -> AddNumbersService.wsdl)
is always modified in the same way as is described in previous test suite 
  1. Changing package name
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Global Customization section
    3. Check Use Default checkbox next to Package Name textfield
    • {{{1}}}


Test suite: Creating Provider based Web Service

Purpose: Check creation of Provider based Web Service
Setup: Java EE 5 based Web project or EJB module with a ws.NumbersImpl web service created from WSDL file.

  1. Creating Web Service Provider
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Ports -> AddNumbersPort section
    3. Check Use Provider Interface checkbox
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT: Followin web service implementation class is generated:

package ws;

import javax.xml.transform.Source; import javax.xml.ws.Service.Mode; import javax.xml.ws.ServiceMode; import javax.xml.ws.WebServiceProvider;

@ServiceMode(value = Mode.PAYLOAD) @WebServiceProvider(

   wsdlLocation = "WEB-INF/wsdl/NumbersImpl/AddNumbers_TS_60_CustomizationEditor.wsdl",
   serviceName = "AddNumbersService",
   targetNamespace = "http://duke.org",
   portName = "AddNumbersPort")

public class NumbersImpl implements javax.xml.ws.Provider<Source> {

   public NumbersImpl() {
   }
   public Source invoke(Source source) {
       //TODO implement this method
       return null;
   }

}


Test suite: Creating Asynchronous Web Service client

Purpose: Check creation of Asynchronous Web Service client
Setup: Java EE 5 based Web project, EJB or Application client module or Java SE application with a web service client for the web service created from WSDL file in a web project.

  1. Creating asynchronous operation
    1. Open Edit Web Service Attributes -> WSDL Customization editor
    2. Expand Global Customization section
    3. Check Enable Asynchronous Client checkbox
    4. Press "OK" button to close the dialog
    • EXPECTED RESULT:

<definitions ...>

   ...
   </service>

</definitions>


in local WSDL (placed in Configuration Files -> xml-resources -> web-service-references -> AddNumbersService -> wsdl -> ... -> AddNumbersService.wsdl) is changed to
<definitions ...>
    ...
    </service>
    <jaxws:bindings>
        <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
    </jaxws:bindings>
</definitions>
,
and two new operations (addNumbers (Async Polling) and addNumbers (Async Callback)) are visible under the web service node in project UI 


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo