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 Dasarath Weeratunge <da...@yahoo.com> on 2004/07/02 05:55:14 UTC
[ws-fx/ws-addressing] multiRef problem
**Sorry about the previous posts if you received any of them.
Hi,
The ws-addressing handler routes the response when a
replyTo header is present in the request. However,
the following are two responses that I got -- the
first with NO replyTo header and the second with a
replyTo header -- different
from the from header.
Still the two messages are very different and the
second message has been corrupted as well (the
attribute vote="VoteReadOnly"
is no longer there in the second message). I'm using
Axis 1.2 beta (snapshot).
The headers seem to come fine on both messages and it
is the body that I get this problem. I see no reason
why
the messages should be any different from my
applications point of view.
The client fails to recognise the second message,
which is to be expected.
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse vote="VoteReadOnly"
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat">
<PrepareResponse href="#id0"/>
</PrepareResponse>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
Can this have anything to do with changing the path of
the response message in ws-addressing handler?
// process ReplyTo
EndpointReferenceType replyTo =
reqHeaders.getReplyTo();
if (replyTo != null) {
Address address = replyTo.getAddress();
if (address != null) {
String uri = address.toString();
if (uri != null &&
!uri.equals(Constants.NS_URI_ANONYMOUS)) {
// send the msg to reply to
forwardMessage(resHeaders,
replyTo, msg);
// Somehow make the response
empty, or create a new empty
// response
msgContext.setResponseMessage(null);
}
}
}
if (msgContext.getResponseMessage() != null)
resHeaders.toEnvelope(msg.getSOAPEnvelope());
}
private void forwardMessage(AddressingHeaders
headers,
EndpointReferenceType epr,
Message msg)
throws Exception {
Address address = epr.getAddress();
//AddressingHeaders headers = new
AddressingHeaders();
headers.setTo(address);
headers.setReferenceProperties(epr.getProperties());
String url = address.toString();
url=
url.replaceAll("wsi\\.alphaworks\\.ibm\\.com:8080",
"localhost:8082");
Call c = new Call(url);
c.setRequestMessage(msg);
c.setProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS,
headers);
c.invoke();
}
Thanks,
Dasarath
Re: [ws-fx/ws-addressing] multiRef problem
Posted by Davanum Srinivas <da...@gmail.com>.
try the latest cvs version of axis and open up a bug report with axis
if you still see it.
thanks,
dims
----- Original Message -----
From: Dasarath Weeratunge <da...@yahoo.com>
Date: Fri, 2 Jul 2004 09:55:14 +0600
Subject: [ws-fx/ws-addressing] multiRef problem
To: axis-user@ws.apache.org
Cc: fx-dev@ws.apache.org
**Sorry about the previous posts if you received
any of them.
Hi,
The ws-addressing handler routes the
response when a
replyTo header is present in the request. However,
the
following are two responses that I got -- the
first with NO replyTo header
and the second with a
replyTo header -- different
from the from
header.
Still the two messages are very different and the
second
message has been corrupted as well (the
attribute vote="VoteReadOnly"
is
no longer there in the second message). I'm using
Axis 1.2 beta
(snapshot).
The headers seem to come fine on both messages and it
is the
body that I get this problem. I see no reason
why
the messages should be
any different from my
applications point of view.
The client fails to
recognise the second message,
which is to be
expected.
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse vote="VoteReadOnly"
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat">
<PrepareResponse href="#id0"/>
</PrepareResponse>
<multiRef id="id0"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
Can
this have anything to do with changing the path of
the response message in
ws-addressing handler?
//
process ReplyTo
EndpointReferenceType replyTo
=
reqHeaders.getReplyTo();
if
(replyTo != null)
{
Address
address =
replyTo.getAddress();
if (address != null)
{
String uri =
address.toString();
if (uri != null &&
!uri.equals(Constants.NS_URI_ANONYMOUS))
{
// send the msg to reply
to
forwardMessage(resHeaders,
replyTo,
msg);
// Somehow make the response
empty, or create a new
empty
//
response
msgContext.setResponseMessage(null);
}
}
}
if
(msgContext.getResponseMessage() !=
null)
resHeaders.toEnvelope(msg.getSOAPEnvelope());
}
private void
forwardMessage(AddressingHeaders
headers,
EndpointReferenceType
epr,
Message msg)
throws Exception
{
Address address =
epr.getAddress();
//AddressingHeaders headers =
new
AddressingHeaders();
headers.setTo(address);
headers.setReferenceProperties(epr.getProperties());
String url =
address.toString();
url=
url.replaceAll("wsi\\.alphaworks\\.ibm\\.com:8080",
"localhost:8082");
Call c = new Call(url);
c.setRequestMessage(msg);
c.setProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS,
headers);
c.invoke();
}
Thanks,
Dasarath
--
Davanum Srinivas - http://webservices.apache.org/~dims/
Re: [ws-fx/ws-addressing] multiRef problem
Posted by Davanum Srinivas <da...@gmail.com>.
try the latest cvs version of axis and open up a bug report with axis
if you still see it.
thanks,
dims
----- Original Message -----
From: Dasarath Weeratunge <da...@yahoo.com>
Date: Fri, 2 Jul 2004 09:55:14 +0600
Subject: [ws-fx/ws-addressing] multiRef problem
To: axis-user@ws.apache.org
Cc: fx-dev@ws.apache.org
**Sorry about the previous posts if you received
any of them.
Hi,
The ws-addressing handler routes the
response when a
replyTo header is present in the request. However,
the
following are two responses that I got -- the
first with NO replyTo header
and the second with a
replyTo header -- different
from the from
header.
Still the two messages are very different and the
second
message has been corrupted as well (the
attribute vote="VoteReadOnly"
is
no longer there in the second message). I'm using
Axis 1.2 beta
(snapshot).
The headers seem to come fine on both messages and it
is the
body that I get this problem. I see no reason
why
the messages should be
any different from my
applications point of view.
The client fails to
recognise the second message,
which is to be
expected.
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse vote="VoteReadOnly"
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
<soapenv:Body>
<PrepareResponse
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wsat">
<PrepareResponse href="#id0"/>
</PrepareResponse>
<multiRef id="id0"
soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body></soapenv:Envelope>
------------------------------------------------------------------------------------
Can
this have anything to do with changing the path of
the response message in
ws-addressing handler?
//
process ReplyTo
EndpointReferenceType replyTo
=
reqHeaders.getReplyTo();
if
(replyTo != null)
{
Address
address =
replyTo.getAddress();
if (address != null)
{
String uri =
address.toString();
if (uri != null &&
!uri.equals(Constants.NS_URI_ANONYMOUS))
{
// send the msg to reply
to
forwardMessage(resHeaders,
replyTo,
msg);
// Somehow make the response
empty, or create a new
empty
//
response
msgContext.setResponseMessage(null);
}
}
}
if
(msgContext.getResponseMessage() !=
null)
resHeaders.toEnvelope(msg.getSOAPEnvelope());
}
private void
forwardMessage(AddressingHeaders
headers,
EndpointReferenceType
epr,
Message msg)
throws Exception
{
Address address =
epr.getAddress();
//AddressingHeaders headers =
new
AddressingHeaders();
headers.setTo(address);
headers.setReferenceProperties(epr.getProperties());
String url =
address.toString();
url=
url.replaceAll("wsi\\.alphaworks\\.ibm\\.com:8080",
"localhost:8082");
Call c = new Call(url);
c.setRequestMessage(msg);
c.setProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS,
headers);
c.invoke();
}
Thanks,
Dasarath
--
Davanum Srinivas - http://webservices.apache.org/~dims/