OMSerializerUtil and StreamingOMSerializer do not respect the prefix referenced in an xsi:type ----------------------------------------------------------------------------------------------
Key: WSCOMMONS-496 URL: https://issues.apache.org/jira/browse/WSCOMMONS-496 Project: WS-Commons Issue Type: Bug Components: AXIOM Reporter: Rich Scheuerle Assignee: Rich Scheuerle Here is the scenario: 1) An SOAP OM tree is built from the following input text: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:usr="http://ws.apache.org/axis2/user"> <soapenv:Header /> <soapenv:Body> <axis2:echoMyData xmlns:axis2="http://ws.apache.org/axis2"> <data xsi:type="usr:myData">Hello World</data> </axis2:echoMyData> </soapenv:Body> </soapenv:Envelope> 2) SOAPEnvelope.getBody().toString() is called which prints out the following text: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <axis2:echoMyData xmlns:axis2="http://ws.apache.org/axis2"> <data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="usr:myData">Hello World</data> </axis2:echoMyData> </soapenv:Body> Note that most of the namespaces have been properly redeclared in the output text. However, the namespace for prefix "usr" is missing. Thus resulting xml is unusable. Solution: Change OMSerializerUtil and StreamingOMSerializer to respect the xsi:type and declare the namespaces of the referenced prefix (when necessary). I have the code and test, and I am running final tests. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.