TS 60 WSIT
WSIT Tooling Test Specification for "NetBeans 6.0"
Author: Lukas Jungmann
Version: 1.0
Last update: 12/07/2007
Introduction: This test specification covers the WSIT support in the IDE.
Comments: To be able to follow steps in this test specification it is required to add -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true to GlassFish start up option to see incoming/outcoming messages in the server's log, add wsit user (group wsit, password changeit) to file realm (GF admin console -> Configuration -> Security -> Realms -> file), download and install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files (version for Java SE 5 or Java SE 6) and import V3 certificates required by WSIT message security into GlassFish (this step should not be required for GlassFish-v2 FCS).
Contents |
Test suite: WS Designer Integration
Purpose: Test enabling/disabling WSIT features exposed in the web service Designer
Setup: Have some web or ejb module project with some simple webservice and some project with a client for this web service
- Enabling MTOM
- Open web service in the design view
- Check Optimize Transfer Of Binary Data (MTOM) checkbox
- Uncheck other checkboxes if they're checked
- Deploy the project with the service
- Refresh the web service client (check also replace local WSDL file)
- Run the project with the web service client
- {{{1}}}
- Enabling Reliable Message Delivery
- Open web service in the design view
- Check Reliable Message Delivery checkbox
- Uncheck other checkboxes if they're checked
- Deploy the project with the service
- Refresh the web service client (check also replace local WSDL file)
- Run the project with the web service client
- EXPECTED RESULT: WSDL of deployed web service contains
<definitions name="Wsit1Service"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
...>
<wsp:UsingPolicy/>
<wsp:Policy wsu:Id="Wsit1PortBindingPolicy">
<wsp:ExactlyOne>
<wsp:All>
<ns1:RMAssertion xmlns:ns1="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"/>
<ns2:UsingAddressing xmlns:ns2="http://www.w3.org/2006/05/addressing/wsdl"/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
...
<binding name="Wsit1PortBinding" type="tns:Wsit1">
<wsp:PolicyReference URI="#Wsit1PortBindingPolicy"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
...
</binding>
...
</definitions>and the communication between the client and the service looks like
---[HTTPRequest]---
SOAPAction: "http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/Wsit/Wsit1Service</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</Action>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:425d49d8-41cc-4eeb-9fcb-454c9df7a760</MessageID>
</S:Header>
<S:Body>
<ns2:CreateSequence xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing"
xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<ns2:AcksTo>
<ns4:Address>http://www.w3.org/2005/08/addressing/anonymous</ns4:Address>
</ns2:AcksTo>
<ns2:Offer>
<ns2:Identifier>uuid:1eff6593-afd8-48f0-b9de-e7dfe7c2f0ac</ns2:Identifier>
</ns2:Offer>
</ns2:CreateSequence>
</S:Body>
</S:Envelope>
--------------------
---[HTTPResponse200]---
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:afb14ba2-f124-4e4c-ad2c-2f8c09f83079</MessageID>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:425d49d8-41cc-4eeb-9fcb-454c9df7a760</RelatesTo>
</S:Header>
<S:Body>
<ns2:CreateSequenceResponse xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing"
xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
<ns2:Accept>
<ns2:AcksTo>
<ns4:Address>http://localhost:8080/Wsit/Wsit1Service</ns4:Address>
</ns2:AcksTo>
</ns2:Accept>
</ns2:CreateSequenceResponse>
</S:Body>
</S:Envelope>
--------------------
---[HTTPRequest]---
SOAPAction: "http://ws/Wsit1/SayHiRequest"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/Wsit/Wsit1Service</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://ws/Wsit1/SayHiRequest</Action>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:64e714ac-c57b-49da-b200-e9c350e7b2b0</MessageID>
<ns2:Sequence xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
<ns2:MessageNumber>1</ns2:MessageNumber>
</ns2:Sequence>
<ns2:AckRequested xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
</ns2:AckRequested>
</S:Header>
<S:Body>
<ns2:SayHi xmlns:ns2="http://ws/"><to>me</to></ns2:SayHi>
</S:Body>
</S:Envelope>
--------------------
---[HTTPResponse200]---
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://ws/Wsit1/SayHiResponse</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:d1f60f58-97d1-407f-b850-92cbf3f7afa0</MessageID>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:64e714ac-c57b-49da-b200-e9c350e7b2b0</RelatesTo>
<ns2:Sequence xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:1eff6593-afd8-48f0-b9de-e7dfe7c2f0ac</ns2:Identifier>
<ns2:MessageNumber>1</ns2:MessageNumber>
</ns2:Sequence>
<ns2:AckRequested xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:1eff6593-afd8-48f0-b9de-e7dfe7c2f0ac</ns2:Identifier>
</ns2:AckRequested>
<ns2:SequenceAcknowledgement xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm" xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
<ns2:AcknowledgementRange Upper="1" Lower="1"/>
</ns2:SequenceAcknowledgement>
</S:Header>
<S:Body>
<ns2:SayHiResponse xmlns:ns2="http://ws/">
<return>Hi me</return>
</ns2:SayHiResponse>
</S:Body>
</S:Envelope>
--------------------
---[HTTPRequest]---
SOAPAction: "http://schemas.xmlsoap.org/ws/2005/02/rm/AckRequested"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<ns2:AckRequested xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
<ns2:MaxMessageNumberUsed>1</ns2:MaxMessageNumberUsed>
</ns2:AckRequested>
<To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/Wsit/Wsit1Service</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/AckRequested</Action>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:28d4c680-d33a-46e8-aa8c-a85bfc37829e</MessageID>
</S:Header>
<S:Body></S:Body>
</S:Envelope>
--------------------
---[HTTPResponse200]---
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<ns2:SequenceAcknowledgement xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns3="http://schemas.microsoft.com/ws/2006/05/rm"
xmlns:ns4="http://www.w3.org/2005/08/addressing">
<ns2:Identifier>uuid:0b5491e2-f6fe-4c04-a766-d6e9ccb3617e</ns2:Identifier>
<ns2:AcknowledgementRange Upper="1" Lower="1"/>
</ns2:SequenceAcknowledgement>
<Action xmlns="http://www.w3.org/2005/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement</Action>
</S:Header>
<S:Body></S:Body>
</S:Envelope>
--------------------
- Securing Service
- Open web service in the design view
- Check Secure Service checkbox
- Uncheck other checkboxes if they're checked
- Deploy the project with the service
- Refresh the web service client (check also replace local WSDL file)
- Right-click on the ws client node and invoke Edit Web Service Attributes action
- Go to WSIT Configuration tab, check Use Development Defaults in the Security area and press OK button
- Run the project with the web service client
- EXPECTED RESULT: WSDL of deployed web service is modified similarly as the attached one and the communication between the client and the service looks like
---[HTTPRequest]--- SOAPAction: "http://ws/Wsit1/SayHiRequest" Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Content-Type: text/xml;charset="utf-8" <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
xmlns:exc14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5007">http://localhost:8080/Wsit/Wsit1Service</To>
<Action xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5006">http://ws/Wsit1/SayHiRequest</Action>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5005">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5004">uuid:83b5aed3-006c-44eb-9799-f4a8194549cb</MessageID>
<wsse:Security S:mustUnderstand="1">
...
</wsse:Security>
</S:Header>
<S:Body wsu:Id="5008">
<xenc:EncryptedData xmlns:ns10="http://www.w3.org/2003/05/soap-envelope" Type="http://www.w3.org/2001/04/xmlenc#Content" Id="5011">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
<ds:KeyInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="keyInfo">
<wsse:SecurityTokenReference>
<wsse:Reference URI="#4"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>HYmVHYTDX4A44sCUOGid0STVkGVFFubDdMItpaGgFqqo9EQoiw49pveZeVhwxrmpH7UeSFV5461QoNfTQ+IwCfus+lmEyY2dpZrnDVbirZw=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</S:Body>
</S:Envelope> --------------------
---[HTTPResponse200]--- <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
xmlns:exc14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<S:Header>
<To xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5007">http://www.w3.org/2005/08/addressing/anonymous</To>
<Action xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5005">http://ws/Wsit1/SayHiResponse</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5004">uuid:9ed90f2f-2321-413e-9ac2-b16b798cd83f</MessageID>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing" wsu:Id="5006">uuid:83b5aed3-006c-44eb-9799-f4a8194549cb</RelatesTo>
<wsse:Security S:mustUnderstand="1">
...
</wsse:Security>
</S:Header>
<S:Body wsu:Id="5008">
<xenc:EncryptedData xmlns:ns10="http://www.w3.org/2003/05/soap-envelope" Type="http://www.w3.org/2001/04/xmlenc#Content" Id="5011">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
<ds:KeyInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="keyInfo">
<wsse:SecurityTokenReference>
<wsse:Reference URI="#4"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>
R2SKl9oMT0glHffzGObZfckHW6+qoEOD705vabjF1bBfpt6KhSO5H+SI5dS0Z3//Bdtbt67OyHPWxpvyGJ/e5AizEEVemfMYHYdD8MMJXzUCS9KmPoyM4vecA286iPi6g7mdg8kaPWfr7uP+iUrfTQ==
</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</S:Body>
</S:Envelope>
--------------------
Attachments

