on 08-12-2008 9:37 AM
Hi,
How can I develop A simple Webservice for any scenario, for example, if am doing File to file scenario, and i want to develop a Webservice for the same scenario,
I think in ID we have an option Under Tools "Define Webservice" where in we can use wsdl format of the message interfaces.
How should i proceed to develop the Webservice?
Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Varun,
In Integartion Directory, Tools----
>Define Webservice. There u specify sender namespace and sender interface name, and sender service. Then it will generate the wsdl file and save it.
After that follow the below link.Hope this will be useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please go through the saptechnical, you can find lot of examples with screenshots.
Netaji.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Defining and Develop Webservice is same, as u need to define the same in ID.
for Consuming the Webservice u need a Web Service Client, in which can be done using XML SPY something like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I want to develop using Microsoft VS.
Can I make use of the Message Interfaces wsdl format and develop webservices in Microsoft VS.
Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can I make use of the Message Interfaces wsdl format and develop webservices in Microsoft VS.
There is some understanding problem. When u create a wsdl in ID, it means webservice is hosted at XI and the sender system is a SOAP client, which uses this wsdl generated at XI to call the XI webservice.
U can create a SOAP client in Microsoft VS in this case.
Regards,
Prateek
Hi Varun,
After creating the wsdl file u can deploy using MS visual studio.
Follow the steps and run the scenario.
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);
}
}
"Award points if it is helpful"
discarded
Edited by: Raghu on Aug 12, 2008 2:41 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varun,
Check this Step by Step Guide.
[How to Develop a Webservice Using NWDS and SAP XI.30 |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555]
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can I develop A simple Webservice for any scenario
For a complete scenario, u cannot create a single webservice.
I think in ID we have an option Under Tools "Define Webservice"
This is just to expose a single message interface as webservice and Not the entire scenario.
What u may do is to create a SOAP client with a button send, on pressing which u can trigger the transfer of data.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer these links:
RFC -> XI -> WebService - A Complete Walkthrough (Part 1)
RFC -> XI -> WebService - A Complete Walkthrough (Part 2)
http://frprjsp2.prj.fr:8000/sap/bc/srt/rfc/sap/ZPM_CREDIT_CHECK_WSD3?wsdl
http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/content.htm
Regards,
Nithiyanandam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.