Returning Errors From A WCF Service Function?
Sep 1, 2009
I have a WCF Service Function that Returns a typed dataset. How can I return an error or message to the client?Public Function ReturnMyDS(Byval Identity as Integer) as dsMyDataSet Implements Iservice.ReturnMyDS
Try
Return = RetrievemyDataset
Catch ex as exception
[code]...
View 1 Replies
ADVERTISEMENT
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
Mar 20, 2012
I have an XML file that sits on the hard drive of a Server running my Web Service. I need to access that file from another application.
This is my method on my Web Service
Public Function getXMLFile()
Dim xmlDocument As System.Xml.XmlDocument
xmlDocument = New System.Xml.XmlDocument()
[Code]....
This is caused when I try to return the xmlDocument object
From the information I gathered, it's like SOAP wants to wrap my XML in more XML and stops me from doing that.
How do I go about getting the XML File from my Web Service if I can't return XML?
View 1 Replies
Jan 15, 2009
I am trying to return a structure from one of my web services. It throws up this error:
Quote:
Exception Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. --->
[code].....
View 15 Replies
Oct 29, 2010
I am having some issues in attempting to display a recordset from my webservice. Currently my application involves a client feeding their values into my webservice.The webservice will then call a vb.net database class, which executes a SQL stored procedure, returns a recordset to the database class, and the class will pass the recordset back to the webservice, which will display it to the client in xml.
The problem I am having passing the recordset from the database class back to the webservice in a format that can be sent back to the client. I can't seem to convert the recordset to string format. Would it be better to have the record returned in XML format?
View 1 Replies
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
Nov 29, 2010
[code]And this is the code, coming from the web service's vb page, where I'm getting the error:[code]MusicDataTable comes from a dataset called music.The GetMusic() works because I'm not passing it anything. I'm not sure why insertSong and deleteSong aren't working.
View 1 Replies
Feb 3, 2012
I am trying to populate a combo list box with the results of a web service. The web service returns a dataset with two columns. I want to display column one to the user and capture column two with the user selection of an item from the combox.right now I can display the first column and capture the selection.Not sure how to add the connection of column two, to the combo box and capture the selection
Code so far....
myDataSet1 = proxy3.listSuppLang()
Dim x As Integer
[code].....
View 1 Replies
Oct 27, 2010
I need to return an error message to the client, if they have entered invalid data when calling my web service. So if my code is: [code]Is there a way to display a more user friendly error message (such as a message box or just the words "Invalid Order ID")?
View 2 Replies
Jan 8, 2012
I had no errors in my VB project it was compiling nicely. I loaded SP 1 today and now I have 102 errors. Actually I'm sure more than that as 102 is the max it will show. It particularly doesn't like the date functions and isDBNull. And it balks at vbcrlf now. Here are some examples of the errors I'm getting:
[Code]...
View 9 Replies
Dec 14, 2009
returning a function value? I have a simple function that returns an integer. This function works fine when executed in SQL Developer but, when called from my apps, it always returns 2 regardless of anything. I have checked it over and over again, I cant seems to find where I am going wrong.
[Code]...
View 6 Replies
Apr 20, 2009
what changes I need to make to the code so that when no value for intPosition is found the textbox txtRoomNumber remains blank? At the moment a value is being entered into the textbox when no value for intPosition is found.
Code:
Private Sub btnFindRoom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFindRoom.Click
Dim strRoomType As String
Dim intRoomNumber As Integer
[code].....
View 2 Replies
Feb 23, 2011
I have a Search web reference (from a Search Server 2010 express install) in a vb.net application that is utilizing the QueryService Class to search a production Sharepoint foundation 2010 site.At a previous point in time, we had created a proof of concept on an entirely test system that has since been turfed. From my recollection on this test system when documents were uploaded as a specific site content type (that inherits from document) and metadata was provided, we could search for specific metadata by making managed properties for each, and search results would be returned as documents (with the isdocument flag set to true). Viewing the document then became simple, as we could simply use the filename and path to display the stored file.Now we are developing a production system and we have encountered a new behavior, where these results now are returned as aspx results such as
[URL]
This of course makes it terribly difficult to locate and view the document, we can extract the Title which will then give us the name of the file with no extension, but that hardly helps, as the FileExtension data is aspx, not the documents file extension, so we don't have a full filename. We could display the page returned as a result, but would much prefer the document itself.
I've made a test document library, with just bare bones setup, (not using the site content type, or site columns) and uploaded some documents on the same site, and they are returned in the same fashion, so I don't believe the document library, or content type are the issue.
With a fairly limited understanding of both Sharepoint and Search Server, I don't know if this is a setup issue with the search service itself, with the site configuration, or with the querypacket I am sending. We also have a third party application (Knowledgelake) installed on the server that ties into sharepoint which could have changed configuration somewhere as well?
I don't think the query packet has changed since it was working in the proof of concept, other than the custom data column names. I will provide it here in case there is something glaringly obvious to an external reader.
<QueryPacket xmlns='urn:Microsoft.Search.Query.Document'>"
<Query>
<SupportedFormats>
<Format>urn:Microsoft.Search.Response</Format>
[code]....
View 1 Replies
Feb 15, 2011
Just come across the following snippet:
Public Function Checked() As Boolean
Return applyChange 'this is a string!
End Function
Whats going on here? How can a function with return type Boolean actually return a string? I'm assuming theres some implicit conversion going on here, which I'd rather not have.
View 1 Replies
Nov 28, 2011
I am hopeing someone can help me here with a recursive function I have that is not returning either true or false as I would have espected it to. The function loops through a Active Directory group for its members and then calls itself if it encounters any groups within the membership in order to gets its members as well. I am trying to return either true or false based on if any errors were encountered but not haveing any luck at all. It appears to just hang and never return back to the primary calling sub that starts the recursive function. Below is my code I am using:
[Code]...
View 1 Replies
Feb 8, 2012
If an object is created inside a function and the function returns that type of oject how is the memory handled.
Example:
Public Function GetEmployee(employeeid as integer) as employee
Dim oEmployee as new employee
oEmployee.FirstName="Bob"
[code]....
Does the variable that receive the object still a pointer to the memory location that was used inside the function?What about when you do a oEmployee2=oEmployee.Is oEmployee2 just a pointer? And any changes to oEmployee will now affect the other. Just trying to understand it from a memory perspective and how that scope works?
View 2 Replies
Dec 22, 2011
Function returning different datatype
View 4 Replies
Oct 26, 2011
I have stored procedure which I will execute its result and pass it into a Dataset and return it but at the same time I have a Output parameter in my stored procedure which I also want to return, how can I return both the dataset and the integer output value with my function, or is there a more 'appropriate way' to handle such situation?[code]
View 5 Replies
Apr 14, 2009
I need to return an array but the array size will change from one call of the function to another so I need away to storing the returned array. The function is as below, and as you can see the returned array will be of different sizes:
[Code]...
View 4 Replies
Jan 15, 2010
Im overiding getRolesForUser() I have 2 columns i return from the query IAdapter.GetRolesByUserName(userName) returns two columns (roleID, formID) How can I return them and access the two columns data? 2 dimensional array?
[Code]....
View 6 Replies
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
Apr 3, 2009
is it possible for a VB.net function with a return type of integer to return null ?
View 3 Replies
Oct 3, 2009
Function test(ByVal res As Integer) As Integer
res = 2
Return res
[code].....
View 9 Replies
Aug 23, 2010
I'm attempting to create a function that will get the User Accounts from the registry. I then need to loop through those users and commit specific actions on each one.Here's my function:
VB .NET
ublic Function UserAccounts() As String
Dim userskey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWAREMicrosoftWindows
[code].....
View 1 Replies
Nov 8, 2011
I've got this MustInherit class called ViewerElement, from which derive classes like ViewerLine, ViewerImage, etc.Then, in the main program I have a collection of different elements (Images, Lines, etc.). What I want to do is something like the following:
[Code]...
I'm getting desperate to implement this Clone method without getting errors. How should this be de done?
View 1 Replies
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
Jul 12, 2010
How could I call a module or something else to return data to me after its ran. I don't want to make my form1 code all messy.
Public Function Test() As String
Return "Tes34t"
End Function
[code]....
View 2 Replies
Jun 11, 2011
i being ordered to change my function skill to returning value by using struct but not using pointer. may i know what is the pro and con between this 2?
View 1 Replies
Mar 15, 2010
I'm having trouble finding out how define this function so I can return the arrayRight now I am defining the returnobject as 'object' but I would like to do it properly.The Function goes something like this:
View 2 Replies
May 14, 2011
How do i return a value from a function that i can copy to a queue?I imagine that value must also be a queue.
View 4 Replies