After migrating from webMethods 9.8 to 10.3, xsi:nil="true" in inbound xml messages are giving error

Hi

After upgrading from webMethods 9.8 to 10.3 xml attributes like xsi:nil=“true” are causing errors

A sample fraction of the xml is this:

YYYY XXXX 2019-07-23T07:57:39.7467126Z 2019W31C001 6de177b1-2cf7-4783-9dcb-6b96931e6e1a

It errs in service pub.xml:xmlNodeToDocument

I tried adding the parameter watt.server.SOAP.treatNilAsNull and restarted the IS but invain.

Do you know what the reason is that it errs on 10.3 but not in 9.8?

Kind regards Mikael

Try this fix IS_10.3_Core_Fix5 and above on the affected server. Also, recommend you to open a SR with SAG support.

Hi Mikael,

please provide the exact error message as well as a screenshot of your pub.xml:xmlNodeToDocument step.

Regards,
Holger

Error message:
An error occurred invoking the processing service geminor.freight.pub:handleFreightBookings for this document. The original error was com.wm.lang.flow.FlowException: com.wm.app.b2b.server.ServiceException: [ISC.0042.9329] No namespace declaration defined for attribute xsi:nil in element :VoyageNumber

 at pub.xml.xmlNodeToDocument(xml.java:1037)

I don’t know how to upload a screenshot, but xmlNodeToDocument has these Service In values:
node → node
makeArrays = false
nsDecls = “i= http://www.w3.org/2001/XMLSchema-instance
documentTypeName = xxxx

Hi Mikael,

can you try to add the following under the nsDecls input of pub.xml.xmlNodeToDocument?

name=xsi
value=http://www.w3.org/2001/XMLSchema-instance

This should declare the namespace for the xsi-prefix.

If this does not help, check if can suppress the generation fo xsi:nil=“true” when preparing the xml or if you can add the declaration of the namespace (xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”) to the root node of the xml during preparation.
This declaration should be located inside the opening root node tag (in your sample above this would be the Header-tag):


<root tag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
data goes here
</root tag>

Regards,
Holger

Hi Holger

thanks for your reply. However, I am more interested in finding out, if it is a more generic/global setting that needs to be done since it worked in 9.8 and the 9.8 and 10.3 services are identical.

Regards Mikael

Hi Mikael,

in this case you might want to consider opening a Ticket at SAG Support via Empower to get this checked.

Might be that 10.3 is checking this more strictly than 9.8 did.

Regards,
Holger

Hello Guys

I am facing the same problem for my WS provider tests. the namespace http://www.w3.org/2001/XMLSchema-instance has been Added to WSDL but the error below persists for unknown reasons
com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix “xsi” (for attribute “nil”)
Does anyone have any idea how to handle this issue?
I’ve been searching for the solution for the whole day without any result. would you like please to help me, guys?

Hi

I solved it by adding the namespace in TN under Document Type → Namespaces tab → Add button prefix = xsi , URI = http://www.w3.org/2001/XMLSchema-instance

Hello,

I was talking about webservices and not TN. I have a use case that I need to validate by passing the prifix xsi:nil=‘true’ in the soap request

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:dom=“http://domain.infocomptable.relationclient.service.de/” xmlns:inf=“http://s-wm-i-1.de.lan/InfoComptable_v1.ws.provider:infoComptable” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
soapenv:Header/
soapenv:Body
dom:infoBlocageInput
dom:identifiantPartenaire0153355098</dom:identifiantPartenaire>
dom:origineECLI</dom:origine>
<dom:contexte xsi:nil=“true”/>
</dom:infoBlocageInput>
</soapenv:Body>
</soapenv:Envelope>

When executing the test, the error message below is being raised

com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix “xsi” (for attribute “nil”)
at [row,col {unknown-source}]: [7,39]

My question now how do I can add a namespace prefix xsi and its attribute in a docType, knowing that the namespace http://www.w3.org/2001/XMLSchema-instance has been already declared in WSDL and its related XSD ?

Thanks

Mohamed EL HAJJAJI

Hi Mohammed ,

How did you resolve this . Facing same issue in my code as well

Hi Abhishek,

What is the IS version you were facing this same/similar issue? Let us know!!

HTH,
RMG

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.