softlayer api : How to upgrade a block storage volume size - api

i tried to upgrade block(performance) storage volume and IOPs via API.
test code returns the error message :
"Error: com.softlayer.api.ApiException$Internal: Invalid price Block Storage (189443) provided on the order container.(code: SoftLayer_Exception_Order_Item_Invalid, status: 500)"
I am using placeOrder and verifyOrder method for order.
where can i find sample code to upgrade storage volume?
public void test03() throws Exception {
System.out.println("\nStorage Upgrade Test Start !!\n");
ApiClient client = new RestApiClient().withCredentials(username, apiKey);
com.softlayer.api.service.container.product.order.network.storage.asaservice.Upgrade storage = new com.softlayer.api.service.container.product.order.network.storage.asaservice.Upgrade();
Storage.Service service = Storage.service(client, 38366457L);
service.withMask().accountId();
service.withMask().id();
service.withMask().bytesUsed();
service.withMask().osTypeId();
service.withMask().iops();
service.withMask().username();
service.withMask().allowedIpAddresses();
service.withMask().replicationStatus();
service.withMask().parentVolume();
service.withMask().parentVolume().volumeStatus();
service.withMask().serviceResourceBackendIpAddress();
service.withMask().serviceResource().datacenter();
service.withMask().allowedHardware().allowedHost().credential().username().password();
service.withMask().allowedSubnets();
service.withMask().allowedVirtualGuests().allowedHost().credential().username().password();
service.withMask().allowedIpAddresses().allowedHost().credential().username().password();
service.withMask().snapshotCapacityGb();
service.withMask().snapshotSizeBytes();
service.withMask().snapshotSpaceAvailable();
service.withMask().parentVolume().snapshotSizeBytes();
service.withMask().parentVolume().snapshotSpaceAvailable();
service.withMask().properties().type();
service.withMask().billingItem();
service.withMask().billingItem().children().activeFlag();
service.withMask().billingItem().children().item();
service.withMask().properties().volume();
service.withMask().capacityGb();
service.withMask().nasType();
Storage storage1 = service.getObject();
Order order = null;
try {
// 1. Storage volume
storage.setVolumeSize(80L);
storage.setIops(400L);
storage1.setUpgradableFlag(true);
storage.setVolume(storage1);
order = storage;
// Set SoftLayer Package Id
order.setPackageId(759L);
order.setUseHourlyPricing(true);
// Set Data Center Location
order.setLocation("1854895");
List<Price> S_prices = new ArrayList<Price>();
//International Services
Price price1 = new Price();
price1.setId(189433L);
// 2. Block/File Storage
Price price2 = new Price();
price2.setId(189443L); //Block Storage
//Storage Space
Price price3 = new Price();
price3.setId(189753L);
//IOPS
Price price4 = new Price();
price4.setId(189813L);
S_prices.add(price1);
S_prices.add(price2);
S_prices.add(price3);
S_prices.add(price4);
// Set Item Prices
order.getPrices().addAll(S_prices);
Order baseContainer = new Order();
baseContainer.getOrderContainers().add(order);
// verify
Order verifiedOrder = com.softlayer.api.service.product.Order.service(client).verifyOrder(baseContainer);
// placeorder
com.softlayer.api.service.container.product.order.Receipt receipt = com.softlayer.api.service.product.Order.service(client).placeOrder(baseContainer, false);
} catch (Exception e) {
System.out.println("Error: " + e);
} finally {
System.out.println("\nTest End !!\n");
}
}

try deleting this price:
// 2. Block/File Storage
Price price2 = new Price();
price2.setId(189443L); //Block Storage
As you are upgrading a "storage_as_a_service" you only need that price (189433) and the prices for the volume size and IOPS
This is the RESTFul request that I used:
POST https://$USERNAME:$APIKEY#api.softlayer.com/rest/v3/SoftLayer_Product_Order/placeOrder
{
"parameters": [{
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService_Upgrade",
"packageId": 759,
"volume": {
"id": 38740447
},
"volumeSize": 2000,
"iops": 1000,
"useHourlyPricing": true,
"prices": [{
"id": 190233
}, {
"id": 190293
}, {
"id": 189433
}],
"quantity": 1
}]
}
So I recommend you:
1.- Try upgrading your block storage using the control portal, it may an issue with your account or your block storage.
2.- Try the upgrading using the RESTFul request, maybe the java client is sending wrong the request.
3.- Try Looging your Java code and see if the RESTFul request that your Java code is sending is similar to the RESTFUL request that I posted for that you need to this:
Logging Logging the requests and response to stdout can be enabled by
invoking withLoggingEnabled on the RestApiClient. In order to log
elsewhere, simply make your own implementation of RestApiClient with
logRequest and logResponse overridden.
e.g.
ApiClient client = new RestApiClient().withCredentials(username, apiKey).withLoggingEnabled();
Regards

