Solved

Help to consume SAP Web Service from C#

Posted on 2013-11-03
6
2,288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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