Tuesday August 12, 2008
LOTD #1: Using Silverlight to access GlassFish Metro and JAX-WS Web service endpoints
Following TOTD
(Tip Of The Day) pattern, I'm
starting LOTD (Link
Of The
Day) series
today. These are light-weight entries with generally a single line
description and links to other
blogs/articles/tips/whitepapers/screencasts/etc.
Let's start with three recent entries on MSDN that describe how to
invoke Metro
and JAX-WS
Web service endpoints from Microsoft
Silverlight and .NET:
Posted by Arun Gupta in webservices | Comments[2]
|
|
|
|
|
Today's Page Hits: 3777
Total # blog entries: 931
Hello,
for the last two days I've been trying to make Silverlight consume a Glassfish JAX-WS Web Service, but without any success till today. I tried the procedure indicated at "Call a Java EE Web service from Silverlight Client" but it didn't work. When you add a GlassFish WS web reference to a Silverlight project Visual Studio creates a configuration file that gives compilation problems, unless you manually change the "customBinding" to "basicHttpBinding" and manually add the endpoint. When I ran the Silverlight client it launched a CommunicationException due to a "cross-domain configuration error". I had already copied the clientaccesspolicy.xml file on the docroot folder of my GlassFish domain as indicated.
Then, after some hours, I had the idea of creating an ASPNET Web Service which acts as a wrapper for my GlassFish WS, but I found out that neither that would work and it would launch the same exception! I started to have strong suspicions that this was a Silverlight bug. I completely erased the existing project which didn't work and created a new one, adding the web references normally (not manually). In this way it finally worked!
Just out of curiosity I tried adding another web reference to the Silverlight project to my original GlassFish WS, having to change the configuration file manually as before. It not only didn't work, but it also caused the other (.NET) web service to stop working, even after I had removed it completely and had restored the configuration file to the original state. It's so ridiculous! Silverlight is good looking, but still not serious enough for interoperability.
Cheers.
E
Posted by erionpc on September 02, 2008 at 04:48 AM PDT #
great endpoints 10x.
Posted by city pictures on March 08, 2009 at 02:26 PM PDT #