Page 1 of 1

MQ and XML Problem

Posted: Sun Dec 16, 2007 2:13 pm
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

Posted: Sun Dec 16, 2007 2:46 pm
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.

Posted: Mon Dec 17, 2007 8:05 pm
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

Posted: Tue Dec 18, 2007 12:09 pm
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

Posted: Tue Dec 18, 2007 2:02 pm
by rajesh223
I am unable to get ur problem, pls mention the actual o/p and expected o/p.

-Rajesh

Posted: Wed Dec 19, 2007 9:43 pm
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