Results 1 to 4 of 4

Thread: soap sendmsgrequest question

  1. #1
    Join Date
    Jun 2013
    Posts
    5
    Rep Power
    2

    Default soap sendmsgrequest question

    hi,

    you have already post an sendmsgrequest to zimbra.. i've got an little problem with that..

    first i post an authrequest and get the response of zimbra..

    i extract the auth token and the chance token and put it into my sendmsgrequest, but zimbra gave me error 500.. want i'm doing wrong?

    if i use changepasswordrequest - it works.. so i think my sendmsgrequest is wrong?!

    here ist want i post:

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <change token=" (changetoken from authresponse) "/>
    <authToken> (auth token from authresponse) </authToken>
    <nosession/>
    </context>
    </soap:Header>
    <soap:Body>
    <SendMsgRequest xmlns="urn:zimbraMail">
    <m>
    <e t="t" a="(email-adress)" p="(name)"/>
    <e t="f" a="(email-adress)" d="(name)"/>
    <su>TestEmail</su>
    <mp ct="text/plain">
    <content>Mal Gucken ob es funktioniert!</content>
    </mp>
    </m>
    </SendMsgRequest>
    </soap:Body>
    </soap:Envelope>

    thank's for helping!!

  2. #2
    Join Date
    Jun 2013
    Posts
    5
    Rep Power
    2

    Default

    this is what happens in /opt/zimbra/log/mailbox.log when i post my email

    com.zimbra.common.service.ServiceException: unknown document: SendMsgRequest
    ExceptionId:btpool0-51://zimbra.saw-leipzig.de/service/soap/:1372832698838:067b8b9636ef9268
    Code:service.UNKNOWN_DOCUMENT
    at com.zimbra.common.service.ServiceException.UNKNOWN _DOCUMENT(ServiceException.java:262)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:343)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:287)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:158)
    at com.zimbra.soap.SoapServlet.doWork(SoapServlet.jav a:294)
    at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:215)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:725)
    at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:208)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:814)
    at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1166)
    at com.zimbra.cs.servlet.SetHeaderFilter.doFilter(Set HeaderFilter.java:79)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1157)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserA gentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter .java:132)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:218)
    at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:422)
    at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:230)
    at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
    at org.mortbay.jetty.handler.rewrite.RewriteHandler.h andle(RewriteHandler.java:230)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
    at org.mortbay.jetty.handler.DebugHandler.handle(Debu gHandler.java:77)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:543)
    at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:946)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:756)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:405)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:410)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:451)

  3. #3
    Join Date
    Jun 2013
    Posts
    5
    Rep Power
    2

    Default

    what is wrong with my sendrequest post:

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <change token=" (changetoken from authresponse) "/>
    <authToken> (authtoken from authresponce) </authToken>
    <nosession/>
    </context>
    </soap:Header>
    <soap:Body>
    <SendMsgRequest xmlns="urn:zimbraMail">
    <m>
    <e t="t" a="(emailadress)" p="(name)"/>
    <e t="f" a="(emailadress)" d="(name)"/>
    <su>TestEmail</su>
    <mp ct="text/plain">
    <content>Mal Gucken ob es funktioniert!</content>
    </mp>
    </m>
    </SendMsgRequest>
    </soap:Body>
    </soap:Envelope>

  4. #4
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    712
    Rep Power
    7

    Default

    I don't think you should have the <nosession/> tag in the header for a request - that is just for the original AuthRequest as far as I understand it.
    Also, not sure you should be including the <change ...> tag either.

    Try your request without these.

    Your actual message request looks fine.

    In case you are not familiar with it, there is a command line soap command interface that is great for debugging the actual requests.

    Log in as the zimbra superuser, and run zmsoap ...

    For example, I took your <SendMsgRequest>.....</SendMsgRequest> message above and copied it to a file called SendMsg

    Then from the command line ran

    zmsoap -z -v -t mail -m vincents -f ./SendMsg


    <SendMsgRequest xmlns="urn:zimbraMail">
    <m>
    <e t="t" p="(name)" a="(emailadress)"/>
    <e d="(name)" t="f" a="(emailadress)"/>
    <su>TestEmail</su>
    <mp ct="text/plain">
    <content>Mal Gucken ob es funktioniert!</content>
    </mp>
    </m>
    </SendMsgRequest>
    <SendMsgResponse xmlns="urn:zimbraMail">
    <m id="127329"/>
    </SendMsgResponse>


    As you can see, it echos back the request, and then if successful echos out the response.

    It will also show you parsing errors, etc.


    In most instances if you see service.UNKNOWN_DOCUMENT it means you have specified the incorrect urn:zimbra / urn:zimbraMail / urn:zimbraAdmin identifier and the message you are trying to use is not found in the urn you specified.

Similar Threads

  1. SOAP AuthRequest Question
    By ab5602 in forum Developers
    Replies: 3
    Last Post: 08-06-2008, 08:55 PM
  2. SOAP question
    By dbarnett in forum Developers
    Replies: 6
    Last Post: 11-17-2006, 10:48 AM
  3. Question on SOAP compatibility
    By Robin Diederen in forum Developers
    Replies: 3
    Last Post: 09-19-2006, 01:26 AM
  4. SOAP - dumb question of the day
    By antonio.meireles in forum Developers
    Replies: 1
    Last Post: 10-14-2005, 09:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •