• bharath11r
  • NEWBIE
  • 35 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies

I am getting a string something like from soap response 2012-02-21T11:27:54.134Z

and when i try to parse it using Datetime.Parse('2012-02-21T11:27:54.134Z') it's saying invalid time.

Could anyone please help me with this.

Thanks!

I have a webservice which will return me Any changes to Accounts happened in the last 7 days.

So basically I wrote a method which calls the webservice and parse the soap response and updates all the account records.

 

If i put this in batch I dont have any querylocator rows for my batch to pass onto Execute.For that i am returning a dummy row .

 

 global database.Querylocator start(Database.BatchableContext context){
            //Get all the Account Records whose docket numbers are not empty
            return Database.getQueryLocator([Select Id, Name From Account Limit 1]);
        }

         //Method to execute the batch
        global void execute(Database.BatchableContext context , List<sObject> scope)
        {
                    
 
              ErrorMessage = Carrier411Service.UpdateChangedCarriersBatch();
               
        }

 

For some reason its not even calling the UpdateChangedCarriesBatch. Am i missing anything..

 

How do i implement a batch where there is no querylocator. My webservice is giving me all the updated carriers.

 

 

Any help is appreciated.

 

Thanks,

Bharath

Hello ,

              I recently started developing in Apex with .net background and I am looking for insight to solve the below problem.

 

I have 30K carriers(Account) objects and need to update them on a nightly basis from a webservice (like insurance etc ).

 

I was able to successfully implement the webservice and update a single account but now I have to do that in a batch

 

Class UpdateService-- Take AccountObject and gets the latest information and does a DML.

 

ClassBatchAccounts--Gets the list of all Accounts and pass each account to above class

 

ClasScheduleBatch--Call above BatchAccounts(every day inthe morning).

 

When i implement this i am getting too many callouts.

 

I need to call webservice for each account so how can i do that in ApexBatch?

 

Any insight would be helpfull...

 

 

Hello All,

                       I am new to Force.com and have a very simple question. I have two types of accounts Customers/Carriers(Account object with different record type).

I am trying to add a new button call (Update from Webservice) which calls a static method in my class which calls the webservice and updates the account record.

Since its a standard controller could anyhelp me to where to put the code for that button action. I was able to add the button but not able to add action and code behind.

 

 

2) Account object has a custom field with PickList as Type (u,c,a, etc). After the web call out i get some  values for that account and need to assign to it. How should I assign picklist values to the object

 

Account. Country(picklist) = 'USA;CAN,AUS';

 

Can i do the above or do i need to put in a List<SelectOptions> and assign to it i.e

List<SelectOptions> opt  = new List<SelectionOptions>();

