Solved

Help to consume SAP Web Service from C#

Posted on 2013-11-03
6
2,162 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 74

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 74

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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 74

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now