Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3945712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:02:52+00:00 2026-05-20T01:02:52+00:00

So I have an application that uses a webservice, On the UI side the

  • 0

So I have an application that uses a webservice, On the UI side the user picks a table which sends a request across the web to my webservice to return the fields of this table.

So after this request is accomplished I have, on the webservice side a series of Name,Type Pairs that I need to serialize and send back to my client. I could use a List(of String()) to send the values back but I want to use a List(of Custom_Class) instead because later I have to do this on a much larger scale and I want to learn on this simpler version.

Now I know from my research that I can create a class from an .XSD document so what I’m thinking I should do is convert this class into a .XSD and somehow send that with my request to the WebService so that it can use that .XSD to create a class dynamically at runtime, instantiate that class into objects, fill those objects with the result set, bundle it into a strongly typed List(of ReturnFields), serialize that into XML, send it back to my client, Deserialize it back and display it for him.

So 2 questions:
1. Am I on the right track here or am I going about this all the wrong way.
2. How do I pass the .XSD schema to my Webservice so it can use it to create the class on the server side?


————–EDIT———–
So based on pMartin’s input I’m revising this question a bit.

So below is my code as it stands now.

I have a “Fields” Class Living on my Library Layer

Public Class Fields
    Private Field_Name As String
    Private Field_Type As System.Type

    Public Sub New()
    End Sub

    Protected Overrides Sub Finalize()
    End Sub

    Property Name() As String
        Get
            Return Field_Name
        End Get
        Set(ByVal value As String)
            Field_Name = value
        End Set
    End Property

    Property Type() As System.Type
        Get
            Return Field_Type
        End Get
        Set(ByVal value As System.Type)
            Field_Type = value
        End Set
    End Property
End Class

This get’s used in my library by the following code.

Public Function Get_List_Of_Fields(ByVal Table_Name As String, ByVal Database_Name As String) As List(Of Fields)
    Dim List_Of_Fields As New List(Of Fields)
    Dim DataModel As MetaModel = Get_Datamodel(Database_Name)

    Dim Data_Table = (From DataTable In DataModel.GetTables Where DataTable.TableName = Table_Name).FirstOrDefault

    For Each Field In Data_Table.RowType.DataMembers
        Dim Fields_Obj As New Fields
        Fields_Obj.Name = Field.Name
        Fields_Obj.Type = Field.Type
        List_Of_Fields.Add(Fields_Obj)
    Next
    Return List_Of_Fields
End Function

Which Returns to my Webservice (.ASMX)

<WebMethod()> _
Public Function Get_List_of_Fields(ByVal Table_Name As String, ByVal Database_Name As String) As List(Of Fields)
    Return _DynaLib.Get_List_Of_Fields(Table_Name, Database_Name)
End Function

Which returns to my Client
‘This is where my error is on this “return” line

Imports Dynamic_Charting.DynamicReference 
Private _DynamicService As New DynamicServiceSoapClient

Public Function Get_List_of_Fields(ByVal Table_name As String, ByVal Database_Name As String) As List(Of Fields)
     Return _DynamicService.Get_List_of_Fields(Table_name, Database_Name)
 End Function

It is here that I have my error. I get the following Error.

Error 11
Value of type ‘1-dimensional array of Dynamic_Charting.DynamicReference.Fields’ cannot be converted to
‘System.Collections.Generic.List(Of Dynamic_Charting.DynamicReference.Fields)’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:02:53+00:00Added an answer on May 20, 2026 at 1:02 am

    I don’t see any reason that you need to pass an XML schema back and forth between the client and the web service. If you want to use a custom class to send back your output data, you can just set your custom class as the return type on the web service method.

    Essentially, you would have a definition like this for your web service method (assuming that you also have a class called InputFields to capture the data about the table that the user picked):

    <WebMethod()>
    Public Function MyWebMethod(inputData As InputFields) As ReturnFields
        ...
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Web Service and an Android application that uses this web service.
I have an application that uses a certificate to talk to a webservice on
I have a web application that uses the current version of JQuery that needs
Background: I have a winform application written in VB.NET that uses a WebService to
I have an ASP.NET 3.5 SP1 web application that uses a custom JavaScriptConverter. The
I have a problem with a little .Net web application which uses the Amazon
I have an asp.net mvc application that uses web service. I have various controllers
I have a web application that uses AJAX to grab JSON data from the
I have a silverlight web application that maybe open for days. It uses a
I have an application that uses RPC for interprocess communications. Turns out that synchronous

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.