-----
--
You received this message because you are subscribed to the Google
Groups "CodenameOne Discussions" group.
For more information about Codename One please visit http://www.codenameone.com/
To post to this group, send email to
codenameone...@googlegroups.com
To unsubscribe from this group, send email to
codenameone-discu...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/codenameone-discussions?hl=en?hl=en
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/QOfW_1o8vDs/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
public void fetchAllMs() {
InputParameter = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:tem='http://tempuri.org/'>"
+ "<soapenv:Header/>"
+ "<soapenv:Body>"
+ "<tem:FetchM/>"
+ "</soapenv:Body>"
+ "</soapenv:Envelope>";
final ConnectionRequest request = new ConnectionRequest() {
@Override
protected void buildRequestBody(OutputStream os) throws IOException {
os.write(InputParameter.getBytes("UTF-8"));
}
// **************** Get the status of the connection
@Override
protected void readHeaders(Object connection) throws IOException {
status = getHeader(connection, "status");
System.out.println("The status of the connection: " + status);
}
@Override
protected void readResponse(InputStream input) throws IOException {
status = String.valueOf(getResponseCode());
deResult = Result.fromContent(input, Result.XML);
}
};
final NetworkManager manager = NetworkManager.getInstance();
Command cancel = new Command("Cancel") {
@Override
public void actionPerformed(ActionEvent evt) {
manager.killAndWait(request);
//do Option2
}
};
InfiniteProgress ip = new InfiniteProgress();
Dialog dlg = ip.showInifiniteBlocking();
dlg.setBackCommand(cancel);
//String url = "https://api.parse.com/1/classes/MFBs";
request.setUrl(app_Settings.get("App_URL").toString());
request.setContentType("text/xml;charset=UTF-8");
request.setFailSilently(true);//stops user from seeing error message on failure
request.setPost(true);
request.setDuplicateSupported(true);
request.setDisposeOnCompletion(dlg);
manager.start();
manager.addToQueueAndWait(request);
}
I will apreciate any advice.