• alext
  • NEWBIE
  • 50 Points
  • Member since 2010

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

I've used the javascript example as an base to serve a Visualforce page with streaming API enabled.

With a few modifications on the example everything is the same.

 

I get error's on the connect command and then it gets into an endless handshake/connect loop.

The response in firefox console is saying 'unknown client':

 

[{"channel":"/meta/connect","advice":{"reconnect":"handshake","interval":500},"error":"402::Unknown client","successful":false,"id":"3"}]



i've tried different browsers and even different versions of cometd distribution ( 2.1.0 and 2.3.0 instead of 2.2.0 given in example )

 

When I subscribe to the topic with the workbench everything just works fine. Is it because i'm serving the listeners in VF ? or is the combinitation with Jquery.comet?

Hi,

 

I would like to share that all Developer Orgs are enabled with Streaming API.

 

We appreciate all your help and feedback!

 

Thank you,

 

--alex

  • February 02, 2012
  • Like
  • 0

Hi,

We are very excited to see APEX REST going GA in the Winter '12 release.

Special thanks to all developers that took the time to use the new feature and provide valuable feedback to our team. We really appreciate your participation in the pilot. Also we look forward to future collaboration. Thank you!

As you know, Apex REST API was previously available as a pilot in Summer'11. As a pilot release, we gather feedback and make adjustments prior to final GA releases. Below is an update we made in APEX REST prior to GA - please review it:

* Cookie support has been removed from RestRequest and RestResponse. The addCookie method and cookies property have been removed from both of these classes, and use of the following headers in the addHeader method isn't allowed: "cookie", "set-cookie", "set-cookie2", "content-length" and "authorization". Our security team felt this led to a more secure design overall.

If you participated in the Summer '11 pilot release please review your implementation to account for this update.

For more information about Apex REST, see the Force.com Apex Code Developer's Guide.

Thank you,

API Team


  • September 27, 2011
  • Like
  • 0

Hi,

 

If you would like to participate in the Streaming API Dev Preview let me know.

 

I have a few activation codes to share! Force MVPs also have codes. :)

 

We really appreciate your interest!

 

Thank you!

 

--alex

  • July 10, 2011
  • Like
  • 0

Hi,

 

If you are having problems getting your Org to be REST API enabled.

 

Please email me at: atoussaint at salesforce dot com

 

And I will make sure it gets enabled for you to start working with it.

 

Apologies for any inconvenience.

 

Cheers,

 

--alex

  • December 22, 2010
  • Like
  • 0

Please find below a temporary link to the REST API Pilot docs:

 

http://wiki.developerforce.com/images/c/c9/Api_rest.pdf

 

The updated doc page including this doc will be live shortly.

 

Cheers,

 

--alex

 

  • October 26, 2010
  • Like
  • 0

Hi,

 

I would like to share that all Developer Orgs are enabled with Streaming API.

 

We appreciate all your help and feedback!

 

Thank you,

 

--alex

  • February 02, 2012
  • Like
  • 0

Right now, we use MySQL with cronjob to send call to PayPal API for any new transactions every 5 minutes throughout the day. Then send to SF through informatica.

 

Are we able to call out to a 3rd party system like PayPal and instantly be updated if there are new transactions?

 

Thanks

Hi,

We are very excited to see APEX REST going GA in the Winter '12 release.

Special thanks to all developers that took the time to use the new feature and provide valuable feedback to our team. We really appreciate your participation in the pilot. Also we look forward to future collaboration. Thank you!

As you know, Apex REST API was previously available as a pilot in Summer'11. As a pilot release, we gather feedback and make adjustments prior to final GA releases. Below is an update we made in APEX REST prior to GA - please review it:

* Cookie support has been removed from RestRequest and RestResponse. The addCookie method and cookies property have been removed from both of these classes, and use of the following headers in the addHeader method isn't allowed: "cookie", "set-cookie", "set-cookie2", "content-length" and "authorization". Our security team felt this led to a more secure design overall.

If you participated in the Summer '11 pilot release please review your implementation to account for this update.

