Solved

Help to consume SAP Web Service from C#

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

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

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

For some reason Google Apps has decided to reserve 'www' for your new domain which results in an error when trying to map the web address 'www' to a certain site in your Google Sites. The error is 'this address is already being used' and after some …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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