Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 22nd, 2007, 03:07 PM
Registered User
Join Date: Dec 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default xmlnodelist within a business object

I have a problem with a xmlnodelist property that I use within a business object.

Here's my class

using System;
using System.Xml;
namespace NS.GADGET.BO

    public class WsItem
        private string _instance;
        private string _retour;
        private XmlNodeList _nodes;
        public string Instance
            get { return _instance; }
            set { _instance = value; }
        public XmlNodeList Nodes
            get { return _nodes; }
            set { _nodes = value; ; }

I use this bo within a web service and the xmlnodelist is filled by a rss feed.

Here's the part of the webservice

    public WsItem InvokeWS(string instance, string url)
        return chargeWS(instance,url);
    protected static WsItem chargeWS(string instance, string url)
        XmlDocument wsResponse = new XmlDocument();
        string retour = wsResponse.OuterXml;
        WsItem myItem = new WsItem();
        myItem.Instance = instance;
        XmlDocument myDoc = new XmlDocument();
        XmlNodeList myNodes= myDoc.GetElementsByTagName("channel");
        myItem.Nodes = myNodes;
        return myItem;

So, I called my webservice thru my asp.net page
like this
<script language="javascript">
    function AjaxProxy(url,id)
        myweb='GestionGadget.InvokeWS(id,url,OnCompleteWs, OnTimeOut,OnError)';
    ret = eval(myweb);
    function OnCompleteWs(arg)

I use ajax asp.net scriptmanager for my web service.
here's the code
    <asp:ScriptManager ID="ScriptManager1" runat="server">
            <asp:ServiceReference Path="~/WS/GestionGadget.asmx" />

Now, my problem is when I invoke my web service, the alert box display commas instead of the rss feed.
I set a breakpoint within VS2008, and I can see the entire feed in the InnerXml key.

So, I don't know where's my error.
Any help ?


  #2 (permalink)  
Old December 23rd, 2007, 05:33 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi Stan,

Are you sure it's a BO issue? What happens when you set breakpoints in the JavaScript as well, and investigate what is returned at all levels?

Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Many-to-Many relationships and Business Objects. danielpilon C# 6 May 28th, 2008 09:44 PM
Transparent Business Layer pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 February 17th, 2008 02:19 AM
business object relationships thenoseknows ASP.NET 1.x and 2.0 Application Design 2 July 16th, 2007 03:02 PM
Domain Object inherit from Business Entity case23_69 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 September 25th, 2006 09:48 AM

All times are GMT -4. The time now is 07:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.