For more information about Apex REST, see the Force.com Apex Code Developer's Guide.

Thank you,

API Team


  • September 27, 2011
  • Like
  • 0

this technology approach seemed to have good potential, but like all there are issues..

 

we've identified a number that need addressing, bu tthere hasn't been much activity here,

and at least  I have not received any offline contact.

 

is this technology going forward? I have some real technical issues to solve where this might help,

but not in its current form.. do I spend more time waiting here, or do I discard this approach and go back to building something on my own.

 

I'm not complaining, just trying to plan where I spend my time.

 

I MUST solve the problems else my company cannot get their money's worth from the platform licenses they buy

 

sam

Hi,

How to use APEX REST API?

I am using developer edition.How to get it?

If possible please share the example links also.

 

Thanks,

Krishna.

I write a simple streaming client. However, i found the client can't receive the notification when I UPDATED a existent record.

 

My client can receive the notification when i created a new record.

 

Does Streaming API doesn't push data to client when updating a record?

 

Thanks

zg

Hi All

 

This is my code

public class pay
 {
 public void transefer()
{
 Http h = new Http();
 HttpRequest req = new HttpRequest();
 //String url1 = 'https://api-3t.sandbox.paypal.com/2.0/';
 
 String url='https://svcs.sandbox.paypal.com/AdaptivePayments/Pay ';
 string un='radhik_1310032695_biz_api1.dskvap.com';
 //string un='radhik_1311331870_per@dskvap.com';
 //string pw='311331850';
 string pw='1310032746';
   string sig ='ALIeMNX23qxDxiFSuqGvrVD7fZmrAiLQwRfHOZzphVWLml57Bz8XsGA5';

 string body='<?xml version="1.0" encoding="utf-8" ?>';
body+='<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">';
 body+='<SOAP-ENV:Header><RequesterCredentials xmlns="urn:ebay:api:PayPalAPI">';
body+='<Credentials xmlns="urn:ebay:apis:eBLBaseComponents">';
body+='<Username>'+un+'</Username><Password>'+pw+'</Password><Signature>'+sig+'</Signature>';
body+='</Credentials></RequesterCredentials></SOAP-ENV:Header>';
body+='<SOAP-ENV:Body><PayRequest xmlns="http://svcs.paypal.com/types/ap">';
 body+='<actionType xmlns="">PAY</actionType>';
 body+='<requestEnvelope xmlns=""><errorLanguage>en_US</errorLanguage></requestEnvelope>';
 body+='<cancelUrl xmlns="">http://www.xchaos.co.uk</cancelUrl>';
body+='<currencyCode xmlns="">USD</currencyCode><feesPayer xmlns="">EACHRECEIVER</feesPayer>';
 body+='<receiverList xmlns=""> <receiver><amount>100</amount><email>radhik_1311331396_biz@dskvap.com</email></receiver></receiverList>';
 body+='<clientDetails><ipAddress>183.82.96.26</ipAddress><applicationId>APP-80W284485P519543T</applicationId></clientDetails>';
  body+=' <ipnNotificationUrl>http://www.xchaos.co.uk</ipnNotificationUrl>';
     // body+='<trackingId>1234</trackingId>';
 
      body+='<returnUrl xmlns="">http://www.xchaos.co.uk</returnUrl>';
    body+='</PayRequest>';
    
  body+='</SOAP-ENV:Body>';
  
body+='</SOAP-ENV:Envelope>';
 
   req.setBody(body);
  req.setEndpoint(url);
  //req.setEndpoint(url1);
  req.setMethod('POST');
  req.setHeader('Content-length', '1753' );
  req.setHeader('Content-Type', 'text/xml;charset=UTF-8'); 
  req.setHeader('SOAPAction','');
  req.setHeader('Host','api-aa.sandbox.paypal.com');
  HttpResponse res =h.send(req);
  String xml = res.getBody();
  system.debug('----------'+res.getbody());
   
}
 
}

 i am getting errors like wuthorization failed invalid username and password,even i gave valid credentials

 

 

