Nan,
Thank you for sending the response message.
I think this is not an intentional behavior. The stub.getHeader()
has never changed between 1.1 RC2 and 1.1 final, and the code is
as follows;
public SOAPHeaderElement getHeader(String namespace,String partName){
for(int i=0;i<headers.size();i++) {
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(i);
if(header.getNamespaceURI().equals(namespace) &&
header.getName().equals(partName))
return header;
}
return null;
}
Please pay attention to the code -
"header.getNamespaceURI().equals(namespace)".
If the value of header.getNamespaceURI() doesn't equal to
the namespace what you passed, you should get 'null'.
That's a namespace issue, as I guessed.
You're lucky. You have a chance to submit a patch, if you
can debug the code. Please. :-)
--
Toshi <[EMAIL PROTECTED]>
-----Original Message-----
From: Nan Xiong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 11:12 AM
To: [EMAIL PROTECTED]
Subject: RE: Stub.getHeader(namespace, partname) in axis1.1
Toshi,
Thanks for your reply. I'm usng .NET 1.1 (2003).
the soap response from .NET is:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<SessionTokenHeader
xmlns="http://www.viewstar.com/webservices/2002/11">
<Token>
VE9WXV5HS0zigKZd4oChX05hXMWSXmVswpBWWkbigJ1JSUxMTU9TUV
NSWFdFWlhiYmNlXV/CqmBlwq1kY2NoamZpaWp0XG5weXXCunx3wqnD
geKEosuGwrvCvcKzwrhsw4DCssK8wrHCv8K7w4XDiMOHw4rDhg==
</Token>
</SessionTokenHeader>
</soap:Header>
<soap:Body>
<LoginResponse
xmlns="http://www.viewstar.com/webservices/2002/11">
<LoginResult>true</LoginResult>
</LoginResponse>
</soap:Body>
</soap:Envelope>
I'm accessing header from Stub as following:
stub.getHeader("http://www.viewstar.com/webservices/2002/11",
"SessionTokenHeader");
the above call returns null in axis1.1, but returns correctly in axis
1.1 RC2, against the same .NET service.
I'm able to work around it using client side handler, but I would like
to know whether this is intentionally disabled? Will the soap handler
be a perfered way in terms of compliance to jaxrpc spec.
Thanks
Nan
> -----Original Message-----
> From: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 14, 2003 6:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Stub.getHeader(namespace, partname) in axis1.1
>
> Nan,
>
> I guess that it might be related to a change of handling
> for namespace between RC2 and 1.1 final. A couple of days
> before, I've met an interop issue - using Axis 1.1 final as
> the server and .Net(InfoPath 2003) as the client.
>
> Did you snoop the messages ? What's the version of .Net ?
> Could you post your request/response messages and its WSDL
> files for both using 1.1 RC2 and 1.1 final ?
>
> --
> Toshi <[EMAIL PROTECTED]>
>
> -----Original Message-----
> From: Nan Xiong [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 15, 2003 5:46 AM
> To: [EMAIL PROTECTED]
> Subject: Stub.getHeader(namespace, partname) in axis1.1
>
> Hello,
>
> I have a .NET web services that passes session id (a string)
> in the soap header, we were able to use Stub.getHeader(...)
> and Stub.setHeader() to make axis client talking to the .NET
> services using axis1.1 RC2, however, in axis1.1 final release,
> getHeader returns null. Anybody has the same problem?
> Can someone confirm this is a bug? or intentionally disabled?
> Whats the alternatives to access the header? (client handler?)
>
> Thanks in advance
> Nan