cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating Webservice with SAP

Former Member
0 Kudos

Hi Experts,

How to integrate Webservice with SAP ECC6.0( RFC)

webservice : .Net

regrads,

stephen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ender SOAP Adapter

Receiver RFC/IDOC/ABAP proxies.

IR

Step 1:

Create the Sender Datatypes for Request & Response

step2:

Create the MT for Req & Res

Step3 :

Create OB Message Interface ( Syncronous)

Step4 :

Import FM/BAPI

step5 :

Request Mapping : Sender Req MT--> FM Req

Response Mapping : FM Res----->Sender Res MT

Step6:

Interface Mapping

ID

Step1 :

Configure Sender Soap Adapter

Step2 :

Configure Receiver RFC Adapter

Step 3: Configure Sender Agreement, receiver determination,Interface determination,Receiver agreement

Step 4:

Create WSDL file.( ID->tools-Defien webservice)

save the file as .wsdl file

Give the file to sender system

/people/riyaz.sayyad/blog/2006/05/07/consuming-xi-web-services-using-web-dynpro-150-part-i

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1334 [original link is broken] [original link is broken] [original link is broken]

Former Member
0 Kudos

Hi jayasimha,

i config XI, wat to do at .Net webservice

Former Member
0 Kudos

.Net

Create a proxy class using a WSDL and

use it in a Client Program in .NET : (assuming Maths as the WSDL and Webserice name)

1.) Place maths.wsdl in C:/Sample/ folder

2.) Open Visual studio command prompt using the Start Menu

Start->Programs->Microsoft Visual Studio 2005->Visual Studio Tools->Visual Studio 2005 Command Prompt

3.) In the Command prompt go to that directory

> C:

> CD\

> CD Sample

> wsdl maths.wsdl /out:"c:\sample"

4.) The previous step will create a file called Maths.cs , go to that folder and confirm this

5.) Open Microsoft Visual Studio 2005, open the Client application where this webservice needs to be called

6.) If your Client application is a web application, the see if the website has a folder called "App_Code"

If not then create this folder. Right Click on this folder and click on "Add Existing Item"

7.) Browse to C:/sample and select the Maths.cs file

8.) If your client is a Desktop application , just add this file in a similar manner to the project(no need of creating any folder)

9.) After the file gets added, open Maths.cs file

10.) Add a namespace to it for convinience

eg:

namespace SAP

{

}

This should come before the Class Declaration and close it after the class

eg: See the red lines

namespace SAP

{

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]

[System.Diagnostics.DebuggerStepThroughAttribute()]

[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Web.Services.WebServiceBindingAttribute(Name = "Equi_get_NotifBinding", Namespace = "http://Equipment_Get_Notifications")]

public partial class Equi_get_NotifService : System.Web.Services.Protocols.SoapHttpClientProtocol

{

functions.

}

}

11.) Save the Maths.cs file

12.) Open the Webform or windows form code where this webserive will be called

13.) The webservice will now be available here under the SAP namespace

so when u type "SAP." u will get all the classes in it.

Add credential in this code as shown below

eg:

private void GetNotifications()

{

try

{

SAP.Equi_get_NotifService ser1 = new SAP.Equi_get_NotifService(); //This is the Webserive Proxy class

SAP.Equi_get_Notif_Request req = new SAP.Equi_get_Notif_Request(); //Request Class

req.Equipment = SAPID;

req.Date = Calendar1.SelectedDate;

System.Net.CredentialCache ch = new System.Net.CredentialCache(); //Adding Credentials for authentication on webservice server

System.Net.NetworkCredential cr = new System.Net.NetworkCredential("xisuper", "infotech");

ch.Add(new Uri(ser1.Url), "Basic", cr);

ser1.Credentials = ch; // Assing this Credential to the ProxyClass.Credentials property as shown here

SAP.Equi_get_Notif_ResponseNotifications[] res = ser1.Equi_get_Notif(req); //Call the webservice, res is the responce object

GridView1.DataSource = res;

GridView1.DataBind();

}

catch (Exception ex)

{

Response.Write(ex.Message);

}

}

