• vvv
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I am surprised to see that there is no way to specify format specifier to parse a date time string.

 

I get the date time from a webservice response in the following fashion ''Jun 30 2010  8:00AM'. When I use a datetime.parse on this it says invalid date/time.

 

Ideally I should be able to specify a format specifier along with it possibly like 'MMM dd yyyy hh:mmp' or something to that extent.

 

Is there really no format specifier in APEX? Do I have to parse the string myself!

 

Thanks

v

  • March 22, 2011
  • Like
  • 0

Hello,

 

I am trying to execute a Http Callout to a webservice that is with windows machine and the credentials were given to me as domain\username

password

 

I wrote a simple http callout as mentioned in the docs. Did the base 64 thing for username:pwd but I keep getting

HttpResponse[Status=Unauthorized, StatusCode=401]

 

I tried to put domain as domain\username, domain:username:password with other combinations of moving domain first and last but nothing seems to work.

 

I have my authorizationheader set as follows

 

    Blob headerValue = Blob.valueOf(username + ':' + password);
    String authorizationHeader = 'NTLM ' +   EncodingUtil.base64Encode(headerValue);

 

I tried BASIC above and then tried NTLM too but with same result.

 

Any help is greatly appreciated.

 

Thanks

  • February 23, 2011
  • Like
  • 0

Hello,

 

I am trying to execute a Http Callout to a webservice that is with windows machine and the credentials were given to me as domain\username

password

 

I wrote a simple http callout as mentioned in the docs. Did the base 64 thing for username:pwd but I keep getting

HttpResponse[Status=Unauthorized, StatusCode=401]

 

I tried to put domain as domain\username, domain:username:password with other combinations of moving domain first and last but nothing seems to work.

 

I have my authorizationheader set as follows

 

    Blob headerValue = Blob.valueOf(username + ':' + password);
    String authorizationHeader = 'NTLM ' +   EncodingUtil.base64Encode(headerValue);

 

I tried BASIC above and then tried NTLM too but with same result.

 

Any help is greatly appreciated.

 

Thanks

  • February 23, 2011
  • Like
  • 0
has anyone worked with salesforce and sharepoint?  i have a prospective client wondering if the two can be integrated for membership managment needs.

thx.