Reputation: 1937
I have a problem. I have a simple application (in VB.NET) which connect with my shop database (in MySQL). And now I want to integrate this application with a SenditAPI system. Sendit is a courier company. My aim is to send the contact details of the customer (from my datebase) to the system (SenditAPI).
I have just simply added a web references to this system in my application. And I don't know what to do next. I have never done it before so I don't know what should I do next. I read SenditAPI documentation but there are only methods and nothing else.
I will be very glad for any kind of tips.
Upvotes: 2
Views: 236
Reputation: 8104
This is WSDL service so you have probably donwloaded the file
https://api.sendit.pl/webservice.php?wsdl
and added a service reference. They have also a sandbox, you should first register with Sandbox service and use the regular service only with bug-less code. Check http://sandbox.sendit.pl/sandbox-info.
Check alsoo this answer: How to use a WSDL
Mark especially the answer that starts with Use WSDL.EXE utility to generate a Web Service proxy from WSDL.
Run from Windows start menu Visual Studio Command Prompt and there type
C:\Program Files\Microsoft Visual Studio 10.0\VC>wsdl /out:c:\MyProject\SendItplProxy.cs
https://api-sandbox.sendit.pl/webservice.php?wsdl
It creates SendItplProxy.cs for SendIt sandbox web service in the folder c:\MyProject. Add it to your project and then you will have your methods:
SendItpl x = new SendItpl();
x.SIUserLogin("a", "b", "c", "pl");
You will also have to add reference to System.Web.Services
.
And yes - the best solution you found yourself: use Framework 2.0 WebServices, so I add it to this answer.
Add a Service reference and then click on Advanced and then follow this picture:
Upvotes: 2