1

I am trying to send XML message to Swift Alliance Access(SAA). My sample xml message is like below. But I am getting "Invalid XML prefix" error message. When I check the XML against XSD. It says valid. The error message says it may be related to SAA message partner or xml content, but I couldn't find a solution.

Maybe the situation is not related to XML. I just want to make sure there is no problem with the XML. SAA Message Partner configuration can also cause this.

What could I be missing?

XSD file is too big. I can upload it if anyone wants to see it.

<Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0">
  <Saa:Revision>2.0.13</Saa:Revision>
  <Saa:Header>
    <Saa:Message>
      <Saa:SenderReference>12345678</Saa:SenderReference>
      <Saa:MessageIdentifier>pacs.008.001.08</Saa:MessageIdentifier>
      <Saa:Format>MX</Saa:Format>
      <Saa:SubFormat>Input</Saa:SubFormat>
      <Saa:Sender>
        <Saa:BIC12>XXXXXXXXXXXX</Saa:BIC12>
      </Saa:Sender>
      <Saa:Receiver>
        <Saa:BIC12>YYYYYYYYYYYY</Saa:BIC12>
      </Saa:Receiver>
    </Saa:Message>
  </Saa:Header>
</Saa:DataPDU>

An error occured while decoding XML data. Check the message partner configuration or the file content. Context = SerializerException ErrorMessafe = decodePDU: "Invalid XML Prefix"

kjhughes
  • 106,133
  • 27
  • 181
  • 240
Uğur Yeşilyurt
  • 1,339
  • 2
  • 12
  • 21

1 Answers1

1

Your XML is namespace-well-formed, and you say that you've successfully validated it against the governing XSD.

The code that's griping about an "Invalid XML prefix" has no basis to complain since the only XML namespace prefix in play is Saa, and it's properly defined. Speculation: The griping code is improperly designed and is expecting a hard-wired XML namespace prefix, which it has no right to do.

kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • I solved the problem by editing some elements and adding new elements. The error was a bit misleading for me. Thank you for your help. – Uğur Yeşilyurt Mar 21 '22 at 19:15