• duypl
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    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

Hi,

 

I'm working on a SharePoint application. Now there is a new feature that requires the integration between SharePoint and Saleforce. Here is the inital idea: when a Saleforce user edits a Contract (or any kind of sObject) in Saleforce site, I'd like to have a new custom textbox field and a button next to it. Clicking on button results opening a new window in browser that lists documents related to the Saleforce user, and in new window they can select a document, then the id of selected document is saved back in the custom field of Contract object being edited.

 

I learnt that Visualforce can create page and custom component but it doesn't seem to match with what I need. I didn't see the help on how to to inject custom component to standard page layout :(

 

The problem I'm having is that I don't know how to implement the custom field with additional logic like that in order to insert to these View Detail and Edit layouts. Can you show me any hint or related guideline ?

 

Thanks,

Duy

  • August 30, 2012
  • Like
  • 0

Hi,

 

I'm working on a SharePoint application. Now there is a new feature that requires the integration between SharePoint and Saleforce. Here is the inital idea: when a Saleforce user edits a Contract (or any kind of sObject) in Saleforce site, I'd like to have a new custom textbox field and a button next to it. Clicking on button results opening a new window in browser that lists documents related to the Saleforce user, and in new window they can select a document, then the id of selected document is saved back in the custom field of Contract object being edited.

 

I learnt that Visualforce can create page and custom component but it doesn't seem to match with what I need. I didn't see the help on how to to inject custom component to standard page layout :(

 

The problem I'm having is that I don't know how to implement the custom field with additional logic like that in order to insert to these View Detail and Edit layouts. Can you show me any hint or related guideline ?

 

Thanks,

Duy

  • August 30, 2012
  • Like
  • 0