xsi:nil="true" vs type="xs:string" nillable="true" minOccurs=&quot ...

Hello,

I have an error with the service ‘xmlNodeToDocument’ after processing a soap message :

This message contains :

wsdl of the input document:
<xsd:element name=“fixdate” nillable=“true” type=“xsd:string” minOccurs=“0”/>

The document generated after invoking the service ‘xmlNodeToDocument’:
<record name="fixdate" javaclass="com.wm.app.b2b.services.CValues">
<value name="@xsi:nil">true</value>
</record>

the error is :
Incorrect flow Error : java.lang.Exception: INVALID List of errors: [0] pathName=/dx:troubleticket/ticket/fixdate errorCode=VV-004 errorMessage=[ISC.0082.9030] Type mismatch, String expected

Is there anybody have an explanation ?

What are the input params you have set in the xmlNodeToDocument??Did you declared namespace in nsDecl param?? Also what is the value coming in fixdate?? your schema is expecting String type not numeric or objects…

HTH,
RMG

thanks for your post

no value for fixdate : (normally considering as null value.)
nsDecl param:
dx:[url]http://eai/Sav/Genergy/Types[/url]

we made a test with xsi:
[URL=“http://www.w3.org/2001/XMLSchema-instance”]http://www.w3.org/2001/XMLSchema-instance[/URL]
as new ns in nsDecl param

with no success.

What version of IS are you using? Have you applied the latest WebSvcsXML fixes?

See this read on a related xsi:nil issue.

Mark

Thanks a lot

we are using webMethods 6.1.

I’ll see the fix that you speek about.

Dominique.

Hi,

I have exactly the same issue. I’m on wM 7.1.2.
“null” values are interpreted as an attribute “xsi:nil” with the value “true”. (true)

Did you find a solution ?

Thanks a lot!

Can you explain your issue? I did go through this post but I could not understand, my bad :?:

I will try to sort this out a little bit.

When defining a XSD-Schema, there you can use type=“string” nillable=“true” to indicate that this field can be empty (“null”).

In real XML document, there are several way to indicate that this field is empty:

  • </field name> (explizit variant)
  • </field name> (implizit variant)
  • (explizit variant)
  • (implizit variant)

Not all XML-Parser might be able to understand all of those variants.

Important to note is that the Namespace “xsi” needs to be declared in the root node of the document like this:
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

Regards,
Holger