Mytec
How to make Web service use TCP transport with JAX-WS
SOAP/TCP right now is the part of WSIT project, but it's also possible to use it with clear JAX-WS framework.
There are lots of places, which should be improved, however nothing could stop us using it right now :)
Several steps, especially for the server side, are similar or even same to WSIT ones, however the client side configuration is completely different.
So, "how to deploy web service to Glassfish and make it reachable via SOAP/TCP?".
- JavaEE 5 or JSR109 WS deployment.
Actually all Web services deployed to Glassfish using this deployment method become TCP transport enabled. They are automatically registered on SOAP/TCP listener and ready to process.
*One known issue with JavaEE 5 deployment of WS is: if WS is being deployed to a Web container - then it is required for this WS to have the descriptor web.xml, where it will be specified to load on startup. In this case the SOAP/TCP listener will get to know about this web service. - Servlet deployment.
For this deployment type, things are not much different. In this case one more servlet context listener should be added to a web service's (web appliction's) web.xml file [1].
And the servlet should be set to load on startup. Otherwise the SOAP/TCP listener will not be aware know about Web Service, until WSStartupServlet will not be started.
"How to make client to choose SOAP/TCP as transport to work with web service?"
We need to configure JAX-WS client to be aware of SOAP/TCP transport. For that reason, we have to provide following service provider file [2], located on client classpath, and contain line [3] in it.
Web service WSDL file, which is provided to a client, should contain Web service endpoint address (/definitions/service/port/soap:address@location) with SOAP/TCP specific protocol schema [4]. Only in that case SOAP/TCP transport pipe will be attached and used for sending/receiving SOAP messages. Currently server side WSDL generation doesn't support protocol schema changing for SOAP/TCP, so this change should be made manually.
[1] <listener-class>com.sun.xml.ws.transport.tcp.server.glassfish.WSStartupServlet</listener-class>
[2] META-INF/services/com.sun.xml.ws.api.pipe.TransportPipeFactory
[3] com.sun.xml.ws.transport.tcp.client.TCPTransportPipeFactory
[4] vnd.sun.ws.tcp
Posted at 06:05PM Jun 07, 2007 by oleksiys in Web Services | Comments[12]
Posted by Kacem Boufelliga on June 17, 2007 at 07:24 AM CEST #
1) just want to make sure... Are you using WSIT or JAX-WS RI?
2) default MS C# implementation doesn't have SOAP/TCP support. MS has own WS tcp protocol implementation.
3) Company Noemax [1] is completing C# SOAP/TCP implementation for .Net. Trial version should be available very soon. On Noemax forum you can get more details about that.
[1] http://www.noemax.com/
Posted by 192.18.43.225 on June 18, 2007 at 11:02 AM CEST #
Posted by Kacem Boufelliga on June 18, 2007 at 04:54 PM CEST #
Posted by oleksiys on June 20, 2007 at 07:16 PM CEST #
Posted by Kacem Boufelliga on June 20, 2007 at 07:48 PM CEST #
Posted by oleksiys on June 21, 2007 at 02:18 PM CEST #
Posted by Kacem Boufelliga on June 21, 2007 at 03:37 PM CEST #
>is the Noemax the only way to go for using SUN WSIT soap.tcp
Yes. MS prefers to not publish their tcp transport specs.
> can you provide a sample code for a java soap.tcp call in WSIT
In order to use SOAP/TCP with WSIT, you don't need to make any code change. However you will need to make some changes to Web Service policy description file either manually [1], or just mark the checkbox in Netbeans[2].
WBR
[1] http://blogs.sun.com/oleksiys/entry/how_to_make_web_service
[2] http://blogs.sun.com/oleksiys/entry/soap_tcp_support_in_netbeans
Posted by oleksiys on June 21, 2007 at 04:50 PM CEST #
Posted by Vivek Pandey's Blog on July 03, 2007 at 09:31 PM CEST #
I am trying to call the simple addition web service (appearing in the netbeans tutorials) from a java client; I have enabled TCP both for service and the client from the netbeans menu as shown in
http://blogs.sun.com/oleksiys/entry/soap_tcp_support_in_netbeans.
However, when I look at the messages appearing in the Server Admin Console under Monitor/Messages, the transport type for all of the requests still appears as HTTP.
I have also tried the method described in this blog, adding the service provider file and changing to
<soap:address location="vnd.sun.ws.tcp://localhost:8080/CalculatorWSService/CalculatorWS"></soap:address>
When I run this, I get the following exception
Exception: javax.xml.ws.WebServiceException: Unsupported endpoint address: vnd.sun.ws.tcp://localhost:8080/CalculatorWSService/CalculatorWS
I would really appreciate if anyone could help. Thanks!
Posted by Floer on May 21, 2008 at 05:33 AM CEST #
Hello,
Do you have any idea about how to make a Web service use TCP transport with JAX-WS
on JBoss environment?
Regards,
Prathamesh
Posted by Prathamesh on June 12, 2008 at 03:35 PM CEST #
Hi,
can you provide a sample code for calling WCF soap.tcp service from WSIT.
Thanks,
Raj.
Posted by raj on September 30, 2008 at 07:19 AM CEST #