Hi,

I'd like someone make a comment on my solution.
Thanks
                 Mikelantonio

ServiceGroupContext
sgc=MessageContext.getCurrentMessageContext().getServiceGroupContext();
HashMap<QName,OMElement> map=new HashMap<QName,OMElement>();
    QName qn=new QName("http://ws.apache.org/namespaces/axis2";,
"ServiceGroupId");
    OMElement el = AXIOMUtil.stringToOM("<axis2:ServiceGroupId
xmlns:axis2=\"http://ws.apache.org/namespaces/axis2\"; xmlns:wsa=\"
http://www.w3.org/2005/08/addressing\";
wsa:IsReferenceParameter=\"true\">"+sgc.getId()+"</axis2:ServiceGroupId>");
    map.put(qn, el);
    AdministratorServiceStub ass=new AdministratorServiceStub("
http://localhost:8080/Profiler0.1/services/AdministratorService";);
    ass._getServiceClient().engageModule("addressing-1.3");
    ass._getServiceClient().getOptions().setManageSession(true);

ass._getServiceClient().getOptions().getTo().setReferenceParameters(map);

2008/4/3, Michelantonio Trizio <[EMAIL PROTECTED]>:
>
> Hi,
>
> I want to call a service from another service.
> I make this with the creation of a new stub in the service for the service
> that i want to call (I believe that it isn't the best solution, but is the
> only that I have found).
> So now the problem is that I want to use the same session of the service
> that invoke the other.
> How can I do?
> Thanks in advance.
>
>                                Mikelantonio
>
> --
> It's creepy, but here we are, the Pilgrims, the crackpots of our time,
> trying to establish our own alternate reality. To build a world out of rocks
> and chaos. What it's going to be, I don't know. Even after all that rushing
> around, where we've ended up is the middle of nowhere in the middle of the
> night. And maybe knowing isn't the point. Where we're standing right now, in
> the ruins in the dark, what we build could be anything. [Choke - Chuck
> Palahniuk]




-- 
It's creepy, but here we are, the Pilgrims, the crackpots of our time,
trying to establish our own alternate reality. To build a world out of rocks
and chaos. What it's going to be, I don't know. Even after all that rushing
around, where we've ended up is the middle of nowhere in the middle of the
night. And maybe knowing isn't the point. Where we're standing right now, in
the ruins in the dark, what we build could be anything. [Choke - Chuck
Palahniuk]

Reply via email to