Former Member
0 Kudos

Read the below details

. When we use *Sender SOAP Adapter how the connectivity is happening with Remote Clients.

A:SOAP is an XML-based protocol for exchanging information in a decentralized, distributed environment.SOAP is a technology that allows XML to move easily over the Web. SOAP does this trough an XML envelope for delivering XML content and specifying a set of rules for services to follow when they receive a SOAP message.The fundamental change brought about by SOAP has been the ability to move data anywhere across the Web.

When ever XI needs to talk to a webservice you will go for SOAP adapter. If you need to enable some functionality as webservice using XI you can use SOAP Sender adapter. If you need to send request to a webservice you will go for SOAP Receiver

SOAP Message Structure :

SOAP Envelop: The outermost element of SOAP message. The envelope element is the root of the XML document that defines a SOAP message.

SOAP Header: An optional, yet key element in architecting a distributed system around XML. The header element provides a modular way of directing SOAP servers to do processing before passing the SOAP message on. For example, it is possible to add SOAP header information that instructs a server to add transaction or authentication information. Header are also important in building piped architectures where processing is done in stages and data is modified as it is passed from handler to handler.

SOAP Body: An element that must appear in a SOAP message. The Body element is where the transported XML is loaded. SOAP makes no assumptions about the kind of XML transport in the body of a SOAP message. XML or it may take the form of remote procedure call.

also these weblogs can give you a view where you can use SOAP adapters

EP-XI Integration using Web Services and Web Dynpro MVC

https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1334 [original link is broken] [original link is broken] [original link is broken]

Looking for replacing SAP.NET connectors with SAP XI?

https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/2131 [original link is broken] [original link is broken] [original link is broken]

how the connectivity is happening with Remote Clients?

A:Configuring the Sender SOAP Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm

2.How sender SOAP Adapter get those webservices from remote clients and when exactly Remote clients will send webservices to SOAP Adapter?

It purely depends on ur client & if ur client provides WSDL file then u no need to develop it in ID and use that WSDL.WSDL describes a particular web service. Using a wsdl, we are requesting the broker to point the exact system, application, message interface. Once it is found, the SOAP channel is opened between the provider and the consumer. So the WSDL is a must to access web services.

in XI, we have to define the Web service which we want to use for the Sender SOAP channel. It is done by choosing Define Web Service from the tool menu of Integration Directory.

There is no need to code any thing. Here, what you are doing is, just exposing the sender service,channel,Message Interface as a web service.

In XI, we need to map the incoming messages to the target message( to the actual web service from the provider) format and to maintain the technical and logical routing between the sender and receiver.

Check this blog to generate WDSL file...

Configuring a SOAP Sender Channel:

When we create a SOAP sender channel we have to define the namespace and the name of a message interface (values can be taken from Integration Repository).

Select the Quality of Service according to your interface type. If you are using a synchronous interface, select Best Effort. Otherwise, select Exactly Once or Exactly Once in Order.

Transport protocol : HTTP

Message protocol : SOAP 1.1

Adapter Engine: Integration Server

3. I need exactly how the webservices request is passing through sender SOAP Adapter.

After completion of ur scenario u can use XML spy for testing ur scenario.

Refer this Blog how to send SOAP message from XML Spy

Web Services Testing: SAP Netweaver Platform

http://www.crosschecknet.com/web_services_testing_SAP.php

Refer the following blogs for SOAP sender Configuration:

How to Use the XI 3.0 SOAP Adapter

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873...

How Tou2026Set Up a Web-Service-Related Scenario with SAP XI

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/befdeb90-0201-0010-059b-f22...

have a look at this weblog:

SOAP Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/content.htm

Architecture of connector for SAP XI

http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/d...

Configuring the Sender SOAP Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm

Security Settings for the Sender SOAP Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/1f/7e2441509fa831e10000000a1550b0/content.htm

Answers (0)