I solved a problem.
my code had two issue.
first, in case of upgrading a storage(Block/File), the Type isn't need
// 2. Block/File Storage
Price price2 = new Price();
price2.setId(189443L); //Block Storage
two, Wrapping Order of the upgrade's container isn't need
because to upgrade storage, the ComplexType must be "SoftLayer_Container_Product_Order_Network_Storage_AsAService_Upgrade"
but Order's ComplexType is "SoftLayer_Container_Product_Order"
Order baseContainer = new Order(); <-- ComplextType : SoftLayer_Container_Product_Order
baseContainer.getOrderContainers().add(order);
so i deleted them and I modifed the verifyOrder and placeOrder parameters to order variable.
Order verifiedOrder = com.softlayer.api.service.product.Order.service(client).verifyOrder(order);
// placeorder
com.softlayer.api.service.container.product.order.Receipt receipt = com.softlayer.api.service.product.Order.service(client).placeOrder(order, false);
this is a final code
public void test03() throws Exception {
System.out.println("\nStorage Upgrade Test Start !!\n");
ApiClient client = new RestApiClient().withCredentials(username, apiKey);
com.softlayer.api.service.container.product.order.network.storage.asaservice.Upgrade storage = new com.softlayer.api.service.container.product.order.network.storage.asaservice.Upgrade();
Storage.Service service = Storage.service(client, 38366457L);
service.withMask().id();
Storage storage1 = service.getObject();
Order order = null;
try {
// 1. Storage volume
storage.setVolumeSize(80L);
storage.setIops(400L);
storage1.setUpgradableFlag(true);
storage.setVolume(storage1);
order = storage;
// Set SoftLayer Package Id
order.setPackageId(759L);
order.setUseHourlyPricing(true);
// Set Data Center Location
order.setLocation("1854895");
List<Price> S_prices = new ArrayList<Price>();
//International Services
Price price1 = new Price();
price1.setId(189433L);
//Storage Space
Price price3 = new Price();
price3.setId(189753L);
//IOPS
Price price4 = new Price();
price4.setId(189813L);
S_prices.add(price1);
S_prices.add(price3);
S_prices.add(price4);
// Set Item Prices
order.getPrices().addAll(S_prices);
// verify
Order verifiedOrder = com.softlayer.api.service.product.Order.service(client).verifyOrder(order);
// placeorder
com.softlayer.api.service.container.product.order.Receipt receipt = com.softlayer.api.service.product.Order.service(client).placeOrder(order, false);
} catch (Exception e) {
System.out.println("Error: " + e);
} finally {
System.out.println("\nTest End !!\n");
}
}

Related

Cosmos DB - changeFeedWorker not working properly after Cosmos db reach 50 gb size and splitted db into 2 partitions

Just want to know if someone already get some issues with changeFeedWorker after that cosmos db reach 50Gb size limit for one partition and automatically split it into 2 partitions.
Since this split we have observed that after adding many new items to the db, changefeedworkers was not always triggered and our view that should get changes is partially updated.
In the lease container we can see now that we moved to 2 "LeaseToken" (1 and 2) was 0 before.
If someone has an idea where to look as it was working fine before the db split.
Here is how I start my worker:
async Task IChangeFeedWorker.StartAsync()
{
await _semaphoreSlim.WaitAsync();
string operationName = $"{nameof(CosmosChangeFeedWorker)}.{nameof(IChangeFeedWorker.StartAsync)}";
using var _ = BeginChangeFeedWorkerScope(_logger, operationName, _processorName, _instanceName);
try
{
if (Active)
{
return;
}
Container eventContainer = _cosmosClient.GetContainer(_databaseId, _eventContainerId);
Container leaseContainer = _cosmosClient.GetContainer(_databaseId, _leaseContainerId);
_changeFeedProcessor = eventContainer
.GetChangeFeedProcessorBuilder<CosmosEventChange>(_processorName, HandleChangesAsync)
.WithInstanceName(_instanceName)
.WithLeaseContainer(leaseContainer)
.WithStartTime(_startTimeOfTrackingChanges)
.Build();
await _changeFeedProcessor.StartAsync();
Active = true;
_logger.LogInformation(
"Change feed processor instance has been started.",
_processorName, _instanceName);
}
catch (Exception e)
{
_logger.LogError(e,
"Starting of change feed processor instance has failed.",
_processorName, _instanceName);
_changeFeedProcessor = null;
throw;
}
finally
{
_semaphoreSlim.Release();
}
}

