Table of Contents
SOAP/TCP is TCP transport for Web Services. By default SOAP/TCP uses FastInfoset encoding in stateful mode, which lets SOAP/TCP to index XML elements optimal way, taking into account specifics of each concrete Web Service.
For detailed instructions for how to use NetBeans IDE to create a web service, see Creating a Web Service.
To use the IDE to configure a web service transport, perform the following steps.
To Configure SOAP/TCP transport in a Web Service
In the IDE Projects window, expand the Web Services node, right-click the CalculatorWSService node, and choose .
The Web Service Attributes editor appears.
Select the Allow TCP Transport check box, as shown in Enabling SOAP/TCP, and click .
This setting configures the web service to be able to operate over SOAP/TCP transport additionally to the default HTTP.
Now that you have configured the web service to be able to operate over SOAP/TCP, you can deploy and test it.
To Deploy and Test a Web Service with SOAP/TCP Enabled
To deploy and test the web service, perform the following steps.
Right-click the project node and select , then select Run.
Type
                    /CalculatorWSService?wsdl in the
                    Relative URL field and click
                    . 
Right-click the project node and choose .
The IDE starts the web container, builds the application, and displays the WSDL file page in your browser.
The following WSIT tags related to SOAP/TCP display in the WSDL file:
Example 9.1.
<wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
    <wsp:ExactlyOne>
        <wsp:All>
            <ns2:OptimizedTCPTransport enabled="true"/>
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>For detailed instructions for how to use NetBeans IDE to create a web service client, see Creating a Client to Consume a WSIT-Enabled Web Service.
To use the IDE to configure a web service client transport, perform the following steps.
To Configure SOAP/TCP transport in a Web Service client
In the IDE Projects window, expand the Web Service References node, right-click the CalculatorWSService node, and choose Edit Web Service Attributes.
The Web Service Attributes editor appears.
Select the Automatically Select Optimal Transport (HTTP/TCP) check box, as shown in Enabling SOAP/TCP for a Web Service client, and click .
This setting configures the web service client to choose SOAP/TCP transport as prefferable, when working with a Web Service.
After checking the SOAP/TCP check box, new policy
                    assertions will be added to the Web Service client policy
                    configuration file. Open
                    CalculatorWSService.xml file, which is
                    situated under the project's Source
                    Packages/META-INF folder.
The following WSIT tags related to SOAP/TCP display in the Web Service client configuration file:
Example 9.2.
<wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
    <wsp:ExactlyOne>
        <wsp:All>
            <tcp:AutomaticallySelectOptimalTransport/>
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>