Hi,
On the click of a button,I need to enter data to SAP and get a response from it.I used a web service and it works fine.
If I access this web service as in a .net web application
like...
Service1 obj1= new Service1();
obj1.Credentials=System.Net.CredentialCache.DefaultCredentials;
DataSet dsADSUsers=new DataSet();
Note--This is just an example...
I get a security exception like..
Request for the permission of type System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at PR_Automation.WebReference_PR.Service1.NextPRSerialNumber() in E:\1PR_Automation\PR_Automation\Web References\WebReference_PR\Reference.cs:line 37
at PR_Automation.PR_Automation.CTRL3_59_OnClick(DocActionEvent e) in e:\1pr_automation\pr_automation\formcode.cs:line 879
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
Now how do I access this webservice in Infopath.
I need to send the entire XML document and get a respnse from SAP.I will be displaying this response in Infopath.
I know how to use the built in Submit to webservice option.But if I use that,I will be able to submit.But I wont get the response.