Getting all bids from each Header bidding partners

We are implementing some header bidding partners on our wrapper using prebid. Is it possible to get all bids from each ssp.
Any help appreciated.
If you’re asking about demand, this is dependent on each SSP. For example there may be a segment pixel or placement in one SSP that will always give you a $10 bid, but that wouldnt apply to the other SSPs.
If your asking about getting data on all the bids, you may want to check out pbjs.getBidResponses() which returns an object with the ad units and bids
Heres a sample response from pbjs.getBidResponses() which can then be used however you'd need that data:
{
"div-id-one": {
"bids": [
{
"bidderCode": "appnexus",
"width": 970,
"height": 250,
"statusMessage": "Bid available",
"adId": "1293a95bb3e9615",
"mediaType": "banner",
"creative_id": 77765220,
"cpm": 0.7826,
"adUrl": "https://...",
"requestId": "57f961f3-a32b-45df-a180-9d5e53fb9070",
"responseTimestamp": 1513707536256,
"requestTimestamp": 1513707535321,
"bidder": "appnexus",
"adUnitCode": "div-id-one",
"timeToRespond": 935,
"pbLg": "0.50",
"pbMg": "0.70",
"pbHg": "0.78",
"pbAg": "0.75",
"pbDg": "0.78",
"pbCg": "0.78",
"size": "970x250",
"adserverTargeting": {
"hb_bidder": "appnexus",
"hb_adid": "1293a95bb3e9615",
"hb_pb": "0.78",
"hb_size": "970x250"
}
}
]
},
"div-id-two": {
"bids": []
}
}
Theres also a great example on prebid.org on how to output this to console.table that could be helpful as well:
var responses = pbjs.getBidResponses();
var output = [];
for (var adunit in responses) {
if (responses.hasOwnProperty(adunit)) {
var bids = responses[adunit].bids;
for (var i = 0; i < bids.length; i++) {
var b = bids[i];
output.push({
'adunit': adunit, 'adId': b.adId, 'bidder': b.bidder,
'time': b.timeToRespond, 'cpm': b.cpm, 'msg': b.statusMessage
});
}
}
}
if (output.length) {
if (console.table) {
console.table(output);
} else {
for (var j = 0; j < output.length; j++) {
console.log(output[j]);
}
}
} else {
console.warn('NO prebid responses');
}
There is also a chrome extensions called Prebid helper that do the same as console snippet but with less clicks.
However that is useful for initial setup debug. If you need to gather aggregated data on all demand partners - bids, timeouts, wins etc. You will need to run third party wrapper analytics or use analytics adapter. It's not free but it usually is priced depending on your load on the analytics server. For example https://headbidder.net/pricing
Try out the Chrome Extension called Adwizard. It's been built to debug prebid setups. Shows you all networks and bids per adunit. CPM and Size included.
https://chrome.google.com/webstore/detail/adwizard/kndnhcfdajkaickocacghchhpieogbjh/?ref=stackoverflow

Unable to create Sales Order from JCO

