WebService - Return value - XPA3.3 - Axis2 - SOAPui


Gábor Bor
 

Hy Guys,

I have a Web service problem. The used environment: SOAP - TOMCAT+AXIS2 - Gigaspace - XPA

I have made 2 closely same external xpa program what gives back a blob in the Task's property sheet's Return value. It's "answer" back an XML, the simle different is that the first one make (XPA merge) a smaller (18KB) file (from a Filtered DB source), the bigger is write out the whole record aggregation. (1025KB)

When the soap UI receives the first one, everything is fine, i got the result XML on SOAP side. The bigger one shows this error:

With11Endpoint:
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Failed to serialize node</faultstring>

With12Endpoint:
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Receiver</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">Failed to serialize node</soapenv:Text>
</soapenv:Reason>

The only different is the size of files i think so. I have read some option to solve it like BasicHttpBinding's MaxReivedMessageSize and MaxBuffer size, but i could not find them to change values.

Does anyone have experience in this solutions?

Best Regards,
Gábor



Andreas Sedlmeier
 

Hi Gabor,

An XML file with 1MB is not exactly big so I rather suppose that the problem is with your data, like trying to serialize invalid XML characters or so. I never worked with Magic & Axis2 due to a small license problem, I do think however that you should find the reason for this serialization error when you look into the Axis2 logs, eventually after raising the log level there.

Best regards,

Andreas


Gábor Bor
 
Edited

Dear Andreas,

After your advice i dig deeper in the current data source, validated the xml result, and got the tricky rows. After many XML validation and repair problematic records the SOAP processed the XML file and shows the perfect result.


Thanks for the help!

And an image for a smile. 



Best Regards,
Gábor


Andreas Sedlmeier
 

Hi Gábor ,

Glad that you found the issue and that it works for you now.

Actually this is one of the more annoying issues with Magic because, what actually happens is, that Magic produces invalid XML which basically should not be possible at all. Actually it is not possible with Apache Xerces - which is what Magic uses for serializing and deserializing XML, the developers at MSE do have however that "after me the Flood" thinking and patched Xerces (modified the sources to allow producing crap).

So what you have to do in order to avoid that your production stops once a while: Generate the complete XML with Magic and validate it with another tool different from Magic which is compliant with W3C XML Standards. Then however you have what you need already anyways and could handle the SOAP messaging without Magic and save a lot in terms of license cost ...

If you pay for your bugs you could open a support ticket. Would be interesting to hear what MSE has to say about this because in Helfile they write that they comply with webservice (SOAP) standards. Thats just not possible if you allow XML which is not compliant with W3C .

Best regards,

Andreas


Gábor Bor
 

Dear Andreas,

We discussed that sould we open a ticket, but the rectangle isn't an invalid XML character and we think that the MSE going to push it back with Data Error cause. :(

Best Regards,
Gábor


Andreas Sedlmeier
 

Hi Gábor,

That this results in anything @MSE I have my doubts as well. They know that since 20 years I suppose.

The rectangle is however no rectangle, it just looks like one because it's either an invalid Unicode character or a Unicode for which you have no Glyph in the font. I suppose it's none printable control characters with codes < 32 (in that range only a few are valid XML characters, check https://www.w3.org/TR/2006/REC-xml11-20060816/#charsets)

I suppose there is a reason why you have that strange character in your data. You should fix that and if you receive character data from 3'rd parties you should do proper input validation so that you cannot get that stuff in the database.

You can also encode all the character data you write to XML in order to avoid that XML exceptions from Axis (which I think uses a valid version of Xerces) by f.i. using this function: https://docs.microsoft.com/en-us/dotnet/api/system.security.securityelement.escape?redirectedfrom=MSDN&view=netframework-4.7.2#System_Security_SecurityElement_Escape_System_String_

Best regards,

Andreas




https://www.w3.org/TR/2006/REC-xml11-20060816/#charsets