I'm trying to write a class that supports SOAP client implementation
in Unicon and have run into a problem with my lack of understanding
of how Unicon messaging working.

SOAP (usually) works by connected through an http service (normally,
the SOAP client is just a 'cgi' application provided by the http
server).

I've got a server that works fine with perl clients and appears
to work fine with Unicon clients (the server sees the correct
input from the client and is producing the correct response).
But I have been unable to get the client to see the response,
in an apparent catch-22 situation:

Here's the basic code in the client for sending a SOAP request
and (what I think should be) read the response:

   method call(rpc, args[])
        local msg
        msg := buildSoapMsg(rpc, args)
        msg := mkHttpPostMsg(msg)
        write(&errout, "Sending: \n",msg)

        svc := open(proxy, "m", msg) |
               stop("Cannot get '",uri,"' connection!")

        result := ""
        every result ||:= reads(svc, 8192)

        close(svc)
        write(&errout, "\n\n\n")
        write(&errout, "Got: \n",result)
        ...

(1) With the "m" option to open, the server *never* sees the
    contents of msg - just an empty message (as near as I
    can tell) - causing an error message to be returned.

(2) If I use "ms" instead, then the server sees the contents of
    msg and generates the correct response, but (as defined by
    "ms") the above client code doesn't read any result.

Is this a bug in Unicon or am I missing something?  Shouldn't
the above code work?

On the same line, how *is* msg transmitted?  I'm building up
an HTTP 'POST' action (because the msg may be quite large) - is
that going to be sent as a POST instead of a GET?  If it's a
GET with "m", how to I force a POST?

Thanks!

-- 
Steve Wampler <[EMAIL PROTECTED]>
National Solar Observatory


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to