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 <[EMAIL PROTECTED]>
Date: Fri, 2 Jul 2004 09:55:14 +0600
Subject: [ws-fx/ws-addressing] multiRef problem
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]









**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/

Reply via email to