xmls of different size results in different namespaces.

20 views
Skip to first unread message

kamarna...@gmail.com

unread,
Aug 29, 2018, 6:58:35 PM8/29/18
to Woodstox User Mailing List
Hello,

I am not sure if this is the right place to ask this question. And I hope this issue is appropriate to this group.

We have a SOAP API client generated from apache cxf and when invoking the SOAP service using the client stubs I am running into an issue related to the xml size.

When the xml size(length) increases beyond a certain value the name space is identified as http://www.w3.org/2003/05/soap-envelope instead of  http://schemas.xmlsoap.org/soap/envelope/

The namespace is identified as different for different length files. Since the soap api client stubs are generated based of SOAP 1.1 as per the WSDL when the program identifies the SOAP xml as 1.1 for smaller length files it works fine. When the SOAP xml is identified as 1.2 system throws a validation saying - A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint

ValidatingStreamReader --> mConfig -->mCurrRecycler --> mSmallCBuffer gets a value assigned which includes the namespace. when the getEventType() or nextTag() APIs are executed on the XMLStreamReader which point to the ValidatingStreamReader object.
XMLStreamReader xmlReader = message.getContent(XMLStreamReader.class);


if
(xmlReader.getEventType() == XMLStreamConstants.START_ELEMENT

                || xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT) {

}


Please note there is not much difference in the xml content, except the larger xml has few more <Path> attributes as shown in the image below. Other than that the xml content is exactly same for both small and large sizes.



If you could help us understand what is going on here and provide a solution that would be great help.

Thanks
Amar
Reply all
Reply to author
Forward
0 new messages