Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Help to consume SAP Web Service from C#

Posted on 2013-11-03
6
Medium Priority
?
2,571 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 2000 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
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 

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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

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!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

647 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