http://zimbra.svn.sourceforge.net/vi...raServer/docs/
Look at soap.txt, with a special focus on SearchRequest and GetMsgRequest.
No WSDL is available at present.
http://zimbra.svn.sourceforge.net/vi...raServer/docs/
Look at soap.txt, with a special focus on SearchRequest and GetMsgRequest.
No WSDL is available at present.
Hi Dan
As u suggested, I followed SOAP.txt
When I sent:
<
soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header></soap:Envelope>
<context xmlns="urn:zimbra">
<nosession />
<nonotify />
<noqualify />
</context>
</soap:Header>
<soap:Body>
<AuthRequest xmlns="urn:zimbraAccount">
<account by="name">abhishek</account>
<password>test1234</password>
</AuthRequest>
</soap:Body>
I recieved this:
<
soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<AuthResponse xmlns="urn:zimbraAccount">
<authToken>
0_5c8727cb667027691b80cc09f03d7e9c4080bcd3_69643d3 3363a37373166366165642d616533322d343864652d6166323 22d3137363862353034333436313b6578703d31333a3131363 53437363433333631353b
</authToken>
<lifetime>172800000</lifetime>
</AuthResponse>
</soap:Body>
</
soap:Envelope>
That is understandable. Now, as per the SOAP.txt doc, I tried sending the SearchRequest to retrieve the mails from Zimbra server.
I tried compiling different requests, but wasn't successful in retrieving the mails.
REQUEST
<
soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header></soap:Envelope>
<context xmlns="urn:zimbra">
<authToken>
0_5c8727cb667027691b80cc09f03d7e9c4080bcd3_69643d3 3363a37373166366165642d616533322d343864652d6166323 22d3137363862353034333436313b6578703d31333a3131363 53437363433333631353b
</authToken>
</context>
</soap:Header>
<soap:Body>
<SearchRequest xmlns="urn:zimbraMail">
<query>is:read</query>
</SearchRequest>
</soap:Body>
RESPONSE
Exception in thread "main"
java.io.IOException: Server returned HTTP response code: 500 for URL: http://192.168.1.51/service/soap/
HttpURLConnection.java:1133)
at com.apnatek.webservices.SOAP.SOAPClient4XG.main(
SOAPClient4XG.java:85)
I then tried to put the request within BatchRequest :<
soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header></soap:Envelope>
<context xmlns="urn:zimbra">
<authToken>
0_5c8727cb667027691b80cc09f03d7e9c4080bcd3_69643d3 3363a37373166366165642d616533322d343864652d6166323 22d3137363862353034333436313b6578703d31333a3131363 53437363433333631353b
</authToken>
</context>
</soap:Header>
<soap:Body>
<BatchRequest xmlns="urn:zimbra" onerror="continue">
<SearchRequest xmlns="urn:zimbraMail">
<query>is:read</query>
</SearchRequest>
</BatchRequest>
</soap:Body>
I got the following RESPONSE
<
soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<BatchResponse xmlns="urn:zimbra">
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text>no valid authtoken present</soap:Text>
</soap:Reason>
<soapetail>
<Error>
<Code>service.AUTH_REQUIRED</Code>
<Trace>
com.zimbra.cs.service.ServiceException: no
valid authtoken present at
com.zimbra.cs.service.ServiceException.AUTH_REQUIR ED(ServiceException.java:212)
at
com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:231)
...
</Trace>
</Error>
</soapetail>
</soap:Fault>
</BatchResponse>
</soap:Body>
</
soap:Envelope>
I also tried different combinations of <nosession />, gave <sessionId> ... but to no good.
Please suggest what should be the structure of the request.
Diamond is a piece of coal that performed well under pressure
Hi Dan
This is in continuation with my above post. I know its a bit lengthy, but I needed to post that to explain my exact issue, and what all I have tried already. I also tried looking at the packets in debug window using ?debug=3 but although the debug window pops up, nothing is printed on that window
Please advise (looking at the SOAP packets in my above post), where am I going wrong.
thanks and regards
Abhishek
Diamond is a piece of coal that performed well under pressure
That's no longer enough to get the debug window to work. Please see this posting for the correct syntax.
Sorry, but I can't hand-debug everyone's SOAP issues. I really just don't have the time.
Please look at the debug window output or -- a far, far better option -- use the free SoapProvisioning and zclient Java interfaces that we provide you with the Zimbra source. They encapsulate the SOAP so you don't have to worry about the wire protocol.
Hi Dan
Thanks so much for all the help and inputs provided.
I used ?mode=mjsf&gzip=false&debug=1 and that brought up the pop up log window. It actually was a good thing to look at. Pt provided the missing link.
Thanks
Diamond is a piece of coal that performed well under pressure
There are currently 1 users browsing this thread. (0 members and 1 guests)