Reputation: 743
I am on the phase of developing a Apple MDM server for iOS devices. my checkin URL is https:\anand-2255\checkin...
I am building the server with Tomcat, my Servlet-maping and servlet is as follows
<servlet-mapping>
<servlet-name>MDM</servlet-name>
<url-pattern>/checkin</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>MDM</servlet-name>
<servlet-class>com.manageengine.ads.fw.servlet.Mdm</servlet-class>
</servlet>
Mdm class is as follows. It just gets the Get and post request and prints in log.
public class Mdm extends HttpServlet
{
private static Logger out = Logger.getLogger("ADSLogger");
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String in = request.getQueryString().toString();
System.out.println("MDM-Servlet-Clas-POST");
System.out.println(in);
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String in = request.getQueryString().toString();
System.out.println("MDM-Servlet-Clas-GET");
System.out.println(in);
}
}
When I give a url like https:\anand-2255\checkin?hello, I can see hello in my log through GET request. But when I try to enroll the device from iPhone Configuration Utility, the device is not sending any POST request to this url. It says "Profile Installation Failed" and console says "A connection to the server could not be established".
Upvotes: 0
Views: 352
Reputation: 3989
Correct, iOS client will send a PUT request with a plist to your URL. You can find this in the official MDM documentation if you register for Apples enterprise development program, or maybe in the blackhat documentation here: https://media.blackhat.com/bh-us-11/Schuetz/BH_US_11_Schuetz_InsideAppleMDM_WP.pdf
Upvotes: 1
Reputation: 743
doPost should not be used. doPut should be used since the iOS sends the message as plist file.
Upvotes: 1