Results 1 to 4 of 4

Thread: Soap USing Ruby, Help!!!!

  1. #1
    Join Date
    Jun 2008
    Posts
    5
    Rep Power
    7

    Default Soap USing Ruby, Help!!!!

    i saw this post online, I have the same question. Somebody help please!

    I'm trying to write a Ruby SOAP client to talk to, what appears to be
    a very strange SOAP server (something written in Java).

    The server requires me to submit an "AuthRequest" with a username and
    password, and it returns an authToken and a sessionId. I can
    authenticate properly, but the server requires that the authToken and
    sessionId parameters be put in the Header, not the Body of successive
    requests. II don't know how to get the SOAP library to do this (or if
    it is possible). AuthRequest returns this:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <sessionId type="admin"id="151">151</sessionId>
    </context></soap:Header>
    <soap:Body><AuthResponse xmlns="urn:zimbraAdmin">
    <authToken>0_e5a61cd7bf0d7b41e53ccf9e111140f0d1a33 f97_79643d33363a39646335623033662d336465632d346661 632d383339302d3366366539323436653835343b
    6578703d31333a313136353530343334393231373b61646d69 6f3d313a313b</authToken>
    <lifetime>43200000</lifetime>
    <a n="zimbraIsDomainAdminAccount">false</a>
    <sessionId type="admin" id="151">151</sessionId>
    </AuthResponse></soap:Body></soap:Envelope>

    If you notice above, the server always supplies a Header back too. So
    how can I put parameters into the Header? Can I build a custom header
    if needed?
    Last edited by stevendada; 06-25-2008 at 04:53 PM.

  2. #2
    Join Date
    Jun 2008
    Posts
    5
    Rep Power
    7

    Default Problem re authentication

    I saw this post online, i have the exact question. please help!

    Ruby SOAP client questions

  3. #3
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default

    stevendada,

    Is this what you are looking for?

    Re: How can I populate header values in SOAP document?

    I'd be curious to look at your code. I see all this stuff about using SOAP but really don't know much about it, what I could use it for, or how to use it even.

    Thanks,
    Matt

  4. #4
    Join Date
    Jun 2008
    Posts
    5
    Rep Power
    7

    Default

    hey Chewie71, Thanks for ur reply, that post helped. I figured it out how to do it. Thanks.

Similar Threads

  1. Jar For Soap Client
    By wcameron in forum Developers
    Replies: 19
    Last Post: 06-03-2009, 03:04 PM
  2. SOAP & ruby ... Help needed
    By antonio.meireles in forum Developers
    Replies: 11
    Last Post: 09-27-2008, 01:27 PM
  3. Ruby On Rails JSON webservice plugin
    By smies in forum Developers
    Replies: 2
    Last Post: 12-22-2005, 03:02 PM

Posting Permissions

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