• Gayathri Sureshbabu
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi,

 

I want to use SharePoint web service in Apex (e.g List service). I was able to generate Apex code from WSDL file uploaded to Force.com. Below is my current code to access List service hosted on HTTPS server

 

public String[] getSharePointListIds() {
  MSSharepointSoapClient.ListsSoap soapClient = new MSSharepointSoapClient.ListsSoap();
// I have username / password to access SharePoint but I don't know how to specify it in generated Apex code so here I just simply ingore it MSSharepointSoapClient.GetListResult_element result = soapClient.GetList('Products'); }

 

I got error in GetList() method on generated code. Below is error message from Debug Log

 

...

03:34:55.030 (30156000)|SYSTEM_METHOD_ENTRY|[1357]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST)
03:34:55.450 (450935000)|CALLOUT_REQUEST|[1357]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/"><listName>Products</listName></GetList></env:Body></env:Envelope>
03:34:55.450 (450996000)|CALLOUT_REQUEST|[1357]|GetList_element:[apex_schema_type_info=(http://schemas.microsoft.com/sharepoint/soap/, true, false), field_order_type_info=(listName), listName=Products, listName_type_info=(listName, http://www.w3.org/2001/XMLSchema, string, 0, 1, false)]::SFDC_STACK_DEPTH=1 SOAPAction="http://schemas.microsoft.com/sharepoint/soap/GetList" User-Agent=SFDC-Callout/25.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
03:34:55.625 (625042000)|EXCEPTION_THROWN|[1357]|System.CalloutException: IO Exception: External server did not return any content
03:34:55.625 (625190000)|SYSTEM_METHOD_EXIT|[1357]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST)
03:34:55.625 (625218000)|METHOD_EXIT|[43]|01p90000001n1Ig|MSSharepointSoapClient.ListsSoap.GetList(String)
03:34:55.625 (625294000)|FATAL_ERROR|System.CalloutException: IO Exception: External server did not return any content

...

 

 

Do you have any experience on this error ? Is there any sample code to access SharePoint web service (with authentication) ?

 

Thanks,

Duy

  • September 11, 2012
  • Like
  • 0

Error: Failed to parse wsdl: Parse error: Found invalid XML. could not determine namespace bound to element prefix xsd (position: START_TAG seen ...fied" targetNamespace="http://soap.sforce.com/schemas/class/web1">... @3:187) 

 

can anybody resolse this problem?

 

hi am trying to insert the data to the salesforce using webservices soap api ..i generated WSDL file but parsing error is getting as above