Hi,
I'm trying to learn how to use javascript to call Zimbra SOAP request as well as parse the content of the SOAP response message.Could you give me a clue about how to accomplish that,of course it would be better if you post the code here.
Any help would be appreciated,thanks.
How to use javascript to call Zimbra SOAP
How to use javascript to call Zimbra SOAP
Have you read any of the documentation that's supplied with your ZCS server? site:zimbra.com +soap +consume - Yahoo! Search Results
How to use javascript to call Zimbra SOAP
Hi Bill,thanks for your help.It really helped me.
Currently,I got a problem when trying to send a SOAP request via Java Script to Zimbra Server.I am using the jquery ajax to send SOAP request,and below is my code to check the error returned from the server:
error: function(jqXHR, exception) {
if (jqXHR.status === 0) {
alert('Not connect.
Verify Network.');
}
//something else...
}
Anytime I try to send a SOAP message to the server,i got a notification message "Not connect.Verify Network".
I just wonder if is related to SSL problems or something else that constrains the use of web services from client-side javascript.(The Zimbra server is hosted on another machine than mine,and here is the URL I used: https://server-IP:7071/zimbraAdmin/service/soap,and obviously,I can use this URL to access the server on my browser)
Please help me,thanks.
Currently,I got a problem when trying to send a SOAP request via Java Script to Zimbra Server.I am using the jquery ajax to send SOAP request,and below is my code to check the error returned from the server:
error: function(jqXHR, exception) {
if (jqXHR.status === 0) {
alert('Not connect.
Verify Network.');
}
//something else...
}
Anytime I try to send a SOAP message to the server,i got a notification message "Not connect.Verify Network".
I just wonder if is related to SSL problems or something else that constrains the use of web services from client-side javascript.(The Zimbra server is hosted on another machine than mine,and here is the URL I used: https://server-IP:7071/zimbraAdmin/service/soap,and obviously,I can use this URL to access the server on my browser)
Please help me,thanks.
How to use javascript to call Zimbra SOAP
Unfortunately I can't help you with any coding, I'm not a developer - you'll have to wait for someone more experienced that can give you some advice.
How to use javascript to call Zimbra SOAP
I have read the soap.txt document in /opt/zimbra/docs, it mentioned many functions on message and conversation,but the thing is I cannot find any instruction on how to attain messageId,conversationId..Could anyone show me how can I achieve that,thanks.
-
- Advanced member
- Posts: 64
- Joined: Sat Sep 13, 2014 2:17 am
How to use javascript to call Zimbra SOAP
var jsonObj = {CreateFolderRequest:{_jsns:"urn:zimbraMail"}};
var request = jsonObj.CreateFolderRequest;
if(isBlank(color)){
request.folder = { name:name,view:"appointment",url:""};
}else if(custom){
request.folder = { name:name,view:"appointment",url:"",rgb:color};
}else{
request.folder = { name:name,view:"appointment",url:"",color:color};
}
var searchParams = {
jsonObj:jsonObj,
asyncMode:false
};
appCtxt.getAppController().sendRequest(searchParams);
I don't know what you want exactly but this is the example of SOAP request. Let me know your exact requirement.
var request = jsonObj.CreateFolderRequest;
if(isBlank(color)){
request.folder = { name:name,view:"appointment",url:""};
}else if(custom){
request.folder = { name:name,view:"appointment",url:"",rgb:color};
}else{
request.folder = { name:name,view:"appointment",url:"",color:color};
}
var searchParams = {
jsonObj:jsonObj,
asyncMode:false
};
appCtxt.getAppController().sendRequest(searchParams);
I don't know what you want exactly but this is the example of SOAP request. Let me know your exact requirement.
How to use javascript to call Zimbra SOAP
Hello Jignesh
yours is an example about calling Zimbra API "inside" Zimbra... for example with a Zimlet.
What if I would like to invoke Zimbra SOAP services from outside, for example from my Intranet site...? I searched a lot over the net and read the docs, but I'm facing with a big error about CORS (Cross-origin resource sharing)...
Are there any examples on how to call such Zimbra SOAP API from "outside" Zimbra server?
Thanks
Roberto
yours is an example about calling Zimbra API "inside" Zimbra... for example with a Zimlet.
What if I would like to invoke Zimbra SOAP services from outside, for example from my Intranet site...? I searched a lot over the net and read the docs, but I'm facing with a big error about CORS (Cross-origin resource sharing)...
Are there any examples on how to call such Zimbra SOAP API from "outside" Zimbra server?
Thanks
Roberto
-
- Advanced member
- Posts: 64
- Joined: Sat Sep 13, 2014 2:17 am
How to use javascript to call Zimbra SOAP
I am sure but you may need to write a java code to access Zimbra services from outside Zimbra. You can't achieve it from javascript only.
OTOH, Are you sure you want to do it without any authentication? You may want to use Zimbra-Preauth or something...
OTOH, Are you sure you want to do it without any authentication? You may want to use Zimbra-Preauth or something...