You run the command below to get the above information:
To search if apache-22 is installed localy
or
To search if apache-22 version is available on the remote publisher
To find out which publisher you are using.
MySolaris
INDEX ACTION VALUE PACKAGE pkg.fmri set solaris/web/server/apache-22 pkg:/web/server/apache-22@2.2.16-0.151.0.1
INDEX ACTION VALUE PACKAGE pkg.fmri set solaris/web/server/apache-22 pkg:/web/server/apache-22@2.2.16-0.151.0.1