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
  #1 (permalink)  
Old 11-17-2010, 12:31 AM
Starter Member
 
Posts: 2
Default Zimbra SOAP not returning sessionId

Hello,

I have browsed the forums for a solution on Zimbra not returning a <sessionId>. I am aware you have to pass the <session/> tag to retrieve a session but still am not able to get one.

This is the SOAP request and response:

Request:

POST https://192.168.0.1:7071/service/admin/soap
SOAPAction: "https://192.168.0.1:7071/service/admin/soapAuthRequest"
Content-length: 397
Content-type: text/xml; charset="UTF-8"

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soap="urn:zimbraAccount" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Headers><context xmlns="urn:zimbra"><session/></context></soapenv:Headers>
<soapenv:Body>
<soap:AuthRequest>
<account by="name">user.name</account><password>mypassword</password></soap:AuthRequest>
</soapenv:Body>
</soapenv:Envelope>


Response:

date: Wed, 17 Nov 2010 08:00:17 GMT
status: 200
content-length: 536
content-type: text/xml; charset=utf-8
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><context xmlns="urn:zimbra"><change token="2249"/></context></soap:Header><soap:Body><AuthResponse xmlns="urn:zimbraAccount"><authToken>0_b97b4d7c2a8 62da28060c1f06a6ae58b24a10529_69643d33363a33346132 383637352d616561372d343530372d623939652d6362383833 353763343336383b6578703d31333a31323931313930343137 3936383b76763d313a353b747970653d363a7a696d6272613c </authToken><lifetime>1209600000</lifetime><skin>yahoo</skin></AuthResponse></soap:Body></soap:Envelope>


What i am able to do is authenticate as you can see in the response. I am also able to change the password via the following SOAP call:

POST https://192.168.0.1:7071/service/admin/soap
SOAPAction: "https://192.168.0.1:7071/service/admin/soapChangePasswordRequest"
Content-length: 460
Content-type: text/xml; charset="UTF-8"

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soap="urn:zimbraAccount" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Headers><context xmlns="urn:zimbraAccount"><session/></context></soapenv:Headers>
<soapenv:Body>
<soap:ChangePasswordRequest>
<account by="name">user.name</account><oldPassword>oldpassword</oldPassword><password>newpassword</password></soap:ChangePasswordRequest>
</soapenv:Body>
</soapenv:Envelope>

I need (do i?) the session id to create calendar appointments via SOAP calls. Now when retrieving only the authtoken and passing it to the createappointment call give me this:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soap="urn:zimbraMail" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Headers/>
<soapenv:Body>
<soap:CreateAppointmentRequest>
<m d="1289988536" flags="u">
<e a="email@email.com"/>
<inv allday="0" fb="B" method="REQUEST" name="test" status="CONF" transp="O" type="event">
<s d="20101117T020000"/>
<e d="20101117T023000"/>
<at a="email@email.com" ptst="NE" role="REQ" rsvp="1"/>
<or a="email@email.com"/>
</inv>
</m></soap:CreateAppointmentRequest>
</soapenv:Body>
</soapenv:Envelope>




service.AUTH_REQUIRED
no valid authtoken present

Which leads me to believe i need to pass the sessionId too but i dont have one. Or is something wrong with the namespace of the CreateAppointmentRequest? The documentation doesnt clearly point out what it should be.

Anyone willing to help me? Thank you.

Nigel
Reply With Quote
  #2 (permalink)  
Old 11-21-2010, 10:25 AM
Junior Member
 
Posts: 7
Default

Zimbra 6.0 does not appear to return a Session ID by default.
Reply With Quote
  #3 (permalink)  
Old 11-21-2010, 11:31 PM
Starter Member
 
Posts: 2
Default

I know Zimbra 6 doenst return an session id by default. Thats why its neccesary to send the <session/> tag in the header. Which i did, but im still not able to retrieve an ID.
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.