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:
All entries will be archived at LOTD.

Technorati: lotd webservices metro jax-ws glassfish msdn
Comments:

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 01, 2008 at 09:48 PM PDT #

great endpoints 10x.

Posted by city pictures on March 08, 2009 at 07:26 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
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