I want to get iPhone UDID through Mobile Safari. Iam using .mobileconifg as
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<dict>
<key>URL</key>
<string>http://192.168.12.45:8080/enroll/retrieve</string>
<key>DeviceAttributes</key>
<array>
<string>UDID</string>
<string>SERIAL</string>
<string>CHALLENGE</string>
<string>IMEI</string>
<string>ICCID</string>
<string>VERSION</string>
<string>PRODUCT</string>
<string>DEVICE_NAME</string>
<string>MAC_ADDRESS_EN0</string>
</array>
</dict>
<key>PayloadOrganization</key>
<string>Org</string>
<key>PayloadDisplayName</key>
<string>Profile Service</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadUUID</key>
<string>D6F1B2A3-0039-48B5-915B-8E2B35663816</string>
<key>PayloadIdentifier</key>
<string>Identifer</string>
<key>PayloadDescription</key>
<string>This temporary profile will be used to find and display your current device's UDID.</string>
<key>PayloadType</key>
<string>Profile Service</string>
</dict>
</plist>
retrieve.php
<?php
$data = file_get_contents('php://input');
header('Location: http://192.168.12.45/enroll/info?'.$data, true, 301);
?>
info is a directory and not a page, I have created index.php in this directory I get data in $_GET.
But i am able to get from php.
But i want to use java servlet, i changed url in mobileconfig file on servlet url but i am not able to get any values in java.
retrieve Java Code
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String paramName = (String) headerNames.nextElement();
String paramValue = request.getHeader(paramName);
System.out.println("paramValue :" + paramValue);
}
Output :
paramValue :192.168.12.45:8080
paramValue :keep-alive
paramValue :gzip, deflate
paramValue :Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D201 Safari/9537.53
paramValue :en-us
paramValue :text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
it shows error like this
But i want java servlet for getting IMEI. I want to change the above php code to java servlet. How to solve this and install Profile to get UDID and IMEI