Wednesday, February 24, 2010

Quick primer to Amazon SOAP Api Order Download

Break your calls into 2 parts:
1.First get the document ids using GetAllPendingDocuments() and store it in an array of string or anything that you can enumerate
List pendingDocuments = yourproxy.GetAllPendingDocuments(AMAZONCODE);

2.Next iterate through the documentids and call GetDocument()
foreach (string id in pendingDocuments)
StreamReader txtReader = yourProxy.GetDocument(id);
//Pump it into XmlDocument
XmlDocument document = new XmlDocument();
Follow my on my profile for Amazon related solutions suggested by me at

Tuesday, February 23, 2010

Amazon Seller Central integration using Soap/XML Services

The documentation for Amazon Web Services API for Seller Central is fairly detailed and it would appear that it would be a few easy steps required and you should be able to port your application to work with Seller Central easily.
This is exactly the impression ,I had in the beginning, when I started the integration work for my company.
It turned out that the documents available provided a few very elementary samples and there was a shortage of full examples and API information which could be used while developing for the real world scenario.There are quite a few things missing and so I thought I bring my experience into this document.

Attached HERE is the full document explaining the whole process along with the FEED Design and explaination.

Feel free to contact me incase you are stuck with any Amazon Integration related issue and I will be happy to suggest solutions based on my knowedge.

Monday, February 15, 2010

REST vs SOAP XML WebServices

In a discussion with my friend and I gave him a big technical introduction of how we were using Xml Webservices as our enterprise platform in our company.
He came up with a query for which I did not have any answer.

He enquired whether we were using REST Webservices or not?

I came back defeated and battered and here is what I found out during my followup on the technology and I though I should put up here.

Regarding REST Web Service?

REST stands for Representational state transfer where
1. Each operation in a service is uniquely identified.
2. Each operation has their, own unique URI and can be accessed via this URL all across the web.
3. Each URL is an object representation.
4. The Object can retreived using HTTP GET.
5. The Object can be deleted using a POST or PUT, use DELETE to modify the object

It also happens that Yahoo web services use REST, including Flickr, API uses it, pubsub, bloglines, technorati.

EBay and Amazon have web services for both REST and SOAP.

Google use SOAP web services only, except that Blogger uses XML-RPC. Of course our company uses SOAP too :)


REST api's are a new development and most the big player apis have mostly come out this year.
So REST is definitely the latest 'COOL' way to create a web service.

The main advantages of REST web services are:
* Lightweight - not a lot of extra xml markup
* Human Readable Results
* Easy to build - no toolkits required

SOAP also has some advantages:

* Easy to consume - sometimes
* Rigid - type checking, adheres to a contract
* Development tools available at hand.

Travel back in time machine of .Net Remoting

I accidently happened to hit upon one of my articles that I wrote on a few years back.I though it would be a good idea to put a link to it here for anybody who may be still working on remoting.

Here is the URL

Wednesday, February 10, 2010

WCF: Data Contracts and Serialization-2

As per my Data Contracts and Serialization-1 blog,I am putting up an example of a WCF Service which you would possibly design in a real world application scenario.

In this case I have integrated the WCF with LINQ to SQL Entity classes which provide the backbone for the DataContracts and DataMembers which are serialized between a typical Client -> Server communication for
Selecting/Adding/Deleting/Updating database records.

I have also added the script for the table I am using in this demo that you could just run on your SqlServer and regenerate the table and the associated objects.

This sample assumes that you know LINQ syntaxes and if you are not familiar then there are plenty of resources out on the net to get you started.

For privacy reasons I have modified the SqlConnection string to
Data Source=SERVER;Initial Catalog=Singh;Persist Security Info=True;User ID=YOURID;Password=YOURPASSWORD.
You would need to replace the parameters SERVER/YOURID/YOURPASSWORD to values specific to your environment.Incase you still have problems then get in touch with me for any help that may be required to get the sample running on your machine.

The code can be downloaded from here .
The Database script can be downloaded from here

Tuesday, February 9, 2010

WCF service contract Versioning-1

Generally we provide the client with the WSDL having details of service contracts,operation contracts and data contracts.
In the real world the service contracts are bound to change over time.
In this 1st of the 2 part session we will look at the impact that such changes can have on the clients and how best we can accommodate our architecture to avoid such
tight coupling of the client to the server.

As usual Slides for this session are here.
And the source code is here

Thursday, February 4, 2010

WCF Data Contracts and Serialization-1

Continuing from where we left last time,its time to up the ante and jump into the
nuts and bolts of complex databinding and serialization.This is the first of the 2 part series
(Especially) on serialization of complex types in WCF.I touch on the outline overview of what /how serialization is happening on WCF and make you comfortable with the WSDL generated for the complex types which would be serialized when you generate the proxy for your client application.
I have left the client application for now so that you can focus on the server side and not worry too much of what is being physically returned to the client by the server application.
We will integrate Server business logic ,wrap it with out Data contract and push/receive from the client application in the next part of this discussion.
I suggest spend time going through the WSDL files and get used to the formats.

As usual Slides for this session are here
and the source code is here .

Wednesday, February 3, 2010

WCF:Getting started with Configuration settings

The initial learning curve for WCF beginners(also the most difficult part) is to deal with the scores of parameter settings that are thrown at you while going through the books and online material.
Believe me, it can dampen the spirits of the most seasoned of the developers.
To make things easy,I will try to start with the very bare skeleton and also the most commonly used settings and in the future sessions make it complex.
In this session I will build upon my last post where the host address,databinding,contracts were hardcoded on both the server and and client.
This time on we will decouple the service and it settings and move the settings over to a configuration file and show you how easy and simple both understanding and managing the source code can be with these changes.
I intend to cut down the initial learning bottlenecks for WCF novices ,a technology that is extremely powerful if mastered

The slides for this session can be downloaded here
The functional source for this session can be downloaded here .