Author |
Message
|
Vinayak.Satapute |
Posted: Tue Apr 06, 2010 6:49 pm Post subject: (XMLNSC.Attribute) declaration issue |
|
|
Acolyte
Joined: 20 Dec 2006 Posts: 70
|
Hi All,
Currently I am defining my outgoing message in the following way.
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xsi:schemaLocation = 'http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns = 'http://www.avienttech.com/Schemas/AvientML';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
The above code format is generating the output message in following fashion.
<?xml version="1.0" encoding="UTF-8"?><FlightGate xmlns:NS1="xsi" NS1:schemaLocation="http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd" xmlns="http://www.avienttech.com/Schemas/AvientML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
But I am expecting the the output message in following format.
<?xml version="1.0" encoding="UTF-8"?>
<FlightGate xsi:schemaLocation="http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd"
xmlns="http://www.avienttech.com/Schemas/AvientML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Any idea if anybody has clue on receiving the message in expected format as mentioned above.
Regrds,
Vinayak |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 06, 2010 7:39 pm Post subject: Re: (XMLNSC.Attribute) declaration issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vinayak.Satapute wrote: |
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xsi:schemaLocation = 'http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns = 'http://www.avienttech.com/Schemas/AvientML';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
|
Why are you not using XMLNSC.NameSpaceDecl and NAMESPACE variables to control namespaces? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vinayak.Satapute |
Posted: Tue Apr 06, 2010 8:18 pm Post subject: |
|
|
Acolyte
Joined: 20 Dec 2006 Posts: 70
|
Hi,
I have defined the NAMESPACE variable ns1 at the beginning of code as global variable.
DECLARE ns1 NAMESPACE 'http://www.avienttech.com/Schemas/AvientML';
Then inside the module the code follows as below.
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xsi:schemaLocation = 'http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns = 'http://www.avienttech.com/Schemas/AvientML';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
But I am not clear what do you mean by XMLNSC.NameSpaceDecl
Kindly elaborate.
Thanks,
Vinayak |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 06, 2010 8:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I thought that was very clear.
Instead of using XMLNSC.Attribute use XMLNSC.NameSpaceDecl where appropriate.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vinayak.Satapute |
Posted: Tue Apr 06, 2010 10:06 pm Post subject: |
|
|
Acolyte
Joined: 20 Dec 2006 Posts: 70
|
Hi,
I have tried using the XMLNSC.NameSpaceDecl in place of XMLNSC.Attribute but receiving the error for that.
BIP2432E: (.MF_FltSts_Convert_CSVtoXML.FormatOutgoingXML, 31.41) : The correlation name 'XMLNSC.NameSpaceDecl' is not valid. Those in scope are: Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, iFlightRecords, cSourceDateFormat, cTargetDateFormat, cDate, cMonth, cYear, cDatePattern1, iCounter.
Thanks,
Vinayak |
|
Back to top |
|
 |
kimbert |
Posted: Wed Apr 07, 2010 12:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
Vinayak.Satapute |
Posted: Wed Apr 07, 2010 1:31 am Post subject: |
|
|
Acolyte
Joined: 20 Dec 2006 Posts: 70
|
Hi,
The previous error was due to typo in 'XMLNSC.NameSpaceDecl' which should be ''XMLNSC.NamespaceDecl'.
The main issue I have posted in this thread is rectified after the inclusion of following NAMESPACE declaration globally.
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
and the code in module appears as below.
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.NamespaceDecl)xsi:schemaLocation = 'http://www.avienttech.com/Schemas/AvientML AML-FlightGate.xsd';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.ns1:FlightGate.(XMLNSC.NamespaceDecl)xmlns = 'http://www.avienttech.com/Schemas/AvientML';
But I am finding that my OutputRoot is not getting parsed against the message set I have defined by including it under the ESQL module.
SET OutputRoot.Properties.MessageDomain = 'XMLNSC';
SET OutputRoot.Properties.MessageSet = 'IOA0BJ8002001';
SET OutputRoot.Properties.MessageFormat = 'XML1';
SET OutputRoot.Properties.MessageType = 'FlightGate';
If I dont include the above MessageSet in the execution group , broker doesnt complain about RM Dictionery not found and it is still able send the message to Output Queue without any parsing error.
Any clue on this further.
Thanks,
Vinayak
 |
|
Back to top |
|
 |
kimbert |
Posted: Wed Apr 07, 2010 2:42 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
The previous error was due to typo in 'XMLNSC.NameSpaceDecl' which should be ''XMLNSC.NamespaceDecl'. |
Yep. We knew that already.
Quote: |
If I dont include the above MessageSet in the execution group , broker doesnt complain about RM Dictionery not found and it is still able send the message to Output Queue without any parsing error. |
"RM Dictionary not found" is an MRM error, so XMLNSC will not emit that one.
XMLNSC does not need a message set unless you have set 'Validation' to 'Content and Value'. If you do enable validation, and you don't deploy the message set, you will get a polite error message asking you to do so. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 07, 2010 2:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you are using XMLNSC, you don't need a MessageType or a MessageFormat.
Setting these both could maybe be confusing the broker into thinking you're working with MRM instead of XMLNSC. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Apr 07, 2010 3:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Setting these both could maybe be confusing the broker |
Well, the broker won't be confused - the XMLNSC parser will just ignore the Type and Format properties. But you might confuse the person who has to maintain the message flow. |
|
Back to top |
|
 |
Vinayak.Satapute |
Posted: Mon Apr 12, 2010 8:28 pm Post subject: |
|
|
Acolyte
Joined: 20 Dec 2006 Posts: 70
|
Hi All,
yes, XMLNSC doesn't throw an RM dictionery not found OR any parsing error unless you have selected Validate Content and Value on the ComputeNode.
One more thing is, since the WBIMB I am using is 6.1.0.6 ,
For "OutputRoot.Properties.MessageSet" you need to assign the messageSet Name but not messageSetId, as it used to be for broker version 5.0 previously.
Thanks kimbert for your inputs, I could find some of the details from your other posts as well.
Thanks All,
Vinayak |
|
Back to top |
|
 |
kimbert |
Posted: Tue Apr 13, 2010 12:30 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
For "OutputRoot.Properties.MessageSet" you need to assign the messageSet Name but not messageSetId, as it used to be for broker version 5.0 previously. |
You have been allowed to use the name instead of the id since v2.1 ( not the first release, but one of the CSDs ).
The name is much more readable, and (as you have discovered) XMLNSC only allows the name. |
|
Back to top |
|
 |
|