You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wolfram Ditzer <di...@optel-informatik.de> on 2003/10/16 17:17:00 UTC

transfer pars from client stub to transport pivot handler

Hello

Im creating a web service client with axis from a wsdl file.
In client_deploy.wsdd I define a own Transport handler for http the 
class MyHttpSender.
In my client stub class (class MyClientStub) I want to store some 
variables which should be used by
the MyHttpSender. I thought I coul use the setProperty() adn getProperty 
of my MessageContext
But it does not work , I just get nulls!

Bye Wolfram


I do this

MyClientStub
request(..)
{
  ...
  MessageContext msgContext = _call.getMessageContext();
  msgContext.setProperty(OrcaHttpSender.ATTR_CONNECTION, conn);
  msgContext.setProperty(OrcaHttpSender.ATTR_CONNECTION + "blub", "hallo");
  ...
  invoke()
  ..
}

MyHttpSender
invoke(...)
{
   ...
   // get the connection
   String versuch = (String) 
msgContext.getProperty(OrcaHttpSender.ATTR_CONNECTION + "blub");
   HttpPostConnection conn = (HttpPostConnection) 
msgContext.getProperty(OrcaHttpSender.ATTR_CONNECTION);
   Socket sock = conn.getSocket();
   ...
}