Web Services For Dummies

Mar 9, 2009

I'm mainly a VB6 developer, but am currently trying to write a web service using VB.Net to allow for communication between our product and a third-party. The third-party software will invoke our web service to update various data.I've read up various things on how to do this, and have successfully generated a prototype web service. What I'm now concerned about is how to do this properly. Our clients want us to provide the WSDL and XSD for our web service, so they can implement it on their end, so I want to make sure I get it right. Therefore, I have the following assumptions/questions:The web service will receive various fields that should be updated. To keep this flexible, I thought that this could be a single XML parameter. I'm guessing this is why our clients want the XSD. Is this assumption correct? Is it good practice to pass an XML input parameter?I created a simple class with a sample of the fields that should be updated (Title, Address1, Address2 and so on) then generated an XSD from that using XSD.Exe. This made me think - should my input parameter be an instance of this class, rather than an XML document based on the XSD?

For example, the fields to be updated relate to client data. There are many possible fields that can be updated, but only a few will probably be updated at a time. Clearly, I don't want a method with 40 parameters for each possible field, and I was also asked to only provide a single method. My idea was therefore to have a parameter naming the fields to be updated, and their values. It seemed sensible to use XML for this parameter. My assumption regarding the request from our clients for the XSD came about so that we can make sure that the XML parameter will only include valid fields. But at the same time, I generated an XSD using Visual Studio based on a sample class I created. But now I'm not sure which is best to use i.e. either:

a) XML: cliData As Xml.XmlDocument: Appears in WSDL, but how would I generate an XSD to make sure the XML is valid? Manually?

b) Class: cliData As ClientData: Serialised in WSDL so each field appears as a separate element. Presumably no need for an XSD, but I don't think this gives me the option to only includes a few fields, and isn't this equivalent to having loads of parameters?

c) String: cliData As String: Pass in some sort of string, unravel it manually, but then no validation.

I initially planned to return the status of the web service (e.g. "OK" or some failure message), though I've seen reference elsewhere to SOAP Faults. There were some links to an MSDN article discussing this, but the links seemed to be broken.

View 3 Replies


ADVERTISEMENT

VS 2008 Changing Tab Control Background Color For Dummies?

Apr 4, 2009

I've been following you for some time, and many of the things you've done have helped me a lot, but this time I got stuck and need the help of an expert.I'll explain my case:I'm developing an assistance programme for an online game, and being this the 10th version I release, I wanted to do something special for the users, so I decided to make the programme based on tabs and give it the aspect of a new skin of the game that will be released soon.

As you may have guessed from the Title, I want to change the gray that is arround the flat buttons and on all the border of the tabcontrol, which is docked to the form. Here is a picture of the programme.To colour the tab buttons I used the following

Private Sub TabControl1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl.DrawItem

[Code]...

The problem is that I don't understand how to apply the "A Completely OwnerDraw TabControl" to my project, my knowledge isn't so far yet. Is there any way I can achieve the same results using something simplier? Or if not, could someone explain to me how to apply it without making any mistakes?

View 4 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

.net - Generic .Net Web Services?

Jul 15, 2009

At the moment we're are considering writing a number of .Net web services to export/import data between sites. There are various different types of data involved, relating to multiple database tables. I could write various web services to receive the data being sent, for example

ImportSomeRecord(field1, field2, field3)
ImportSomeRecord2(field1, field2)
ImportSomeRecord3(field1, field2, field3, field4, field5)
and so on...

There could be about 40 of these services, and it's also possible that the fields may change i.e. new fields may be added. The client would be a VB6 application that would call the remote web service, and let that web service update the remote database. The web services will be written in VB.Net 2008.

Would it be advisable to replace all these web services with a single generic service e.g. ImportRecords(recordtype, blobofdata). I think this can be done in theory by just passing an XML string as the blob of data and letting the web service unravel this depending on the record type, but is there actually any advantage to this, and is it good practice to do so? I've read somewhere that passing XML chunks in this way, as a single parameter, isn't recommended, and I can see this also seems to be somewhat contrary to standard web service usage in that in effect I'm bypassing the web service definition.

View 2 Replies

.Net Exchange Web Services?

Aug 31, 2011

I created an application using the Exchange Web Services, everything works fine, but after running 3 or 4 times, I suddenly get the error:

There was an error downloading "whatever/ews/services.wsdl"The remove name could not be resolved:There was an error downloading "whatever/ews/services.wsdl/$metadata"That gets me is its working find for a while, then it just stops working. I do an update and get the error. wait a little longer, try to browse it through browser and it prompts me for a user name and password, even though I checked the box "Remember".

View 1 Replies

Accessing Services Using WMI

Nov 12, 2009

