Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Webservices Question
Previous Previous
 
Next Next
New Post 3/5/2006 6:07 AM
User is offline Jason Widener
9 posts
10th Ranked


Webservices Question 

Didn't know where else to put this one. I'm a newbie with webservices and VB.net in general. I'm using VWD Express and this is a learning excercise I've created for myself but I'm running into problems. I've created a web service IO.asmx that handles the webservices "low-level API" (i.e. the changing of an xml file) and another called Menu.asmx that uses the classes defined in IO.asmx.

Here's what I have:

    In IO.asmx

    <WebMethod()> _
    Public Function LoadXML(ByVal sFileName As String, _
                            ByVal asFields() As String) As Data.DataSet
        Dim oDataSet As Data.DataSet = CreateTableStruct(sFileName, asFields)
        oDataSet.ReadXml("c:/website/XMLStorage/XML/" & sFileName & ".xml")
        Return oDataSet
    End Function

    In Menu.asmx

    <WebMethod()> _
    Public Function GetMenu() As Data.DataSet
        'Create instance of IO web service
        Dim oIO As New localhost.IO()
        'Create a DataSet and load it with data from Menu.xml
        Dim oDataSet As Data.DataSet = oIO.LoadXML("menu", "itemname", _
                "itemdescription", "itemprice")
        Return oDataSet
    End Function

1. What is the proper way to reference the methods in Class "IO"? Using the syntax localhost.IO seems to work but I don't think this is what I want to do.

2. I want to keep everything in the IO Class abstract so it can be reused. When IO.LoadXML is called I want to be able to pass it 1 or 100 variables depending on the XML file. The implementation that I'm trying is erroring (see below). Any ideas? Thanx!

Compiler Error Message: BC30311: Value of type 'String' cannot be converted to '1-dimensional array of String'.

Source Error:

Line 18:         Dim oIO As New localhost.IO()
Line 19:         'Create a DataSet and load it with data from Menu.xml
Line 20:         Dim oDataSet As Data.DataSet = oIO.LoadXML("menu", "itemname", _
Line 21:                 "itemdescription", "itemprice")
Line 22:         Return oDataSet

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Webservices Question
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


MaximumASP
MaximumASP provides a wide array of web hosting plans to fit any hosting need. We also provide software and services needed to keep it running optimally.
MaximumASP.com
Mad Development: dotnetnuke design and development
We are an expert Dotnetnuke shop specializing in developing solutions that merge the requirements of design and branding, content management, ecommerce, search engine optimization and business logic.
www.MadDevelopment.com
telerik
telerik r.a.d.controls suite is the most innovative and comprehensive toolset for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications.
dnn.telerik.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP