Web Services And Returning Multiple Values

Jan 14, 2009

I am struggling here with introducing web services into a site I am currently working on. The background is as follows.

- I have a page switchboard.vb which will recieves incoming xml requests.
- I parse these xml requests extracting its values, then setting them equal to the relevant global variables in switchboard.vb.
- One of these variables will determine a 'requestType'. Based on this requestType I want the page to call particular web services that I will add.
- These web services will then validate the user calling has permissions to access and execute it.
- The switchboard.vb page will then generate an xml respose which will post to the client.

Here is a summary of the process
getXML()
parseXML()
determineRequestType()
executeRequest()
rebuildXML()
postXML()

The ways I can see to do this are:
1. Pass the variables into the required Function allowing it to pass back a pre formatted xml string.
Pro: Simple
Con: It is not really using the web service as it should be.

2. Pass the variables into the required Function as 'ByRef' values hense changing the original value on switchboard.vb
Pro: allows me to format the outgoing xml on switchboard.vb and gives me more functionality with more individual variables as opposed to one string being passed back.
Con: Is this taking advantage of a web service? When I tried this the web service form didnt give options to input test data. Possibly because I am using ByRef?

View 10 Replies


ADVERTISEMENT

Returning Multiple Values From Function

Mar 17, 2009

I am working on a project I would like to use a function in a class I created to return multiple values in order to populate a listbox. I wanted to use a do until loop to achieve this. I will just post a simplified example of what I am doing :

Public Function Listboxfiller
Dim astring As String = "This is a string"
Dim Counter as integer = 0
Do until Counter = 5
return astring
Counter += 1
Loop

Then on the form I would do something like :
lstListbox.Items.Add(Myclass.Listboxfiller)

What happens right now is that the listbox only gets the first value, when I ran through in debug mode I found the loop only runs once, even though it should go multiple times.

View 4 Replies

Returning Multiple Values From A Function Call?

Apr 1, 2010

I have an active directory search function:

Function GetAdInfo(ByVal ADDN As String, ByVal ADCommonName As String, ByVal ADGivenName As String, ByVal ADStaffNum As String, ByVal ADEmail As String, ByVal ADDescription As String, ByVal ADTelephone As String, ByVal ADOffice As String, ByVal ADEmployeeID As String) As

[code].....

View 1 Replies

Asp.net - Returning Multiple Values From A Function In An Parcial Class In VB?

Sep 6, 2011

show me how to return multiple values from a function? I have my function in a seperate file within App_Code and here it is:Public Function GetQuoteStatus(ByVal QuoteID As String) As String

Dim quoteStatus As String
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Try
con.ConnectionString = ConfigurationManager.AppSettings("quotingSystemConnectionString")
con.Open()

[Code]...

However this is all good and well for one returned value but what If I wanted to return multiple values.How do I access them?

View 3 Replies

Returning A Inherited Class As Base Class Type With Web Services?

Sep 25, 2009

I suspect I am being very silly here but I have the following setup

Class MustInherit myBaseClass
'some stuff
End Class
Class myInheritedClassA

[code]....

Running this results in the following error

Unhandled Exception: System.InvalidOperationException:
There was an error generating the XML document. --->
System.InvalidOperationException:

[code]....

is there any way of 'Widening' the inherited class to the base class so this would work?

EDIT:regarding XmlInclude(typeof inheritedClass), currently this method could potentially return a number of types of inherited class (i.e myInheritedClassA and myInheritedClassB) is it case of simply having to add each of the inheritedTypes in this tag?

View 2 Replies

Check Multiple Services On Different Servers

Jul 10, 2011

Im trying to check multiple services on different servers. The idea is that every time a client clicks on a checkbox for the specific server and press the "check service" button it will check the status on the service and if it's not running it will restart the service and so on for the rest of the servers.[code]

View 2 Replies

.net - Consuming Multiple .NET Web Services From Javascript In Parallel?

Jun 29, 2011

I have two ASMX web services consumed from javascript. The first service performs a long operation and updates a database table on its progress. The second service polls that same database table in order to report the progress to the end user via a progress bar.

My problem is that the long process seems to be blocking the polling service. When I log the activity of the javascript, it seems to be requesting the long service correctly, and then starts to request the polling service once a second asynchronously (note: the long process is asynch as well). Both request types either use setInterval or setTimeout which shouldn't halt the browser. Yet when I look at the activity of the javascript, none of the responses from the polling requests return until the long process completes. So it seems the long process is blocking the polling requests until it's done.

[Code]...

View 1 Replies

Check Multiple Services On Remote Machines?

Jun 20, 2011

Im trying to check multiple services on different remote servers. i need to check lets say, RPC, Themes and Print Spooler services.

how can i list the services i need to make sure they're running and if they're not to start them in VB.net without using WMI?[code]...

View 2 Replies

Class Not Returning Values?

Oct 15, 2010

i have this class that i'm calling from a telerik report. when debugging asp.net application the report shows the right results but when i deploy to IIS it just return the first row and not the SUM of the salary variable.

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data

[code]....

View 2 Replies

Code Returning Different Values ( C# And .NET )

Dec 2, 2010

VB.NET Code:

Module Module1
Sub Main()
Dim x, y As Single
x = 0 + (512 / 2 - 407) / 256 * 192 * -1

[code].....

returns 0: 0

View 2 Replies

IDE :: Returning An Array Values?

Dec 1, 2009

i have this code:

...
Dim Labels() As String
Dim Count As Integer
Count = 0

[code].....

View 3 Replies

Returning One Or More Values From A Function?

Apr 20, 2010

Is it possible to return more than one value from a function? Like two integers, or an integer and a boolean, or any other data type combination. I understand I could use a sub and set these values in a variable but I was wondering if I could avoid declaring more variables by using a function.

View 28 Replies

Returning Values In Another Class?

Jul 31, 2009

I'm making this game where there is an enemy that goes to the center of the form and grabs an object and brings it back to the side. I made a new class called enemy that makes the enemy. in the class there is a sub called start which the enemy goes to the center and brings the object back. when the enemy comes back with the object i want the integer lives to subtract 1 from it. so i put the

If Not Rect.IntersectsWith(Form1.ClientRectangle) Then
Form1.Lives -= 1
End If

where Rect is the enemy's bounds. when ever rect is not intersecting with the forms bounds (which means when its off screen) lives should subtract 1, but it doesnt.

View 5 Replies

.net - Inherited Classes Returning Different Values?

Jun 25, 2010

This is more of a conceptual question than anything.

I have a base class called "RawReader".

It sets up the framework for classes to inherit it and read in specific data systems.

For example, I want an app read in a known format of FoxPro database, a CSV file, or a SQL database (there is about 8 more formats currently), then transfer it over a webservice and create a SQL database from it.

I have everything working with CSV, FoxPro, Access, Excel, etc... Easy enough.

The classes that inherit RawReader, like RawCSV, RawFoxPro, RawAccess all return a struct that contains a dataset as one of the members. The dataset contains the data from the raw system. The webservice receives this struct and creates sql tables and loads the data into it. This has already been coded and works great.

My issue now comes to reading in SQL. Obviously, I could follow the same path, read the remote SQL DB into a dataset, transfer the dataset as above, etc... My "issue" comes in where I feel like it doesnt make much sense to transfer a SQL db to a dataset, transfer it through the webservice, and then try to programmatically recreate the SQL database. I feel like I lose a lot of the granular details from the SQL database (field sizes, extended info, etc..) It seems easier in practice to just create a backup of the database, convert it to a stream object and transfer the backup over to the webservice. But this is where the problem lies...

Since all of the classes inherit from the base class, they are set up to return a DataSet. The hack-ish way would be to just add a stream object to the return struct and in my webservice add other code to make a special case for SQL sources, but I was trying to avoid that.

Any thoughts on the "proper" way to go about something like this?

View 1 Replies

Class Not Returning Accurate Values?

Oct 15, 2010

look at this class and say why it's just returning just the first row in the second query, the issue is that the Salary is showing the right value when debugging, but when deployed to IIS it's just returning the 1st row

Imports System
Imports System.Collections
Imports System.ComponentModel

[Code].....

View 1 Replies

Function Is Not Returning Correct Values

Jun 18, 2009

Ok simply my code doesnt want to output the correct number. I'm working on the project euler probems to expand my knowledge in VB.net and the current question I am working on is asking to work with triangle numbers. while researching I found that a triangle number can be calculated by using the formula:

[Code]....

View 5 Replies

Idatareaders Not Returning Values From Database?

May 25, 2010

In my codebehind I have this vb:

Dim reader as idatareader = includes.SelectDepartmentID(PageID)
While reader.Read
Did = reader("departmentid")

[Code].....

No Errors are being presented yet nothing is being returned by the reader. Is there an error in my code?

View 2 Replies

WCF Service Not Returning Current Values?

Sep 27, 2009

I created a WCF Service running as a console application. It is doing event listening for my workflow engine.The second application I am trying to do is a WinForm that can monitor the service and return me back the current states of the engine's workersI am able to connect to the service fine, and I verified that my service has values being set when I step through it... however when my monitor makes a call to the service, I am returning values as though it is not being run? (So default values, not current values

View 13 Replies

Pass Multiple Values And Return Multiple Values?

Jun 10, 2011

When I click on button1, employee_id and P values need to be transferred from button1_click to Cal_Category13() and go through all the calculation. After the calculation, udtnew.X and udtnew.MTD values need to be transferred back to button1_Click

I've no problem to return multiple values Cal_Category13().MTD and Cal_Category13().X from Cal_Category13() to button1_Click but i've no idea how to transfer employee_id and p values from button1_click to Cal_Category13().

Program Code
Public Structure PCB
Public Employee_ID As String
Public MTD As Decimal

[Code]......

View 2 Replies

SQL Possibly Not Returning Values For A Query In Visual Basic?

Jun 29, 2010

In my code I enter a string in a text box and have the query check the server for the entry. If it exists it returns the string and the date into two separate variables. The database only has TrackingNumber and Date. Below is the code. As of right now i get "Invalid attempt to read when no data is present." at the "If (sdr("TrackingNumber") IsNot Nothing) Then" line.

Public Function CreateSqlParameter(ByVal name As String, ByVal dbType As DbType, ByVal direction As ParameterDirection, ByVal value As Object) As SqlParameter
Dim parameter As SqlParameter = New SqlParameter()

[Code]....

View 3 Replies

C# - MVC: Returning Multiple Rows Of Data To Controller?

Apr 23, 2012

I have a table with several rows of data that I need to return to the controller. In my view, I initially load the table by selection of a time period and clicking a button. The table loads all my relevant records but one of my table cells contains a dropdown list. So I should be able make a selection in the dropdown click "update" and my controller saves the changes.

So everything works until I try and save. The model that is sent to the controller is completely null. The list property I have tied to the table cells returns to the controller null.

[Code]...

NOTE: This is written in VB.NET but C# help is welcome. I am familiar with both languages in MVC.

View 3 Replies

Returning Multiple Datasets From A Stored Process

Jan 19, 2010

I have an encrypted SQL Server stored proc that I run with (or the vb .net equivalent code of):[code]this returns 2 datasets and the output parameters for the results, the datasets are made up of various table joins etc, one holds the header record and one the detail records.I need to get the 2 datasets into a structure in VB .net (e.g. linq, sqldatareader, typed datasets) so that I can code with them, I don't know what tables any of this comes from and there are alot of them Whooopeee...I came close using Linq to SQL and IMultipleResults but got frustrated when I had to recode it every time I made a change to the designer file.

View 2 Replies

Returning Multiple Results (UDT?) From An Interop Call - VB6?

May 7, 2012

like an Interop user control (VB.NET) to return and to accept multiple values from a get/set call. I assumed a user defined type (UDT), would be the correct way but I keep getting a "Variable uses an Automation type not supported in Visual Basic¯ from the VB6 compile. How is passing multiple values between an interop control and the VB6 application done?VB.NET (Interop) code, a control with a .NET ListView

Structure Employee
Dim Firstname As String
Dim Lastname As String

[code].....

View 2 Replies

Sql Server - Returning Multiple Columns From SQL Procedure With .NET

Feb 21, 2010

I am using this vb.net code file to call a procedure to get dates (among other things). When I execute this procedure in SQL 2005 Server Management Studio, I get about 10 columns. However when I execute this code, the dataset seems to only have one index value, maybe I am misunderstanding something. When I change this

ds.Tables(0).Rows.Count.ToString

to

ds.Tables(1).Rows.Count.ToString <---changing the index value to 1
(or higher)

I get no information. So my question is;

Does the DataSet contain the other columns, only not indexed like an array? What I want to do is choose which of the columns to filter out and turn the rest into JSON formatted strings.

View 4 Replies

VS 2010 - Reading Text File And Returning Values To Textbox

Apr 17, 2011

I've a got a homework assignment that chooses one of four values in a list box, stores it in a text file. Secondly, on the display click event it should access the text file, read the line, store it in a variable and then display the totals in a text box. Works sort of fine except that it doesn't display the totals correctly. Code for both buttons is below. The variable are assigned in the mainform (Tried also in the display button and didn't change anything). The save button works fine and stores fine in the text file, it's just the reading that's the problem.

Private Sub saveButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles saveButton.Click
'save the new vote choices to a file
Dim votes As IO.StreamWriter
votes = IO.File.AppendText("votes.txt")
Dim voteSelected As String = CStr(commercialListBox.SelectedIndex)
[Code] .....

View 2 Replies

Parsing A Textbox String And Returning Substrings To Multiple Textboxes

Nov 17, 2010

i've done some basic parsing with text files before.

Scenario is i have 4 textboxes String (which contains the string i'm wanting to parse) sub1, sub2, and sub3. so the string is ex. 500000-1-2

- is the char that is the seperator

so the aim here is to get

500000 into sub1
1 into sub2
2 into sub3

the real string i'm wanting to parse is much more complex, but i'm keeping it simple here for a jumping off point so i can figure the rest out.

View 2 Replies

Exclude Multiple Values In Sum Depending On Values In 2 Columns In SSRS 2005?

Apr 21, 2009

I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so [code]...

Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".

Since I already exclude value based on 1 column called CATEGORY, how do I change my =Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value)) to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?

i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?

View 1 Replies

Asp.net - Returning In Oracle INSERT Is Not Returning Proper Value?

Mar 15, 2012

I have an ASP.NET web application (VB.NET) using an Oracle database. On an insert, I need to get the identity of the inserted row back. I am trying to use RETURNING, but I keep getting a value of 1 returned.

Dim strInsert As String = "INSERT INTO L.TRANSACTIONS (LOCATION_KEY, TRANS_CREATOR, TRANS_EMAIL, TRANS_PHONE) VALUES (:location_key, :trans_creator, :trans_email, :trans_phone) RETURNING TRANS_ID INTO :ukey"

[Code].....

View 2 Replies

What Is Ado.net Synchronization Services And How To Use These Services

Mar 14, 2009

What is ado.net synchronization services and how to use these services

View 1 Replies

Returning A Function Vs. Returning Variable Name?

Dec 12, 2011

My brain may just be fried since it's the end of the semester, but my teacher kicked this back to fix and resubmit...she said that I am "returning the name of your function rather than your variable name".

Here is my code for all 3 forms.

code:

These are forms to calculate the cost of getting a cell phone package.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved