Thursday, January 20, 2011

The attribute xsi:nil="true" appears in SOAP envelope after upgrading to IS 8

During testing of our upgrade we noticed our java clients getting a new exception when getting an empty response back.
java.lang.NullPointerException
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
        at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
        at java.lang.reflect.Field.get(Field.java:358)
        at........
This was due to the returned message being different  under 7.x and 8.x:
------ 7.x ---------

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ser-root:lookupTaxExemptResponse xmlns:ser-root="http://ns.discounttire.com/TaxExempt/v1"/>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


------ 8.x ---------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ser-root:lookupTaxExemptResponse xsi:nil="true" xmlns:ser-root="http://ns.discounttire.com/TaxExempt/v1"/>
   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

There was a fix for this in 7.1.3 (when the problem seems to have first appeared) but it has not yet been applied to 8.x.   You have to apply the core patch (I'm assuming Core Patch 13 will have it as Patch 12 does not).

Then you also need to go to your IS web admin page -> Settings -> Extended and "Edit Extended Settings"
Add the following line:

watt.server.SOAP.generateNilTags=false
 
I haven't yet verified this as we don't have the patch yet. 
 
-------
Update:
Turns out this is the new behavior in wm8 and will not be fixed.  To get this error we were 
returning a bare list of document references.  So we switched to returning a document with a 
list of document references inside  and now as long as the list is initialized, it returns fine.  
The xsi:nil tag is inside the list, not at the top-level root element which is what caused the 
problem with java clients.

Thursday, January 13, 2011

WM8 upgrade - [ISC.0082.9026] Undefined Object found

We just upgraded to 8.0 from 7.1 IS.

A flow service is working different in 8.

In 8, the flow service returns an error failed: '/xxx VV-002 [ISC.0082.9026] Undefined Object found'

Where xxx is data in the pipeline but not defined in the flow service input.

The service did not do this under 7.1.

Input to the service has "Validate input" checked. The service is invoked from another service. The required input is provided, but its the other data in the pipeline that causes the error.

The solution is to create a new flow service, copy in the old implementation, delete the old implementation, and then rename the new service back to the old service name.

It seems new services created in 8 are fine, but services imported from 7.x show this bug.

Thanks to Brian and Andy for finding and fixing this!