Joel Hainley : San Francisco Bay Area Software Consultant

  • rss
  • Home
  • About
  • Reading Lists
    • 2008 Reading List
    • 2007 Reading List
    • 2006 Reading List
    • 2005 Reading List
    • 2004 Reading List
    • 2003 Reading List
    • 2002 Reading List
    • 2001 Reading List
    • 2000 Reading List
    • 1999 Reading List
    • 1998 Reading List
  • Software
    • mcalc - a tournament poker utility
    • Joel’s "Super Fancy"(tm) Maximum Heart Rate [MHR] Worksheet

A quick note about .NET Web Services, Adobe Flex and Namespaces

November 1, 2008

I was building out some .NET based web services for a Flex project I’ve been working on and bumped up against something that gave me a bit of trouble. When you create a .NET Web Service there is a namespace attribute associated with the service. Here’s an example (in c#) :

namespace HelloWebService
{
[WebService(Namespace = "http://www.examplenamespace.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]

public class Service1 : System.Web.Services.WebService
{

// implementation …

}

This value is required by .NET for a web service, or at the very least .NET gets VERY upset if this value is not set.

You will then need to let Flex know about this namespace in order to access the results. To do this you simply add the following lines to Flex:

private namespace lh = “http://www.examplenamespace.com/”;
use namespace lh;

Not much to it, but it can be a bit of a pain when you’re not aware of this. Flex doesn’t complain, it just gives you empty values when you try to access the values.

Comments
No Comments »
Categories
.NET, c#, flex, programming, web services
Tags
.NET c# webservices web services flex
Comments rss Comments rss
Trackback Trackback

Navigation

  • .NET
  • 30-Day-Challenge
  • Amateur Radio
  • bicycle
  • books/reading
  • business
  • c#
  • cackl
  • Exercise
  • flex
  • friends
  • hamtesting.com
  • knuth
  • lectures
  • life
  • observations
  • people watching
  • personal finance
  • philosophy
  • php
  • picprep
  • programming
  • reading
  • santa barbara
  • scheme
  • school
  • seo
  • uISV
  • Uncategorized
  • web services
  • website

Search

Archives

  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • January 2007
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006

Site Pages

  • About
  • Reading Lists
    • 1998 Reading List
    • 1999 Reading List
    • 2000 Reading List
    • 2001 Reading List
    • 2002 Reading List
    • 2003 Reading List
    • 2004 Reading List
    • 2005 Reading List
    • 2006 Reading List
    • 2007 Reading List
    • 2008 Reading List
  • Software
    • Joel’s "Super Fancy"(tm) Maximum Heart Rate [MHR] Worksheet
    • mcalc - a tournament poker utility

friends

  • Ashley McNamara Photography
  • Colin McNamara

my websites

  • HamTesting.com
  • Photos
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox