web service connectivity problem. - InfoPath Dev
in

InfoPath Dev

web service connectivity problem.

Last post 11-27-2005 01:22 PM by AndersR. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-27-2005 07:45 AM

    web service connectivity problem.

    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.
  • 11-27-2005 01:22 PM In reply to

    Re: web service connectivity problem.

    When using managed code your form needs to be set to Full trust, and then you need either a code signing certificate or use regform.exe (sdk tools) to create an installation package to install it on each client.

    hth
    AndersR


Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.