I am trying to access a remote 2003 server using WMI. I can connect but when I try things like listing the services for that server I get the following: Access is denied. (Exception from HRESULT: 0x80070005(E_ACESSDENIED). Using the same code, I can connect and get a list of services a remote 2008 server. Here is the code to connect to the server (which gets me connected):

[Code]...

View 1 Replies

Consuming Web Services In .NET?

Feb 19, 2010

I am testing web services in .NET for the first time. I am almost there, but I can't seem to consume the web service. I know this post is similar to about 5-6 other posts on this site, but I have reviewed them, and still can't get the syntax correct.So far, I have:Create a simple web service that creates a directoryWorked in development environment, but took some trouble shooting to get to work on live server I can pull up the "automagically" generated .NET we service page.Added web service reference - can now see the reference in my solution explorer and in intellisense.

[Code]...

View 4 Replies

Ews (Exchange Web Services)?

Jun 12, 2009

I'm looking at using ews to move new emails to a sub folder and download attachments to a network drive. I was wondering if anyone had any experience with this particually using VB.net but all and any advice?

View 1 Replies

Using Ews (Exchange Web Services?

Mar 11, 2009

I'm looking at using ews to move new emails to a sub folder and download attachments to a network drive. I was wondering if anyone had any experience with this particually using VB.net but

View 2 Replies

VS 2008 WCF For Web Services?

Oct 18, 2010

I am .net windows programmer and new to web services.I want to start with web services using .net.Should I directly jump to WCF. What was there for developing web services in .net before WCF. Is there more to web services than WCF ?Basically I need some guidance to start such that I get to know the concepts as well as start developing web services using latest .net classes.

View 3 Replies

VS 2010 Web Services / WCF?

Jul 13, 2010

many posts about the security risks of app.config file...ncrypted or not... for storing the connection strings of a remote database.OK! I agree with this... but... how can i make a VB.NET Application to connect to my database thru WebService or WCF as long my server is Centos with MySQL ? How can i make the connection strings of MySQL Connector to work with WebServices or WCF ? I did not find any solution for this problem.

View 1 Replies

Web Services Not In Assembly

Jun 9, 2012

I've converted a 2005 project to 2010. As I was debugging some issues I noticed that my compiles didn't seem to change anything so I deleted the bin directory and recompiled. Now all of my Web Services "ServiceName.asmx.vb" are no longer in the assembly and when I try to run them in the debugger, I get the following error:

Could not create type 'MyWebService.MyNamespace.MyService'.

I have verified that the Class and Codebehind are correct in the 'MyService.asmx' file.

I have verified that the MyService.asmx.vb file is marked to Compile and that the asmx file is Content.

View 1 Replies

Asp.net - Retrieve Data Using Web Services In .NET?

Jan 11, 2010

How to retrieve data from database using Web services on VB?

View 5 Replies

Asynchronous Web Services Between Different Platforms

Oct 12, 2010

I am writing web services with VB.NET (2.0). The client side will use different technologies such as Java and Siebel. So, if I write asynchronous web services, is it possible for different platforms to consume them? I know it is quite easy with a consumer having .NET platform, but not sure for different platforms. Is it enough for them to have asynchronous ability, or should it be a similar platform?

View 3 Replies

C# - Can Partial Classes Be Used For Web-services

Aug 10, 2010

Can partial classes be used for web-services or there is some other way to implement it ?

View 2 Replies

Check On Several Services To See If They're Running?

May 15, 2011

I need to check on several services to see if they're running on several servers. I would like the program to tell me if a specific service is or is not running and if it is to reply with a msg stating which service is running, same if it is not running.

this is what i have so far:

Private Sub CheckServiceButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckServiceButton.Click
' This will check if the service is running '

[Code]....

View 3 Replies

Create A Component Services For A DLL?

Jan 24, 2009

when is the neccisity to create a component services for a DLL.

i ask because , i have a dll and the website runs fine if i just register the dll.
so when should i go for componet services

View 1 Replies

Error With Services References

Jan 11, 2011

I am getting the following error when I add a service references that points to a web service.

'System.ServiceModel.XmlSerializerFormatAttribute' is not accessible in this context because it is 'Friend' in the Reference.vb file.

I have not gotten it in other projects that I have done that point to the same web service. I have recently add some code that I downloaded and cleaned up the errors in to my project and this seems to be what broke it. This code uses several new features that I am not familiar with, mainly the "Friend" declaration and also uses name spaces in the code it self. Also I converted the code from C# using an utility that I downloaded, that untility was not 100% in it's conversion, hence the clean up that was needed.

View 2 Replies

Have To Write A GetRetailerContext For Each Of The Web Services?

Aug 12, 2009

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:EN-GB;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

I am working on a system that calls several different web service to integrate in to a 3rd party system. each one of these web service contains a object called RetailerContext which is a type of security object that is required to get and set data.

My problem is the example code I was give in a document says you should crate a function called GetRetailerContext that set up the object for you, but because the object is defined in each of the web services that I have referenced the compiler tells the that RetailerContext is ambiguous. is there a way round this or do I have to write a GetRetailerContext for each of the web services?

Private Function GetRetailerType(securityInfo) as RetailerContext
Set up object
End Function

View 1 Replies

Hosting A WCF In Windows Services

May 10, 2011

I have a working WCF, it is written in VB. I need to host it in Windows Services on a remote server. I cannot use IIS (they uninstalled after I had it installed). Specs are to host in Windows Services, the only way I can get around that is to quit.

[Code]...

View 1 Replies

Hosting Of WCF And Windows Services?

May 9, 2011

I've created a WCF service and, with help of others from this site and the department I work in, the WCF service is running as a service on my development machine. Tested it with a console app and it works.But, it's not supposed to be on my development machine. It needs to be on a different server.This is difficult because the server it is supposed to reside on DOES NOT have Visual Studio installed on it.So I cannot run the VS 2008 Command Prompt with installutil to run the WCF service as a service on that server.

View 3 Replies

How To Control Windows Services

Sep 27, 2008

i want to make a simple application to stop or start the Services in Windows XP. I'm using Vb.net 2005. I've googling and find that I should use "System.ServiceProcess.ServiceController". Does anyone have example for this?

View 2 Replies

Restart Services Using Http?

Feb 24, 2009

Is it possible to create a webform that can restart the windows services of an IIS server?

View 4 Replies

Services Stopping On Windows 7 After Log Off?

Aug 25, 2010

I created a service in VB.NET and it runs fine on Vista, I can log off and switch users and the service auto starts and continues to run every time without fail.If I install and run the service on Windows 7, it will not start after a logg off/on or after I switch users.

View 3 Replies

Sharing Objects Across WCF Services

Aug 16, 2010

Problem with WCF and Multiple Namespaces.The major difference I am having is that I don't control both ends of the wire.My setup is similar to this:[code]The first thing you do is login via the login service and receive a security ticket. The ticket object is located in the My.Objects namespace. For each subsequent call in My.Service1 and My.Service2 you have to pass in the security ticket to authenticate the call. The issue I am having is that instead of the client (a .net one for now but Java and others in the future) seeing one My.Objects.Ticket the references are resolving as My.LoginService.Ticket, My.Service1.Ticket, and My.Service2.Ticket. When the client tries to pass the object retrieved during login to any other function it is receiving an object mismatch error.How can I make each service resolve objects to the My.Objects namespace?

View 3 Replies

SQL 2005 Reporting Services?

Sep 25, 2009

Can these two things work together? That is VB.Net Standard NOT VB.net 2005 or vb.net 2008 or any other year. If not is there an inexpensive solution for reporting in VB.Net Standard and SQL server?

View 1 Replies

Stop Services Using Program?

Apr 6, 2012

I have been tasked with creating an application that once a specific event is encountered, an email is sent to a specific inbox. The problem is that our anti virus stops all email coming from an "unqualified" executable. Fair enough. So my question is, how do I manually stop the anti virus service(s) using vb.net then restart them once the email was sent? I know in a DOS window I could use net stop "ServiceName" but I don't know how to translate that to be used in vb.net.

View 2 Replies

Web Services And Proxy Servers?

Feb 16, 2010

I have the following code which connects to my webservice online:

Dim c As New com.*********.checkLicense()
c.CookieContainer = New System.Net.CookieContainer()
c.setApplicationGuid("e3b59b3d-4150-4cb0-adda-f5db004f362f")

[code]....

Now what I need to know is, if a user has proxy settings configured in IE, will this code automatically use the proxy?Also what happens when said proxy needs authentication?Anyone know how this can be adapted. I know about the System.Net.WebProxy class, however I would really need this to pick up the settings from IE by default and then if required (and only if required) pop up for proxy authentication.

View 1 Replies

Web Services. Getting 'Gone' Error Page?

Feb 4, 2009

I need to make an asp.net page where a user enters ISBN number (book ISBN) to a text field, cklicks a button and gets information about the book if it exists and what are author, title, publisher and edition.I think I need to impement web services. If you already had done such thing, could you please explain to me step by step how to do it, where to get the service, how to sign up and how to include it into my application

View 7 Replies

What Are The Possible Events In Windows Services

May 16, 2011

Im making a services that will log every time it gets started and stopped. I have accomplished that easily, using the onstop and onstart events. Now, im trying to call an exe file that writes something on the log. im calling the exe file every 30 minutes, so i used a do while loop and a thread.sleep code. Now, I've put the loop inside the onstart event, i noticed that since its an infinite loop, the process never leaves the onstart event, and the services status is alway "starting".

View 1 Replies







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