[ https://issues.apache.org/jira/browse/AXIOM-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved AXIOM-92. ---------------------------------- Resolution: Fixed Fix Version/s: 1.2.13 Assignee: Andreas Veithen This issue has actually been solved by the change to SOAPBuilderHelper in r1147476. > Axiom changes the namespce prefix only in the namespace declaration > ------------------------------------------------------------------- > > Key: AXIOM-92 > URL: https://issues.apache.org/jira/browse/AXIOM-92 > Project: Axiom > Issue Type: Bug > Reporter: Amila Chinthaka Suriarachchi > Assignee: Andreas Veithen > Fix For: 1.2.13 > > > String xmlString = "<s:Envelope > xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" + > " <s:Body>\n" + > " <s:Fault>\n" + > " <faultcode>s:Client</faultcode>\n" + > " <faultstring xml:lang=\"en-US\">The creator of this > fault did not specify a Reason.</faultstring>\n" + > " <detail>\n" + > " <AppBaseFault i:type=\"AppDerivedFault\" > xmlns=\"http://xwsinterop/soapwsdl/faults\" > xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\n" + > " <ErrorInt>50</ErrorInt>\n" + > " <ErrorString>This is a test error string for > fault tests.</ErrorString>\n" + > " <ErrorEmployee>\n" + > " <Age>30</Age>\n" + > " <Name>Indigo Developer</Name>\n" + > " > <HireDate>2009-11-17T02:09:48.394-08:00</HireDate>\n" + > " <ID>12345</ID>\n" + > " <Manager>\n" + > " <Age>50</Age>\n" + > " <Name>Indigo Developer</Name>\n" + > " > <HireDate>2009-11-17T02:09:48.394-08:00</HireDate>\n" + > " <ID>34567</ID>\n" + > " <Manager i:nil=\"true\"/>\n" + > " </Manager>\n" + > " </ErrorEmployee>\n" + > " </AppBaseFault>\n" + > " </detail>\n" + > " </s:Fault>\n" + > " </s:Body></s:Envelope>"; > try { > XMLStreamReader xmlStreamReader = > StAXUtils.createXMLStreamReader(new > ByteArrayInputStream(xmlString.getBytes())); > StAXSOAPModelBuilder builder = new > StAXSOAPModelBuilder(xmlStreamReader); > SOAPEnvelope envelope = > (SOAPEnvelope)builder.getDocumentElement(); > XMLStreamReader newReader = > envelope.getBody().getFault().getDetail().getFirstElement().getXMLStreamReaderWithoutCaching(); > while (!newReader.isStartElement()){ > newReader.next(); > } > System.out.println("Element name ==> " + newReader.getName()); > System.out.println("type ==> " + > newReader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")); > System.out.println("Namespace ==> " + > newReader.getNamespaceContext().getNamespaceURI("")); > System.out.println("Namespace ==> " + > newReader.getNamespaceContext().getNamespaceURI("axis2ns1")); > } catch (XMLStreamException e) { > } > This code produce following out put. > lement name ==> {http://xwsinterop/soapwsdl/faults}AppBaseFault > type ==> AppDerivedFault > Namespace ==> null > Namespace ==> http://xwsinterop/soapwsdl/faults > the namespace prefix has changed to axis2ns1 but type still have the previous > value instead of axis2ns1:AppDerivedFault. > This give an exception at ADB. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ws.apache.org For additional commands, e-mail: dev-h...@ws.apache.org