- This topic has 5 replies, 4 voices, and was last updated 12 years, 3 months ago by
TobiasSchaller.
-
AuthorPosts
-
newmodeavMemberi should start with I LOVE THIS APP!
you guys are amazing.now my question
we are trying to come up with an app version of our live site
a very dynamic and database driver php site.i was wondering if there is a posibility to create the UI in the mobione and within mobione to
apply or connect or reference the content and function to our live Web Services???using any form of XML Phrases or xml web services?
or Json Web Services?i would really apreaciate any info.
Paul GMemberHello,
I create web services using Visual Basic .net and call them from Mobione with a function like this:
function serviceCall() {
var txtInput = $(“#m1-myapp-textFieldDate1”).val();
if (txtInput.length > 0) {
$.ajax({
type: “POST”,
url: “http://localhost:60258/WebServiceMath.asmx/Add”,
data: “{‘firstdate’:'” + txtInput + “‘}”,
contentType: “application/json; charset=utf-8”,
dataType: “json”,
success: function (msg) {$(‘#m1-myapp-textArea1″).val(msg.d);
},
error: function (e) {
$(“#m1-myapp-textArea1”).val(msg.d);
}
});
}
}This function takes the value of textFieldDate1, passes it as a parameter to a webservice (WebServiceMath.asmx), processing is done on the server in VB.Net, and the result is returned as msg.d which is displayed in Textarea1
newmodeavMemberthank you for your respond
i see that you used that http://localhost:60258 to get around the cross domain restriction
I just don’t know how you forced that to point to an external server?
Paul GMemberHello,
I showed you the example using Localhost as the server as that is where I do my testing and debugging.
When everything works how I want I transfer all files over to my external server, for example http://www.myserver.com/Intcal
I transfer the web service files -WebServiceMath.asmx – into the Intcal folder as well as all Mobione genereated files including the main intcal.html file,
when all files are on my external server, I change the ajax call to:
url: “WebServiceMath.asmx/Add”,
As all files are in the same folder there are no cross domain issues.
Why do you need to get around the cross-domain restriction if you create your own web service? Just put all web service files in same folder as Mobione files on your external server
Cisco421MemberHi Paul
How would you code the app to reach a web service in another domain using XML / SOAP ???
I have the WSDL address and the SOAP 1.0 message format but can’t seem to code it right on Mobi One.
please help…. thanksCisco
TobiasSchallerMember@Paul G:
Thanks for that codesnippet about using a .net webservice !
Would you be willing to share the .net source code of the webservice, too ?Thank you very much …
-
AuthorPosts