thank you in advance

rajesh

Hi,

 

If i subscribe a PushTopic though query string "SELECT Id,Name,BillingCity FROM Account Where Name Like 'sfdc%' ", let's assum the name of this PushTopic called 'Account_SFDC_Like'.  Then how can i upsubscribe this PushTopic?

 

Just delete this PushTopic record? Or some other ways?

 

Thx

zg

 

 

I've used the javascript example as an base to serve a Visualforce page with streaming API enabled.

With a few modifications on the example everything is the same.

 

I get error's on the connect command and then it gets into an endless handshake/connect loop.

The response in firefox console is saying 'unknown client':

 

[{"channel":"/meta/connect","advice":{"reconnect":"handshake","interval":500},"error":"402::Unknown client","successful":false,"id":"3"}]



i've tried different browsers and even different versions of cometd distribution ( 2.1.0 and 2.3.0 instead of 2.2.0 given in example )

 

When I subscribe to the topic with the workbench everything just works fine. Is it because i'm serving the listeners in VF ? or is the combinitation with Jquery.comet?

Hello,

 

Is it possible to create multiple POST request which in same controller with some sort of identifier? I could have created custom switch statements but then I need to parse json and it's just a pain as there is no good way to do it in Apex. Thanks, Kam

 

e.g.

 

@RestResource(urlMapping='/ContactAccountController/*')
global class DealAccountRestResource {

@HttpPost
    global static String createAccount(Account account) {
        return account.id;
    }


@HttpPost
    global static String createContact(Contact c) {
        return c.id;
}


@HttpPost
    global static String updateContact(Contact c) {
        return c.id;
}


 

 

 

 

The following code works in Apex Rest enabled sandbox.

However after deploying the same code to production it returns

 

[ {
  "message" : "Could not find a match for URL /MyTask",
  "errorCode" : "NOT_FOUND"
} ]

 

@RestResource(urlMapping='/MyTask/*')
global with sharing class TaskResource {
    @HttpGet
    global static Task[] doGet(RestRequest req, RestResponse res){
        Task[] result = [Select  Id, Subject, Status, ActivityDate, Priority, Description, WhatId, What.Name
                  From Task
                   where Status <> 'Completed' and ownerid = :UserInfo.getUserId() order by activitydate];
        return result;
    }
}

 

/salesforce.com/services/apexrest/MyTask

 

 

Suggestions?

 

 

In our customer service environment our support person will be working on at least 30 issues constantly, and their lifetime is in multi-digit days.  we will be using the console or console 2 UI's to view the list of issues to work on.

 

once u select an issue, the list goes away, and it might be hours til you get back to the list again.

we wanted to use the streaming api as a 'wakeup' type operation that could be driven via javascript, and so could

refresh and pop the list view, if an important issue arrived while they were off the list view.. (like a severity 1 issue while they were working a long sev 2 issue). 

 

but each support person is looking at a different (unique) view of the case list.  So, I would want to register a 'topic' for each support person, to have their notification sent..  I have 900 such support personnel.. and 20 topics clearly wouldn't cover that.

 

we were going to develop a polling javascript solution that did this, but it seems such a waste of processor power haveing 900 polls every 10 seconds. (we have unlimited so aren't worried about the api count, but want to be a good resource consumer citizen too)

 

any suggestions on design alternatives?

Hi,

 

If you would like to participate in the Streaming API Dev Preview let me know.

 

I have a few activation codes to share! Force MVPs also have codes. :)

 

We really appreciate your interest!

 

Thank you!

 

--alex

  • July 10, 2011
  • Like
  • 0

The Force.com Streaming API developer preview lets you push data from your Force.com applications to clients in a secure and scalable way using a persistent HTTP connection. 

 

Join the webinar on July 7 to:

  • Get familiar with typical use cases for this Streaming API 
  • Learn about Comet and persistent HTTP technologies 
  • See the Streaming API in action 
  • Understand the data model 

Access to this developer preview will be very limited. Details of the developer preview will be shared during the webinar .

 

> Sign-up for Webinar