I am using the below code to call the BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order . SAP machine is generating a SO number and sending as a response but when i check with va03 for the SO number which i have received sales order is not created .
If i do manually using va01 with the same data i can create the sales order successfully. Please need help on this .
public static void createSalesOrder() {
try {
JCoDestination destination = JCoDestinationManager.getDestination("ABAP_AS_WITH_POOL");
JCoFunction functionCreateOrder = destination.getRepository().getFunction("BAPI_SALESORDER_CREATEFROMDAT2");
//this is the bapi
JCoFunction functionTransComit = destination.getRepository().getFunction("BAPI_TRANSACTION_COMMIT");
JCoStructure orderHeaderIn = functionCreateOrder.getImportParameterList().getStructure("ORDER_HEADER_IN");
orderHeaderIn.setValue("SALES_ORG", "2000");//sales organisation
orderHeaderIn.setValue("DISTR_CHAN", "20");//distribution channel
orderHeaderIn.setValue("DIVISION", "20");// sales division
orderHeaderIn.setValue("DOC_TYPE", "ZAR");// document type
orderHeaderIn.setValue("PURCH_NO_C", "TEST123");
JCoTable orderPartners = functionCreateOrder.getTableParameterList().getTable("ORDER_PARTNERS");
// WE,AG,SP,PH
// AG Sold to Party
// WE Ship to Partyx
orderPartners.appendRow();
orderPartners.setValue("PARTN_ROLE", "AG");//partner role ag is sold to party
orderPartners.setValue("PARTN_NUMB", "0000000035");// partner number
orderPartners.appendRow();
orderPartners.setValue("PARTN_ROLE", "WE");//we is ship tp party
orderPartners.setValue("PARTN_NUMB", "0000000035");// partner number
System.out.println(orderPartners);
JCoTable orderItemsIn = functionCreateOrder.getTableParameterList().getTable("ORDER_ITEMS_IN");
orderItemsIn.appendRow();
orderItemsIn.setValue("MATERIAL", "PEN_ARN");// material
System.out.println(orderItemsIn);
JCoTable orderSchedulesIn = functionCreateOrder.getTableParameterList().getTable("ORDER_SCHEDULES_IN");
orderSchedulesIn.appendRow();
orderSchedulesIn.setValue("REQ_QTY", "10");// required quantity
System.out.println(orderSchedulesIn);
functionCreateOrder.execute(destination);
// System.out.println(functionCreateOrder);
JCoTable returnTable = functionCreateOrder.getTableParameterList().getTable("RETURN");
System.out.println(returnTable);
System.out.println(returnTable.getString("MESSAGE"));
System.out.println("sales order number is : "
+ functionCreateOrder.getExportParameterList().getValue("SALESDOCUMENT"));
functionTransComit.execute(destination);
} catch (JCoException ex) {
System.out.println(ex.getMessage());
} finally {
System.out.println("Creating sales order ends");
}
}
This depends on your JCo version, but at least with JCo 3 you need to execute your call to BAPI_TRANSACTION_COMMIT within the same context as your function call to BAPI_SALESORDER_CREATEFROMDAT2. Currently both calls are executed in individual contexts, so the second call to BAPI_TRANSACTION_COMMIT doesn't really commit anything. You have to create a context first:
JCoContext.begin(destination);
// execute both function calls to
// BAPI_SALESORDER_CREATEFROMDAT2 and
// BAPI_TRANSACTION_COMMIT
JCoContext.end(destination);

Google API for getting maximum number of licenses in a Google Apps domain

