[ 
https://issues.apache.org/jira/browse/CXF-7828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597150#comment-16597150
 ] 

Amar K commented on CXF-7828:
-----------------------------

[~coheigea]

On further debugging I noticed below piece of code is resulting the namespace 
to be 1.1 vs 1.2 when the xml size increases. 

XMLStreamReader is pointing to an instance of 
*com.ctc.wstx.sr.ValidatingStreamReader* and on the execution on getEventType() 
or nextTag() it results the SOAP envelope namespace to be 
*[http://www.w3.org/2003/05/soap-envelope] (*when the xml length increases*)* 
instead of *[http://schemas.xmlsoap.org/soap/envelope/]*

This changed namespace results in the SOAP message to be identified as 1.2. I 
also logged a case with woodstocx - 
https://github.com/FasterXML/woodstox/issues/63

{{XMLStreamReader xmlReader = message.getContent(XMLStreamReader.class); if 
(xmlReader.getEventType() == XMLStreamConstants.START_ELEMENT || 
xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT) \{ }}}

Any thoughts, why the XMLStreamReader behaves differently when the xml size 
increases ?

Thanks

Amar

> Increased size of the payload(xml as a string) results - A SOAP 1.2 message 
> is not valid when sent to a SOAP 1.1 only endpoint. - Error
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-7828
>                 URL: https://issues.apache.org/jira/browse/CXF-7828
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.7.7
>         Environment: Production
>            Reporter: Amar K
>            Priority: Major
>         Attachments: Job_Failure.xml, Transfer-201210.wsdl, 
> image-2018-08-27-10-34-12-193.png, image-2018-08-29-10-24-30-183.png
>
>
> SOAP WSDL
> Generated client stub using the apache cxf - wsdl2java feature.
> When invoking the SOAP webservice using the SOAP client stubs generated it 
> results an error - A SOAP 1.2 message is not valid when sent to a SOAP 1.1 
> only endpoint. 
> Upon further analysis we identified *increased size of the xml string results 
> above error*. For the *lower size of the xml string the service works fine*.
> Below is the snippet of the code we are using when observed in debug the 
> *port* object refers to "org.apache.cxf.jaxws.JaxWsClientProxy" class 
> pointing to the client-stub class(FASPSoap).
>  
>  
> {code:java}
> String orderxml = "Order xml constructed as a String";
> final Transfer201210 ss = new Transfer201210();
> ss.addPort(Transfer201210.Transfer201210Port, "Transfer201210Binding", 
> soapapiurl);
> final FASPSoap port = ss.getTransfer201210Port();
> final SubmitRequest r = new SubmitRequest();
> r.setDefinition(orderxml);
> final SubmitResponse _submit__return = port.submit(r);
> {code}
>  
>  
> As per the wsdl the SubmitRequest object accepts the definition attribute as 
> a String. See below.
> !image-2018-08-27-10-34-12-193.png!
>  
> Please help us know if this a "memory intensive" related operation issue. And 
> how should it be addressed.
>  
> Thanks
> Amar



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to