Initially we're given a fixed sequence $a=(a_1,a_2,...,a_n)$, s.t. $a_i \le n; \forall i\le n$. Now we need to fill a $n \times n$ matrix with ones and zeroes, such that the matrix is symmetric and the sum in the first row/column is equal to $a_1$, the sum in the second row/column is equal to $a_2$ and so on. Find the number of ways to do this.
The fact that both the $i$-th row and the $i$-th column have to have the same sum is the difficult part for me. Also I tried to convert the matrix to a bipartite undirected labeled graph (columns in one set, rows in other set), but not much came out of this.
Looks like the Gale-Ryser theorem would be helpful here. It considers two different partitions (p, q) of the same number (n) such that a (0, 1) matrix has columns summing to p and rows summing to q.
For your case, of course p = q and it is necessary that the transpose of p dominates p. There is a proof here that also gives a simple way to produce an example of such a matrix.
Should you need all such (0,1) matrices, there is a paper by Miller and Harrison which gives a method for sampling and enumerating them.