I have a Google Apps Script function used for setting up accounts for new employees in our Google Apps domain.
The first thing it does is makes calls to the Google Admin Settings API and retrieves the currentNumberOfUsers and maximumNumberOfUsers, so it can see if there are available seats (otherwise a subsequent step where the user is created using the Admin SDK Directory API would fail).
It's been working fine until recently when our domain had to migrate from Postini to Google Vault for email archiving.
Before the migration, when creating a Google Apps user using the Admin SDK Directory API, it would increment the currentNumberOfUsers by 1 and the new user account user would automatically have access to all Google Apps services.
Now after the migration, when creating a Google Apps user, they aren't automatically assigned a "license," so I modified my script to use the Enterprise License Manager API and now it assigns a "Google-Apps-For-Business" license. That works fine.
However, the currentNumberOfUsers is now different from the number of assigned licenses, and "Google-Apps-For-Business" is only one of several different types of licenses available.
I can get the current number of assigned "Google-Apps-For-Business" licenses by running this:
var currentXml = AdminLicenseManager.LicenseAssignments.listForProductAndSku('Google-Apps', 'Google-Apps-For-Business', 'domain.com', {maxResults: 1000});
var current = currentXml.items.toString().match(/\/sku\/Google-Apps-For-Business\/user\//g).length;
But the number that produces is different from currentNumberOfUsers.
All I really need to do now is get the maximum number of owned "Google-Apps-For-Business" licenses so the new employee setup script can determine whether there are any available.
I checked the API Reference documentation for the following APIs but...
Enterprise License Manager API → Doesn't have a method for getting the maximum or available number of licenses.
Google Admin Settings API → Doesn't deal with licenses, only "users."
Admin SDK Directory API User resource → Doesn't deal with licenses.
Google Apps Reseller API → This API seems to have what I need, but it's only for Reseller accounts.
I know I can program my new employee setup script to just have a try/catch seeing if it would be able to create the user and assign the license, and end the script execution gracefully if it can't, but that doesn't seem efficient.
Also, part of the old script was that if there were less than X seats available, it would email me a heads-up to order more. I can program a loop that attempts to repeatedly create dummy users and assign them licenses and count the number of times it can do that before it fails, then delete all the dummy users, but, once again, that's not efficient at all.
Any ideas?
Update 3/11/2020: Since the Admin Settings API had shut down a few years ago I've been using the Enterprise License Manager API to get the current number of used licenses, like this:
function getCurrentNumberOfUsedGoogleLicenses(skuId) {
var success = false, error = null, count = 0;
var adminEmail = 'admin#domain.com';
var gSuiteDomain = adminEmail.split('#')[1];
// for more information on the domain-wide delegation:
// https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority
// the getDomainWideDelegationService() function uses this:
// https://github.com/gsuitedevs/apps-script-oauth2
var service = getDomainWideDelegationService('EnterpriseLicenseManager: ', 'https://www.googleapis.com/auth/apps.licensing', adminEmail);
if (skuId == 'Google-Apps-Unlimited') var productId = 'Google-Apps';
else return { success: success, error: "Unsupported skuId", count: count };
var requestBody = {};
requestBody.headers = {'Authorization': 'Bearer ' + service.getAccessToken()};
requestBody.method = "GET";
requestBody.muteHttpExceptions = false;
var data, pageToken, pageTokenString;
var maxAttempts = 5;
var currentAttempts = 0;
var pauseBetweenAttemptsSeconds = 3;
loopThroughPages:
do {
if (typeof pageToken === 'undefined') pageTokenString = "";
else pageTokenString = "&pageToken=" + encodeURIComponent(pageToken);
var url = 'https://www.googleapis.com/apps/licensing/v1/product/' + productId + '/sku/' + skuId + '/users?maxResults=1000&customerId=' + gSuiteDomain + pageTokenString;
try {
currentAttempts++;
var response = UrlFetchApp.fetch(url, requestBody);
var result = JSON.parse(response.getContentText());
if (result.items) {
var licenseAssignments = result.items;
var licenseAssignmentsString = '';
for (var i = 0; i < licenseAssignments.length; i++) {
licenseAssignmentsString += JSON.stringify(licenseAssignments[i]);
}
if (skuId == 'Google-Apps-Unlimited') count += licenseAssignmentsString.match(/\/sku\/Google-Apps-Unlimited\/user\//g).length;
currentAttempts = 0; // reset currentAttempts before the next page
}
} catch(e) {
error = "Error: " + e.message;
if (currentAttempts >= maxAttempts) {
error = 'Exceeded ' + maxAttempts + ' attempts to get license count: ' + error;
break loopThroughPages;
}
} // end of try catch
if (result) pageToken = result.nextPageToken;
} while (pageToken);
if (!error) success = true;
return { success: success, error: error, count: count };
}
However, there still does not appear to be a way to get the maximum number available to the domain using this API.
Use CustomerUsageReports.
jay0lee is kind enough to provide the GAM source code in Python. I crudely modified the doGetCustomerInfo() function into Apps Script thusly:
function getNumberOfLicenses() {
var tryDate = new Date();
var dateString = tryDate.getFullYear().toString() + "-" + (tryDate.getMonth() + 1).toString() + "-" + tryDate.getDate().toString();
while (true) {
try {
var response = AdminReports.CustomerUsageReports.get(dateString,{parameters : "accounts:gsuite_basic_total_licenses,accounts:gsuite_basic_used_licenses"});
break;
} catch(e) {
//Logger.log(e.warnings.toString());
tryDate.setDate(tryDate.getDate()-1);
dateString = tryDate.getFullYear().toString() + "-" + (tryDate.getMonth() + 1).toString() + "-" + tryDate.getDate().toString();
continue;
}
};
var availLicenseCount = response.usageReports[0].parameters[0].intValue;
var usedLicenseCount = response.usageReports[0].parameters[1].intValue;
Logger.log("Available licenses:" + availLicenseCount.toString());
Logger.log("Used licenses:" + usedLicenseCount.toString());
return availLicenseCount;
}
I would recommend exploring GAM which is a tool that gives command line access to the administration functions of your domain.

fetch gmail calendar events in mvc 4 application

I am working on mvc 4 web application. I want to implement a functionality wherein the scenario is as follows-
There will be gmail id as input for ex: abc#gmail.com. When user will enter this, application should fetch all the calendar events of that respective email id and display them.
I have gone through this-
http://msdn.microsoft.com/en-us/library/live/hh826523.aspx#cal_rest
https://developers.google.com/google-apps/calendar/v2/developers_guide_protocol
I am new to this and i have searched a lot but not got any solution. Please help! Thanks in advance!
Got the solution . Just refer this.
https://github.com/nanovazquez/google-calendar-sample
Please check the steps below.
Add Google Data API SDK.
Try this code.. I wrote this code for one project but I removed some codes that are not related to Google Calender. If you don't want to use SDK, you can simply do http-get or http-post to your calender link based on spec.
CalendarService service = new CalendarService("A.Name");
const string GOOGLE_CALENDAR_FEED = "https://www.google.com/calendar/feeds/";
const string GOOGLE_CALENDAR_DEFAULT_ALL_CALENDAR_FULL = "default/allcalendars/full";
const string GOOGLE_CALENDAR_ALL_PRIVATE_FULL = "private/full";
private void SetUserCredentials() {
var userName = ConfigurationManager.AppSettings["GoogleUserName"];
var passWord = Security.DecryptString(ConfigurationManager.AppSettings["GooglePasswrod"]).ToInsecureString();
if (userName != null && userName.Length > 0) {
service.setUserCredentials(userName, passWord);
}
}
private CalendarFeed GetCalendarsFeed() {
CalendarQuery calendarQuery = new CalendarQuery();
calendarQuery.Uri = new Uri(GOOGLE_CALENDAR_FEED + GOOGLE_CALENDAR_DEFAULT_ALL_CALENDAR_FULL);
CalendarFeed resultFeed = (CalendarFeed)service.Query(calendarQuery);
return resultFeed;
}
private TherapistTimeSlots GetTimeSlots(CalendarEntry entry2) {
string feedstring = entry2.Id.AbsoluteUri.Substring(63);
var postUristring = string.Format("{0}{1}/{2}", GOOGLE_CALENDAR_FEED, feedstring, GOOGLE_CALENDAR_ALL_PRIVATE_FULL);
EventFeed eventFeed = GetEventFeed(postUristring);
slot.Events = new List<Event>();
if (eventFeed != null) {
var orderEventList = (from entity in eventFeed.Entries
from timeslot in ((EventEntry)entity).Times
orderby timeslot.StartTime
select entity).ToList();
}
return slot;
}
private EventFeed GetEventFeed(string postUristring) {
var eventQuery = new EventQuery();
eventQuery.Uri = new Uri(postUristring);
var h = Convert.ToInt32(DateTime.Now.ToString("HH", System.Globalization.DateTimeFormatInfo.InvariantInfo));
eventQuery.StartTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, h, 0, 0);
eventQuery.EndTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, h + 2, 0, 0);
try {
EventFeed eventFeed = service.Query(eventQuery) as EventFeed;
return eventFeed;
}
catch (Exception ex) {
/*
* http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/1c1309d9e6bd9be7
*
* Unfortunately, the calendar API will always issue a redirect to give you a
gsessionid that will optimize your subsequent requests on our servers.
Using the GData client library should be transparent for you as it is taking
care of handling those redirect; but there might some times where this error
occurs as you may have noticed.
The best way to work around this is to catche the Exception and re-send the
request as there is nothing else you can do on your part.
*/
return null;
}
}