What version are you using. If its something before 0.91, I think it
was a bug. But I fixed this. Please refer
http://issues.apache.org/jira/browse/AXIS2-185 for more details.
This should be fixed in our latest release of 0.92, else you can get a
svn checkout and build. Since we are using maven, its now very much
easier to get a checkout and build from the source. ;-)
-- Chinthaka
Villalba, Gregorio, VF-ES (gvillal2) EXT wrote:
Hi guys,
Ok, Axis sets the headers, but the problem is that Axis sets the ReplyTo to "127.0.0.1" (no the real machine IP) so the response never will reach the machine that made the request. That is why I wanted to change the header.
-----Mensaje original-----
De: Srinath Perera [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 18 de octubre de 2005 14:49
Para: [email protected]
Asunto: Re: [Axis2] Asynchronous dual client
+1 Eran is 100% right. this is not a bug. If you choose the In-Out mep
that means you hand over the control to Axis2. So you can not set the Adressing Headers. (Becouse Axis2 will set up a listener fo you and waiting for reply).
If you need to contol addressing use In-Only MEP.
Let us close the bug
For more info read the "In-Only MEP Support: InOnlyMEPClient" part of article http://www.onjava.com/pub/a/onjava/2005/07/27/axis2.html
Srinath
On 10/18/05, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Villalba, Gregorio, VF-ES (gvillal2) EXT wrote:
Hi,
I am developing a WS client with Axis2 code generator.
I want to use dual transport, I engage the Addressing module and I
configure the transport as dual but I can not change the ReplayTo
element (that automatically appears like localhost)!!!!! It can not
be changed with messageContext.setReplyTo(aERPReplayTo).
Any idea?
hmm, seems like you are violating the MEP concept here.
Using Call means you are invoking an IN-OUT service. So when you send
a message using Call api, the reply MUST come back to the same Call.
That means you are not allowed to mess around with the replyTo. The
engine will set a dynamic replyTo address for you, which then starts
up a listener with the given transport, and listens to a message.
If you are allowed to set the replyTo, you could have set that to some
other EPR, and the Call which u used to invoke the service will
timeout. Thats why you are not allowed to set replyTo information. So
actually what you need to do is, invoke your IN-OUT web service using
IN-Only manner and set the replyTo address to wherever you want. That
means you basically have one client who thinks that this is an IN-Only
invocation and for another client who thinks that it is an OUT only
service.
So this voids Axis2-284. So please close that issue too.
HTH.
-- Chinthaka
Thanks in advance.
That is the code:
org.apache.axis2.context.MessageContext messageContext =
getMessageContext();
Call call = new Call(_serviceContext);
call.setTo(this.toEPR);
call.engageModule(new QName(Constants.MODULE_ADDRESSING));
boolean DUAL_TRANSPORT = true;
call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP,true);
call.setWsaAction(myProp.getProperty("subscribe.action"));
call.setSoapAction(myProp.getProperty("subscribe.action"));
org.apache.axis2.soap.SOAPEnvelope env = createEnvelope();
//Style is Doc
setValueDoc(env,com.vodafone.jaw.ws.eventsource.databinding.Subscribe
OpD
atabindingSupporter.toOM(body));
EndpointReference aERPReplayTo = new
EndpointReference(AddressingConstants.WSA_REPLY_TO,myProp.getProperty
("s
ubscribe.replayto"));
messageContext.setReplyTo(aERPReplayTo);
messageContext.setMessageID(myProp.getProperty("msg_id_template") +
new VMID().toString());
messageContext.setEnvelope(env);
call.invokeNonBlocking(operations[0], messageContext,
callback);
Confidencialidad
Este correo electrónico y, en su caso, cualquier fichero anexo al
mismo, contiene información de carácter confidencial exclusivamente
dirigida a su destinatario o destinatarios y propiedad de Vodafone
España. Queda prohibida su divulgación, copia o distribución a
terceros sin la previa autorización escrita de Vodafone España, en
virtud de la legislación vigente. En el caso de haber recibido este
correo electrónico por error, se ruega notificar inmediatamente esta
circunstancia mediante reenvío a la dirección electrónica del
remitente y la destrucción del mismo.
Confidentiality
The information in this e-mail and in any attachments is classified
as Vodafone España Confidential and Proprietary Information and
solely for the attention and use of the named addressee(s). You are
hereby notified that any dissemination, distribution or copy of this
communication is prohibited without the prior written consent of
Vodafone España and is s strictly prohibited by law. If you have
received this communication in error, please, notify the sender by
reply e-mail.
|