anchor.diff:                 compress = false,
                  rcv_pid = self()}.
   
  -wrap_elem(#xmlstreamstart{attrs=Attrs}) ->
  +wrap_elem(#xmlstreamstart{attrs=Attrs}, _) ->
       Version = proplists:get_value(<<"version">>, Attrs, <<"1.0">>),
       Lang = proplists:get_value(<<"xml:lang">>, Attrs, <<"en">>),
       To = proplists:get_value(<<"to">>, Attrs, <<"localhost">>),
  
positive.code:     Transport = gen_server:call(Pid, get_transport),
      {ok, Transport}.
  
  send(#transport{socket = {Host, Port, Path}}, Elem0) ->
      spawn(fun() ->
              Headers = [{"Content-Type", "text/xml; charset-utf-8"}],
              Elem = wrap_elem(Elem0),
              {ok, {{StatusCode, Reason}, Hdrs, RespBody}} = 
                  lhttpc:request(Host, Port, false, Path, 'POST', 
                                 Headers, exml:to_iolist(Elem), infinity, []),
              io:format("status ~p~nhdrs ~p~nresp ~p~n",[
                  {StatusCode, Reason}, Hdrs, RespBody
                  ])
          end).
  
  is_connected(#transport{rcv_pid = Pid}) ->
      erlang:is_process_alive(Pid).
  
negative.code:             {<<"wait">>, <<"60">>},
              {<<"xml:lang">>, Lang},
              {<<"to">>, To}
              ]};
  wrap_elem(Element, #state{sid = Sid}) ->
      ct:print(default, "Sid ~p~n", [Sid]),
      #xmlelement{name = <<"body">>, attrs=[
              {<<"rid">>, <<"234234">>},
              {<<"xmlns">>, <<"http://jabber.org/protocol/httpbind">>},
              {<<"sid">>, Sid}
              ],
              body = [Element]}.
  