Solved

Help to consume SAP Web Service from C#

Posted on 2013-11-03
6
2,229 Views
1 Endorsement
Last Modified: 2013-11-07
I need to consume an SAP web service using C#.

Not sure how to implement that in a windows app and wcf webservice.

The SAP Web Service takes 2 parameters (PlantID and OrderID) and returns multiple sections of order details that need to be inserted in a SQL Database.

Not sure how to call the web service and get the results.
1
Comment
Question by:iosifrn
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39619900
The SAP web service should provide a WSDL file. Using that file, you can use the "Add Service Reference" option (Project->Add Service Reference) to create a proxy class that will interact with your service.
0
 

Author Comment

by:iosifrn
ID: 39619974
Thanks for the info but I have that part completed up to this point.
The Web Reference is named - Product_Details but I don't know how to interact with that.
I need to input the Plant and Order Number and retrieve the returned details that come from different tables within the web service. How do I make the call in C# application?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39620094
You should have specified a namespace for the generated classes. Under that namespace there will be a class whose name ends with "Client". That is the proxy class you will use to interact with your service**. It will have methods that correspond to each function exposed by your service. Everything else should be classes that correspond to the parameters and returns from your service's functions. Just create an instance of that Client class, and instantiate any parameters its particular methods take, and you should be able to call the service.


** There could be more than one of these classes; it just depends on how your service was set up.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:iosifrn
ID: 39620507
So if I named the Web Reference - Product_Details it shows this for a name space:
namespace Get_Product_Details.Product_Details

Can you please write a little code block of how this would be consumed.
Just a madeup example?

Thanks
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39620657
Can you post the WSDL file?
0
 

Author Comment

by:iosifrn
ID: 39631409
I got the solution but I want to reward your work and appreciate your help.

Thanks.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question