MQ and XML Problem

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

MQ and XML Problem

Post by ag_ram »

Hi

I am creating an XML using XML out put stage, then I trying to put the message into MQ.
I am getting following error.

MQ_PutOrders: [IIS-CONN-WSMQ-000003] Argument uszDataElementName has invalid value XML (CC_WSMQUtil::buildWSMQDataElement(), file CC_WSMQUtil.cpp, line 1,289)


Extract of XML is something like this...
<tXML xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Header><Source>ecomm</Source><Source>ecomm</Source><Action_Type>CREATE</Action_Type><Sequence_Number></Sequence_Number><Batch_ID></Batch_ID><Reference_ID></Reference_ID><User_ID></User_ID><Password></Password><Message_Type>DOMOrder</Message_Type><Company_ID>1000</Company_ID><Msg_Locale>English (United States)</Msg_Locale><Version>2007</Version></Header>


But I am able to open the same XML in the Internet explorer.
Question: Why the xml created is in this format?
Question: Is this the reason I am not able to put the message to the Queue?

Kamal
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

One more information:

If I split the job into 2 (one job is having XML file creation and another job where I put message into MQ) there is no problem in datastage.

The error is recurring only when I have XML output stage and MQ in single job.

For any further information on the issue, please revert back as I want these 2 operations in a single job.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hi...

Hard to say without knowing your whole job, but it looks like you have XML from somewhere else (another XMLOutput Stage, or from another source) before you pass it into the XMLOutput Stage in question.....the &'s show that the xml string is geting "xml-ized" or "escaped" so that it can be wrapped with XML......

...either way that's ok and shouldn't make MQ get upset. How are you passing the XML from your XMLOutput Stage?....one column? You should use a single column on the output link with just a '/' in the Description.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Your first explanation solved the problem. I have placed data element as XML. That was creating the problem...it resolved.


thanks
kamal
rajesh223
Participant
Posts: 26
Joined: Mon Dec 19, 2005 4:37 am

Post by rajesh223 »

I am unable to get ur problem, pls mention the actual o/p and expected o/p.

-Rajesh
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Great kamal....glad it's working.

For anyone else's clarification, use the data element of XML within the XMLOutput Stage when you are passing in data that is already in XML format and you don't want it to get "xml-ized"......where "xml-ized" means that it will be seen as a string to be embedded inside of XML --- because when an XML parser sees that, it needs to "escape" all the tags like < and > so that they don't confuse the document that is being created (it tries to put xml inside of xml, if that makes sense).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply