Just fixed this. !!!NOTE!!! header.getValue() will NOT return what you want (i.e. the deserialized value of the header). You should be using getObjectValue(). This is because JAXM already defined a "getValue()" method which returns something like the text content of the node, and we couldn't override it with different semantics. :(
--Glen > -----Original Message----- > From: Till Woerner [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 14, 2002 2:49 PM > To: [EMAIL PROTECTED] > Subject: Message header value is null > > > Hi, > > I'm playing around with axis beta1 rc2 and header elements in soap > message. > Now I have following problem: > > The header entry that arrives at the server is (the arriving > message is > totally ok IMO): > > --- > > <SOAP-ENV:Header> > <ns1:UID xsi:type="xsd:string" > xmlns:ns1="urn:TestService">two</ns1:UID> > </SOAP-ENV:Header> > > --- > > Then I use this code to extryct the header (This is an extract from a > handler I defined in my wsdd file): > > --- > > Message msg = messageContext.getRequestMessage(); > SOAPEnvelope env = msg.getSOAPEnvelope(); > SOAPHeader uidH = env.getHeaderByName("urn:TestService", "UID", true); > > System.out.println(uidH); > System.out.println("NS: [" + uidH.getNamespaceURI() + "]"); > System.out.println("Name: [" + uidH.getName() + "]"); > System.out.println("Value: [" + uidH.getValue() + "]"); > System.out.println("Type: [" + uidH.getType() + "]"); > > --- > > But what comes out is this: > > --- > > <ns1:UID xsi:type="xsd:string" xmlns:ns1="urn:TestService" > xmlns:xsi="http://www .w3.org/2001/XMLSchema-instance">two</ns1:UID> > NS: [urn:TestService] > Name: [UID] > Value: [null] > Type: [null] > > --- > > So can anyone please tell me why value and type are null??? > Thanks in advance! > Till > > -- > Caught in our narrowminded believe... > ------------------------------------- > Till Woerner > Berlin, Germany > EMail:[EMAIL PROTECTED] > ICQ#: 7162410 >
