king1980
6th March 2010, 07:00
Hi,
I am new to web services which are part of std LN Application.
I would like to call the wsdl methods from .Net application.
Can any one help to achieve this?
e.g: I have Area wsdl in the server which having Show and List method's
then how to call these methods using .Net application.
Regards
king1980
gsurya
6th March 2010, 11:54
You are asking a very broad question thats difficult to answer. This is the process I normally follow:
- Develop BDE and generate WSDL
- Publish WSDL in the Connector for Webservices
- Test the WSDL using any WSDL 2.0 compliant tool like SOAPUI or other
- Once you import the WSDL into SoapUI and do the test, it will be very clear for you which methods to use and how
- Then you just repeat the same within .NET
- The trick within .NET is to make sure you get the request and response message mapping exactly right as done in SoapUI - this is where things generally go wrong.
You need some kind of Baan tools knowledge - you cannot be a pure .NET programmer who doesnt know Baan tools to be successful.
king1980
7th March 2010, 06:07
Hi Surya,
Thanks for replay.
I have already tested this wsdl with soapUI and i am able execute the methods successfully.
Now i am trying to use same wsdl in .Net, i have added this wsdl as a web reference.
Now i need a sample code which calls these methods from .Net.
I have Baan Tools Knowledge but i am new to open world wsdl.
Regards
king1980
vahdani
7th March 2010, 16:12
Hi,
the rest is actually plain vanilla dot.net! Here a sample of a client program:
WinApp.cs
using System;
using System.IO;
namespace SvcConsumer{
class SvcEater
{
public static void Main(String[] args)
{
FirstService mySvc = new FirstService();
Console.WriteLine("Calling Hello World Service: " +
mySvc.SayHello());
Console.WriteLine("Calling Add(2, 3) Service: " +
mySvc.Add(2, 3).ToString());
}
}
}
You have to replace "FirstService" with your Service name and the methods "SayHello()" and "Add()" with your methods show() & List()!
king1980
8th March 2010, 05:50
Hi vahdani,
I have Area wsdl file .
Now i tried with follwoing code but i am facing issue.
Dim a As New areawsdl.AreaService
Dim str As String = ""
Dim req As New areawsdl.ShowRequestType
Try
req.DataArea.Area.areaCode = "KL"
'ab.Area = "KL"
str = a.Url()
str = a.Show(req).ToString
Catch ex As Exception
MsgBox(ex.Message)
End Try
I am facing issue for follwoing statement
<b> req.DataArea.Area.areaCode = "KL"</b>
object instance is not set
Please find the attachment of Area wsdl file.
Thanks
king1980