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.
- Changing PortTypes
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Port Types -> AddNumbersPortType section
- Uncheck Use Default checkbox next to Java Class textfield and set the name to Add
- Uncheck Enable Wrapper Style checkbox
- 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.
- Changing Port Type Operations
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Port Type Operations -> oneWayInt section
- Uncheck Use Default checkbox next to Java Method Name textfield and set it to storeInt
- Check Enable Wrapper Style checkbox
- 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
- Changing Port Type Faults
- Expand Port Type Faults -> AddNumbersFault section
- Uncheck Use Default checkbox next to Java Class textfield and set the name to AddFault
- 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
- Changing Bindings
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Bindings -> AddNumbersBinding section
- Check Enable MIME Content checkbox
- 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
- Changing Binding Operations
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Binding Operations -> oneWayInt section
- Uncheck Enable MIME Content checkbox
- 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
- Changing Services
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Services -> AddNumbersPortService section
- Uncheck Use Default checkbox next to Java Class textfield and set the name to AddService
- 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
- Changing Ports
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Ports -> AddNumbersPortType section
- Uncheck Use Default checkbox next to Java Class textfield and set the name to AddPort
- 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
- Changing Global Customization
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Global Customization section
- Uncheck Use Default checkbox next to Package Name textfield and set the name to org.mycompany.ws
- Uncheck Enable Wrapper Style checkbox
- Check Enable MIME Content checkbox
- Press "OK" button to close the dialog
- {{{1}}}
- Changing External Binding Files
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand External Binding Filas section
- Add binding file using Add button
- 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.
- General Customizations
- 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
- Changing package name
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Global Customization section
- 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.
- Creating Web Service Provider
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Ports -> AddNumbersPort section
- Check Use Provider Interface checkbox
- 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.
- Creating asynchronous operation
- Open Edit Web Service Attributes -> WSDL Customization editor
- Expand Global Customization section
- Check Enable Asynchronous Client checkbox
- 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