opt.add( new select option ('USA',USA);

opt.add( new select option ('CAN',CAN);

opt.add( new select option ('AUS',AUS);

Account. Country(picklist) = opt ;

 

Any help is much appreciiated.

I am trying to connect to carrier 411 webservice to pull some data but keep getting the below error everytime I call.  If i use the same soap request in SOAP UI tool its giving me soap response.  Could anyone please shed some light into it.

 

 

11:54:28.084 (84661000)|CALLOUT_REQUEST|[56]|System.HttpRequest[Endpoint=http://webservices.carrier411.com/wsLogin.cfc, Method=POST]
11:54:28.418 (418009000)|CALLOUT_RESPONSE|[56]|System.HttpResponse[Status=Moved Temporarily, StatusCode=302]

 

 

Below is the soap request

 

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <login xmlns="http://webservices.carrier411.com">
      <param1>user</param1>
      <param2>password</param2>
    </login>
  </soap:Body>
</soap:Envelope>

 

this is how i am calling the service,,,

 public static string getResponse(String request,String URL)
  {
    try{
      Http h = new Http();
      HttpRequest req = new HttpRequest();
       req.setHeader('Content-Type','text/xml;charset=utf-8');
      req.setMethod('POST');
      req.setEndpoint(URL);
      req.setBody(request);
      req.setTimeout(2000);
      System.Debug('HTTP Request is ' + req);
      HttpResponse res = h.send(req);
      
      System.Debug('HTTP Resonse is ' + res);
      return res.getBody();
    }
    catch(Exception ex) {
        throw ex;
        }
  }
 

This is the webservice  I am trying to call...I am not sure whether  i am missing anything in the header part....

webservices.carrier411.com/wsLogin.cfc?wsdl

 

 

 

 

I am newbie to salesforce.com development and I am not able to connect using Force.com IDE or Eclipse with Force Plugin.

 

Everytime i try i get an error saying

 

Unable to connect to hostname 'www.salesforce.com'

Invalid username,pwd,security token or user locked out.

Please verify/change your credentials.

 

I just created my login yesterday and was able to create tabs and objects using browser but not with IDE.

 

I resetted by securtiy token three times and combined with password but still no luck.

 

Everywhere i search i couldnt find a definitive answer.

 

Could some one please help me in connecting from Force.com IDE.

 

I just signed up as a developer and i am not associated to any company.

 

Any help would be appreciated

 

I am getting a string something like from soap response 2012-02-21T11:27:54.134Z

and when i try to parse it using Datetime.Parse('2012-02-21T11:27:54.134Z') it's saying invalid time.

Could anyone please help me with this.

Thanks!

I have a webservice which will return me Any changes to Accounts happened in the last 7 days.

So basically I wrote a method which calls the webservice and parse the soap response and updates all the account records.

 

If i put this in batch I dont have any querylocator rows for my batch to pass onto Execute.For that i am returning a dummy row .

 

 global database.Querylocator start(Database.BatchableContext context){
            //Get all the Account Records whose docket numbers are not empty
            return Database.getQueryLocator([Select Id, Name From Account Limit 1]);
        }

         //Method to execute the batch
        global void execute(Database.BatchableContext context , List<sObject> scope)
        {
                    
 
              ErrorMessage = Carrier411Service.UpdateChangedCarriersBatch();
               
        }

 

For some reason its not even calling the UpdateChangedCarriesBatch. Am i missing anything..

 

How do i implement a batch where there is no querylocator. My webservice is giving me all the updated carriers.

 

 

Any help is appreciated.

 

Thanks,

Bharath

Hi to all

 

 

I want to learn webservices and i have exp in apex and visualforce pages and triggers and test classes if any one guide means say to thanks in advance :manvery-happy:

Hello All,

                       I am new to Force.com and have a very simple question. I have two types of accounts Customers/Carriers(Account object with different record type).

I am trying to add a new button call (Update from Webservice) which calls a static method in my class which calls the webservice and updates the account record.

Since its a standard controller could anyhelp me to where to put the code for that button action. I was able to add the button but not able to add action and code behind.

 

 

2) Account object has a custom field with PickList as Type (u,c,a, etc). After the web call out i get some  values for that account and need to assign to it. How should I assign picklist values to the object

 

Account. Country(picklist) = 'USA;CAN,AUS';

 

Can i do the above or do i need to put in a List<SelectOptions> and assign to it i.e

List<SelectOptions> opt  = new List<SelectionOptions>();

opt.add( new select option ('USA',USA);

opt.add( new select option ('CAN',CAN);

opt.add( new select option ('AUS',AUS);

Account. Country(picklist) = opt ;

 

Any help is much appreciiated.

I am trying to connect to carrier 411 webservice to pull some data but keep getting the below error everytime I call.  If i use the same soap request in SOAP UI tool its giving me soap response.  Could anyone please shed some light into it.

 

 

11:54:28.084 (84661000)|CALLOUT_REQUEST|[56]|System.HttpRequest[Endpoint=http://webservices.carrier411.com/wsLogin.cfc, Method=POST]
11:54:28.418 (418009000)|CALLOUT_RESPONSE|[56]|System.HttpResponse[Status=Moved Temporarily, StatusCode=302]

 

 

Below is the soap request

 

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <login xmlns="http://webservices.carrier411.com">
      <param1>user</param1>
      <param2>password</param2>
    </login>
  </soap:Body>
</soap:Envelope>

 

this is how i am calling the service,,,

 public static string getResponse(String request,String URL)
  {
    try{
      Http h = new Http();
      HttpRequest req = new HttpRequest();
       req.setHeader('Content-Type','text/xml;charset=utf-8');
      req.setMethod('POST');
      req.setEndpoint(URL);
      req.setBody(request);
      req.setTimeout(2000);
      System.Debug('HTTP Request is ' + req);
      HttpResponse res = h.send(req);
      
      System.Debug('HTTP Resonse is ' + res);
      return res.getBody();
    }
    catch(Exception ex) {
        throw ex;
        }
  }
 

This is the webservice  I am trying to call...I am not sure whether  i am missing anything in the header part....

webservices.carrier411.com/wsLogin.cfc?wsdl

 

 

 

 

I am newbie to salesforce.com development and I am not able to connect using Force.com IDE or Eclipse with Force Plugin.

 

Everytime i try i get an error saying

 

Unable to connect to hostname 'www.salesforce.com'

Invalid username,pwd,security token or user locked out.

Please verify/change your credentials.

 

I just created my login yesterday and was able to create tabs and objects using browser but not with IDE.

 

I resetted by securtiy token three times and combined with password but still no luck.

 

Everywhere i search i couldnt find a definitive answer.

 

Could some one please help me in connecting from Force.com IDE.

 

I just signed up as a developer and i am not associated to any company.

 

Any help would be appreciated