Follow the steps to create and read the data by using the proxy.
- Add a new 'ASP.NET Web application' to the SAPDotNetIntegration solution. And name it as AspDotNetClient.
- Add the reference to the SAPWebServiceProxyLibrary.dll compiled and saved on the disk. By right clicking on the AspDotNetClient, and clicking on the 'Add reference context' menu.
- Add the following statement to the code behind using SAPWebServiceProxyLibrary.CustomerMasterNamespace;
- Following are the basic lines of code to be written to asscess the data from SAP system. //Creating the Service ZSN_WEBSERVICEService_proxy = new ZSN_WEBSERVICEService();//stores the return row XML data from the SAP web service String outData; //Setting the User Credentials _proxy.Credentials = new NetworkCredential("loginName", "password");//We have a stateful communication therefore we have to use a //CookieContainerCookieContainer _cookie = new CookieContainer();_proxy.CookieContainer = _cookie;// p_filepath_app is the input parameter to identify the specific SAP web // service outData = _proxy.ZsnWebservice("xmlfilepathonthesapserver");
2012年10月2日 星期二
[Link] Consuming SAP Web Services and .NET
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言