Hi Minakshi,
If you just need the WSDL of the transaction use the URL without the credentials.
http://<url>:<portno>/XMII/WSDLGen/ProjectFolder/TRX/SampleTrx
But first,
You would need to disable WSDLGen Security in MII Admin Screen. For this, in MII Admin menu, under the System Management--> System Properties --> uncheck the WSDLGen Security flag. This will disable authentication to fetch the WSDL. However, you might need to pass the credentials when you are invoking the transaction.
A quote from MII's help doc
"If the checkbox is selected, the system requires you to log on before you can access the WSDLGen servlet. If the checkbox is not selected, any user can call the servlet to generate WSDL for a transaction; however, you must still have permission to run the transaction"
Regards
Tufale Ashai.