Accessing Webservice from SharePOint server - InfoPath Dev
in

InfoPath Dev

Accessing Webservice from SharePOint server

Last post 03-26-2012 10:29 PM by siva_prasads. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-19-2012 11:51 PM

    Accessing Webservice from SharePOint server

    Hi,

    I am new to Infopath .

    I have Created a Blank Infopath form and Added a Button. Button Properties-> Edit form Code -> Written My custom code calling the web-serice from here in Vs2005. I am able to get the data from webservice in the preview of the form. But when I access the same form deployed on SharePoint server, I am getting the below error message

    System.Net.WebException: The proxy name could not be resolved: 'www.abc.com' at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Form.Service5.Is_Name(String name) at Form.FormCode.check_Clicked(Object sender, ClickedEventArgs e) Any Example on this ?Any Ideas? Help me

    Thanks in advance

    Siva

  • 03-21-2012 09:58 PM In reply to

    Re: Accessing Webservice from SharePOint server

    Hi Siva,

    How did you deploy the form? You're using code so you need to publish the form as admin-approved, and then have your SharePoint administrator approve and activate it to the site collection.

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 03-21-2012 10:10 PM In reply to

    Re: Accessing Webservice from SharePOint server

    Hi,

    Thanks for your respose. Yes the form was published as admin-approved and the SharePoint administrator approved and activate it to the site collection

    Thanks

    Siva

  • 03-21-2012 10:16 PM In reply to

    Re: Accessing Webservice from SharePOint server

    Hi Siva,

    I'm sorry, this sounds like an issue with your code or server and I can't help you with that. Let's see if other forum posters know any solutions for you.

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 03-22-2012 07:59 AM In reply to

    Re: Accessing Webservice from SharePOint server

    Is this the error from the SharePoint logs?

    Is your form set as full trust before you admin approve it? If you aren't using data connections for your web service, the form will have to be full trust.

    Here's a StackOverflow thread on this exception - you may be able to find other that will give you ideas for tracking the issue down.

     

    Hilary Stoupa

  • 03-26-2012 10:29 PM In reply to

    Re: Accessing Webservice from SharePOint server

    This error is from exception block.

    Yes the form set as full trust before admion approves.

    I am using below code to establish connection to webservice before consuming the service. 

      System.Environment.SetEnvironmentVariable("http.proxyHost", "000.00.00.000");
      System.Environment.SetEnvironmentVariable("http.proxyPort", "80");

      AuthHeader Credentials = new AuthHeader();
      Credentials.Username = "abc";
      Credentials.Password = "abc";
      objervice.AuthHeaderValue = Credentials;

      blnFlag = objService.IsRef_Name(Name.Value); 


     

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