His career was going very steeply, starting from the rank of ensign, he was promoted to the rank of colonel in the summer of 1848. He commanded the 37th infantry regiment of Lviv, that consisted mainly of Hungarians. With the regiment he besieged and conquered Venice and it was the down-fall of Italian revolution against the Austrian Empire.
Promotion
With 38 years of age he received the rank of major-general, while in his 46th year he became a lieutenant marshal. Then he was transferred from the Slavonian military border to the Supreme military command in Graz. When the Croatian ban and baron Josip Jelačić was taken ill, Josip Šokčević was appointed the deputy of the ban by the Emperor Franz Joseph I and sent to Zagreb. Latter he became the military commander of the Banatian headquarters in Timișoara. In the year 1860 he was exalted into the class of the Austrian baron, and was appointed as the governor of the Voivodeship of Serbia and Temes Banat. In summer of 1860 the Emperor appointed him as the Croatian ban on the references of the Bishop of Bosnia and Syrmia, Josip Juraj Strossmayer. These were the years of great changes in Habsburg politics. The Emperor gave up with the practices of minister Bach and promised to some nations under Austrian rule freedom and prosperity. On the basis of imperial October diploma, Šokčević called up the Conference of the Bandom that issued new electoral law for Croatia and gave suggestions on the reorganization of Habsburg Monarchy. Croatian demands were the same as the peoples demands of 1848 being demands of united Croatia and federative Monarchy.
Political changes
In the spirit of democratization, in the entire Monarchy and in Croatia, old political parties were restored. This was shortly lived, because the Emperor changed his policy in 1861 when he issued Februarial patent, he diminished the power of all of the parliaments in the lands of the Empire. During his mandate, ban Šokčević proposed the railroad between Vukovar, Zagreb and Rijeka. In 1864 there was organized and manifestation of the first annual Dalmatian, Slavonian and Croatian business exhibition, that latter became a regular occasion.
Resignition
In the year 1866 Austria lost its war with Prussia, and were pulled out of the German unification. The entire monarchy was in the state of crisis. Austrians and Hungarians made a political deal, better known as Austro-Hungarian compromise, this forced Croatia to reach a compromise with the Kingdom of Hungary of its own. Ban Šokčević thought that he was deceived by the Austrian's and thus resign his position on the June 27, 1867. He was retired from military command duties and from the public and political life of Croatia. He moved to Graz and later Vienna, where he died in near-obscurity.
Death
In 2002 his earthly remains were transferred to his birth-town of Vinkovci and buried in the tomb chapel of the Saint Magdalene that were built at the request of his mother Elisabeth.