How can we apply Ampère's circuital law in a wire? How can we apply Ampere's circuital law in a wire to calculate magnetic field around a straight current carrying wire? The length of the wire is not infinite.
Using the Biot-Savart law we get 
$$B = \frac{\mu_0 I}{4\pi r}(\sin\alpha + \sin \beta)$$
Using the Ampère law,
$$\oint \boldsymbol B\cdot \mathrm d\boldsymbol l = \mu_0 I,$$
I couldn't get it.
For symmetry let's try it for equal $\alpha = \beta$
Edit: I understood that for applying ampere circuital law, we require symmetry along entire length of wire and not at ant point.
My new doubt is how come Maxwell used this law to find displacement current ? How the situation included symmetry there?
 A: First of all I would like to give you an answer to what the magnetic field will be for an infinitely long straight current carrying wire.
Magnetic field due to straight current carrying wire (infinite length)
Consider a wire of infinite length, carrying current $I$. The magnetic field strength due to that wire at a some point $P$ situated at distance $r$ from the wire can be calculated as follows:
From Ampere's Law,
$$\oint \boldsymbol B\cdot \mathrm d\boldsymbol l = \mu_0 I,$$
Where $\oint \boldsymbol B\cdot \mathrm d\boldsymbol l$ = Line integral of magnetic field along circular path. As angle between the vector $B$ and $\mathrm d\boldsymbol l$ is $0^0$,
$$\oint \boldsymbol B\cdot \mathrm d\boldsymbol l = \oint \boldsymbol B\cdot \mathrm d\boldsymbol l \cos0 =  \boldsymbol B\oint \mathrm d\boldsymbol l$$
But $\oint \mathrm d\boldsymbol l = \boldsymbol {2\pi r}$  (Circumfrence of the circular path of radius $\boldsymbol r$)
$$\oint \boldsymbol B\cdot \mathrm d\boldsymbol l=\boldsymbol B \times \boldsymbol {2\pi r}$$
But $\boldsymbol B \times \boldsymbol {2\pi r}=\boldsymbol \mu_0$ thus,
$$\boldsymbol B = \frac{\mu_0 I}{2\pi r}= \frac {\mu_0}{4\pi} \frac {2I}{r}$$

Explanation (Why can't you use Ampere's law for a finite length wire):
What you have to understand in the above case is that the assumption of an infinite wire means that the Magnetic field will have the same magnitude (at distance $\boldsymbol r$ from the wire) at any point parallel to the axis of the wire.
In case of a finite wire, the Magnetic field will vary in strength depending on how far from the ends of the wire the point in space is, and its direction is no longer exactly parallel with the circle drawn around the wire.
In such circumstances it is more ideal to use the Biot-Savart law instead of Ampere's law
A: In fact, the problem in applying ampere's circuital law for a finite wire doesn't lie in complexity raising from absence of symmetry.The problem lies in the fact that the current 'I' appearing in ampere's law is a one forming a complete, closed circuit,not a portion of a circuit ( you can't apply it for a finite wire, a semi-loop ... ). 
Ampere's law is generally valid for closed circuits, and the infinite wire is a special case. To understand this better, search for derivation of ampere's law. 
