Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 11-30-2006, 08:01 AM
Zimbra Employee
 
Posts: 1,434
Default soap.txt

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.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #12 (permalink)  
Old 12-04-2006, 11:47 PM
Member
 
Posts: 13
Default RE: soap.txt (dkarp: please help!)

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>
<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>
</soap:Envelope>

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>
<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>
</soap:Envelope>


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>
<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>
</soap:Envelope>

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
Reply With Quote
  #13 (permalink)  
Old 12-05-2006, 07:21 PM
Member
 
Posts: 13
Default RE: soap.txt (dkarp: please help!) ctd...

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
Reply With Quote
  #14 (permalink)  
Old 12-06-2006, 10:19 AM
Zimbra Employee
 
Posts: 1,434
Default Try the debug window again

Quote:
Originally Posted by abhishek_agl View Post
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
That's no longer enough to get the debug window to work. Please see this posting for the correct syntax.

Quote:
Originally Posted by abhishek_agl View Post
Please advise (looking at the SOAP packets in my above post), where am I going wrong.
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.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #15 (permalink)  
Old 12-08-2006, 02:14 AM
Member
 
Posts: 13
Default Thanks Dan

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.