def send(self, soapenv):
        """
        Send SOAP message.

        Depending on how the ``nosend`` & ``retxml`` options are set, may do
        one of the following:
          * Return a constructed web service operation request without sending
            it to the web service.
          * Invoke the web service operation and return its SOAP reply XML.
          * Invoke the web service operation, process its results and return
            the Python object representing the returned value.

        @param soapenv: A SOAP envelope to send.
        @type soapenv: L{Document}
        @return: SOAP request, SOAP reply or a web service return value.
        @rtype: L{RequestContext}|I{builtin}|I{subclass of} L{Object}|I{bytes}|
            I{None}

        """
        location = self.__location()
        log.debug("sending to (%s)\nmessage:\n%s", location, soapenv)
        plugins = PluginContainer(self.options.plugins)
        plugins.message.marshalled(envelope=soapenv.root())
        if self.options.prettyxml:
            soapenv = soapenv.str()
        else:
            soapenv = soapenv.plain()
        soapenv = soapenv.encode("utf-8")
        ctx = plugins.message.sending(envelope=soapenv)
        soapenv = ctx.envelope
        if self.options.nosend:
            return RequestContext(self.process_reply, soapenv)
        request = suds.transport.Request(location, soapenv)
        request.headers = self.__headers()
        try:
            timer = metrics.Timer()
            timer.start()
            reply = self.options.transport.send(request)
            timer.stop()
            metrics.log.debug("waited %s on server reply", timer)
        except suds.transport.TransportError, e:
            content = e.fp and e.fp.read() or ""
            return self.process_reply(content, e.httpcode, tostr(e))
        return self.process_reply(reply.message, None, None)
def send ( self , soapenv ) : location = self . __location ( ) log . debug ( "sending to (%s)\nmessage:\n%s" , location , soapenv ) plugins = PluginContainer ( self . options . plugins ) plugins . message . marshalled ( envelope = soapenv . root ( ) ) if self . options . prettyxml : soapenv = soapenv . str ( ) else : soapenv = soapenv . plain ( ) soapenv = soapenv . encode ( "utf-8" ) ctx = plugins . message . sending ( envelope = soapenv ) soapenv = ctx . envelope if self . options . nosend : return RequestContext ( self . process_reply , soapenv ) request = suds . transport . Request ( location , soapenv ) request . headers = self . __headers ( ) try : timer = metrics . Timer ( ) timer . start ( ) reply = self . options . transport . send ( request ) timer . stop ( ) metrics . log . debug ( "waited %s on server reply" , timer ) except suds . transport . TransportError , e : content = e . fp and e . fp . read ( ) or "" return self . process_reply ( content , e . httpcode , tostr ( e ) ) return self . process_reply ( reply . message , None , None )
Send SOAP message.

        Depending on how the ``nosend`` & ``retxml`` options are set, may do
        one of the following:
          * Return a constructed web service operation request without sending
            it to the web service.
          * Invoke the web service operation and return its SOAP reply XML.
          * Invoke the web service operation, process its results and return
            the Python object representing the returned value.

        @param soapenv: A SOAP envelope to send.
        @type soapenv: L{Document}
        @return: SOAP request, SOAP reply or a web service return value.
        @rtype: L{RequestContext}|I{builtin}|I{subclass of} L{Object}|I{bytes}|
            I{None}