Monday November 26, 2007
TOTD #19: How to Add Metro Quality-of-Service to Contract-First Endpoint ?
This TOTD explains how to add Reliability and Security to a Contract-First Endpoint using NetBeans IDE.
In the Contract-First, the contract, i.e. the WSDL, is defined first as
opposed to starting from Java. The Metro programming model starts with a Java
Service Endpoint Interface (SEI) and uses
Web
Service Designer to specify Security, Reliability and Transactions support.
This blog uses the WSDL bundled with the fromwsdl sample of
Metro download and adds
Quality-of-Service attributes to it.
Here are the steps to enable Reliable Messaging to Contract-First endpoint:
Web Service from
WSDL..." as shown below:

Browse..." button next to "Web Service Port:" and
select the appropriate port.Finish" and the Web Services Designer is shown as
shown below:
Undeploy and Deploy"
to deploy the project. Web Services" tree, select the newly added Web
service and right-click on "Test Web Service". The Tester page
is shown in a browser with links to the packaged WSDL file and text boxes
and buttons to invoke the Web service.Reliable Message Delivery".Clean" to clean all the
generated files. Again right-click on the project and then select "Undeploy
and Deploy" to deploy the project again.As described in screencast #ws7, Security can be added to a Contract-First endpoint using the steps listed above.
Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.
Technorati: totd glassfish webservices netbeans metro wsdl reliability contractfirst
Posted by Arun Gupta in webservices | Comments[13]
|
|
|
|
|
Today's Page Hits: 47
Total # blog entries: 994
| « November 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 2 | 4 | 6 | 7 | ||
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | |||||
| Today | ||||||
Arun, TOTD request. It would be nice if you could provide sample code to let us know how we can test that WSRM is actually working. Two scenarios: (1) a client request when the service is down, such that when the service is reactivated it will get the SOAP Request, and (2) the server response when the client is down, such that when the client is reactivated it will get the SOAP response. Thanks, Glen.
Posted by Glen on November 26, 2007 at 01:44 PM PST #
Posted by Arun Gupta's Blog on November 28, 2007 at 07:04 AM PST #
Glen, In order to test WSRM, pull the ethernet cable out of your Web service endpoint box, monitor the messages (specifically the message id & ack receipts). I'll hopefully show this in one of my talks :)
Posted by Arun Gupta on December 16, 2007 at 09:49 PM PST #
What about the wsit plugin (web service-client options) over NetBeans 6.0?;I have been trying several versions of netbeans 6, but no one of them has the wsit configuration options for the client.
Posted by AHurtado on December 17, 2007 at 03:40 PM PST #
(mutual certificate exchange)
Posted by AHurtado on December 17, 2007 at 03:42 PM PST #
The client options can be accessed using the same "Edit Web Service Attributes" as shown starting 11:20 in the screencast at:
http://blogs.sun.com/arungupta/entry/screncast_ws7_secure_and_reliable
Are you looking for something else ?
Posted by Arun Gupta on January 03, 2008 at 06:03 PM PST #
Yes i've looking this screencast, but it presents some difficults when it works connecting a client with a soap-1.2 server endpoint; the end-point is implemented in .net 2.0 with wse (web services enhancements 3.0).
Posted by 201.232.69.239 on January 04, 2008 at 04:31 AM PST #
Metro has not been tested with .NET 2.0 / WSE. I'd encourage you to post your question to Metro forum at http://forums.java.net/jive/forum.jspa?forumID=46. Hopefully some other user have tried this configuration and can assist you.
Posted by Arun Gupta on January 04, 2008 at 06:59 AM PST #
Thanks for your answer Arun, and I have one more dude too: at this time is recommended to use the nb6 integrated with the wsit plugin, or is better to use nb5.5.1 and update the wsit plugin (it is, has the plugin in netbeans 6 all the features of the 5.5.1 version?)
Posted by 190.24.83.207 on January 09, 2008 at 10:43 AM PST #
It is certainly recommended to use NB 6.0 with integrated WSIT (now called Metro) plug-in. If any updates are available, they will be there in NB plug-in manager. NB 6.0 integrated plug-in has all the functionality in NB 5.5.1 WSIT plugin.
Posted by Arun Gupta on January 09, 2008 at 10:46 AM PST #
Arun, I have found too that in nb 6.0 (and nb5.0) when my wsdl has a soap-1.2 declaration, it generates a warning:
[WARNING] SOAP port "WsEntidad1": uses a non-standard SOAP 1.2 binding.
References founded in internet says that i need to enable the "-extension" option in wsimport, but this is already enabled in the build file runned in background for the metro plugin (file nbproject/jaxws-build.xml, section:
...
<wsimport xendorsed="true" package="com.business01.service01.ws.serviceclient.reference" verbose="true" sourcedestdir="${build.generated.dir}/wsimport/client" extension="true" destdir="${build.generated.dir}/wsimport/binaries" wsdl="${basedir}/${conf-dir}xml-resources/web-service-references/ServiceContract/wsdl/ServiceContract.wsdl" wsdlLocation="file:/C:/.applications/s21.eTrans6.Applications/App16.Metro/Service02.Client01.Java/ServiceContract.wsdl" catalog="catalog.xml"/>
... ).
+ At this time is metro supporting the soap-1.2 binding (for web service client and server development)?
+ where can i found more information about this warning?
+ does this warning affects the functionality of the generated client?
Thanks.
Posted by ahurtado on January 12, 2008 at 02:09 PM PST #
Metro very well supports SOAP 1.2.
This warning message is thrown because it uses a non-standard way to describe the binding in the WSDL.
This binding enables the client to send SOAP 1.2 messages, no side effect on the generated client.
Posted by Arun Gupta on February 01, 2008 at 05:08 PM PST #
I donot want to use the extension option since it will genereate a non portable client.
How can I change the binding to be a standard one ?
How can I get more information about which part of my wsdl violate the standard ?
Thanks
Posted by hany on March 27, 2008 at 01:06 AM PDT #