Yes but even if you can access the SIM card, there is no guarantee the MSISDN is on the card or is accurate (it can be set from software on phone)
The network is the best bet, via the http method mentioned, OR via sending an SMS from the phone to your server via JSR 120. The MSISDN is always resolved on an SMS.