cancel
Showing results for 
Search instead for 
Did you mean: 

XML error

Former Member
0 Kudos

we are going JMS(MQ) -->IDOC secanrio...

we have given the sample file to JMS Q poeple to give us fallowing XML as the input to XI...

<Shipment>

<ProcessAction>003</ProcessAction>

<Shipmentnumber>12345</Shipmentnumber>

<ServiceCode>abcd</ServiceCode>

<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode>

<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime>

</Shipment>

when we test with atht XMLL,we are facing some problem.....

but when we go with the fallowing XML with two more tags added its working fine....

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_LOAD_INFO xmlns:ns0="urn:cc.com:oa:">

<ShipmentNumber>23</ShipmentNumber>

<ShipmentEntryType>344</ShipmentEntryType>

<ServiceCode>43</ServiceCode>

<LoadStartDateTime>3434</LoadStartDateTime>

</ns0:MT_LOAD_INFO>

what would be the problem....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
<Shipment>
<ProcessAction>003</ProcessAction> 
<Shipmentnumber>12345</Shipmentnumber> 
<ServiceCode>abcd</ServiceCode> 
<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode> 
<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime> 
</Shipment>

This is not a valid XML,every XML must have a declaration section <?xml version="1.0" encoding="UTF-8"?>

for <ns0:MT_LOAD_INFO xmlns:ns0="urn:cc.com:oa:">

you can make some settings in message mapping and it should work without namespace.

Thanx

Aamir

Edited by: Aamir Suhail on Aug 14, 2008 1:18 PM

Former Member
0 Kudos

Hi Amir,

Thanks for the iput.

Can u tell me what would be the XML i should ask them......

Please let me know if the fallowing format is correct....or do we need to add something in it...

<?xml version="1.0" encoding="UTF-8"?>

<Shipment>

<ProcessAction>003</ProcessAction>

<Shipmentnumber>12345</Shipmentnumber>

<ServiceCode>abcd</ServiceCode>

<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode>

<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime>

</Shipment>

Former Member
0 Kudos

Hi

In your below xml format still the line for Message type is missing...

Right format will be..

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_LOAD_INFO xmlns:ns0="urn:cc.com:oa:">

<Shipment>

<ProcessAction>003</ProcessAction>

<Shipmentnumber>12345</Shipmentnumber>

<ServiceCode>abcd</ServiceCode>

<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode>

<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime>

</Shipment>

</ns0:MT_LOAD_INFO>

Thanks

Swarup

Former Member
0 Kudos
<?xml version="1.0" encoding="UTF-8"?>
<Shipment>
<ProcessAction>003</ProcessAction> 
<Shipmentnumber>12345</Shipmentnumber> 
<ServiceCode>abcd</ServiceCode> 
<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode> 
<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime> 
</Shipment>

Yeah,this looks fine as long as you have implemented the technique to remove the namespace shown in the blog i mentioned before,if you have not removed the namespace,then you need to enter the ending and closing tags for namespace too in XML.

Thanx

Aamir

Former Member
0 Kudos

Hi Swarup/Aamir,

should i add the shipment element int it...it is bold here

..consider i am not going with namespace aswell...and with namespace...i mean in both cases....how would be the structure i shoud give to the client....

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_LOAD_INFO xmlns:ns0="urn:cc.com:oa:">

<Shipment>

<ProcessAction>003</ProcessAction>

<Shipmentnumber>12345</Shipmentnumber>

<ServiceCode>abcd</ServiceCode>

<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode>

<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime>

</Shipment>

</ns0:MT_LOAD_INFO>

Former Member
0 Kudos

>> <Shipment>

This is the root node,it has to be there in XML.without root node,XML is not valid

Thanx

Aamir

Former Member
0 Kudos

Hi aamir,

which is the better way to ask them......with namespace or without namespace.....

if i ask them with namespace....they are asking what is this......let me know if i can ask them without namespace...f so what are the steps i need to tae care....

i am bit confused with this in bold letters.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_LOAD_INFO xmlns:ns0="urn:cc.com:oa:"><Shipment>

<ProcessAction>003</ProcessAction>

<Shipmentnumber>12345</Shipmentnumber>

<ServiceCode>abcd</ServiceCode>

<ShipmentEntryTypeCode>NY</ShipmentEntryTypeCode>

<LoadStartDateTime>2008-07-06T16:00:00</LoadStartDateTime>

</Shipment>

</ns0:MT_LOAD_INFO>

Former Member
0 Kudos

Hi,

You may ask for either with namspace ..and if its not clear ...ask to give it without namspace..

You can handle it in XI.

But for that you may need to go for XSLT mapping...to handle it...

If you got the namespace then...it will be pretty straight forward steps in XI...

Thanks

Swarup

Former Member
0 Kudos

Hey Swarup

>>But for that you may need to go for XSLT mapping...to handle it...

Its not required to use XSLT mapping if you don't have namespace in XML.

We are getting EDI files without namespace in XML and simple graphical mapping works just perfect.

Thanx

Aamir

Former Member
0 Kudos

HI,

Yes you are right....we can do this without xml namespace also.....

Sorry..I forgot to recall azbout it..thanks to rectify me...

Thanks

Swarup

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed

So Any Message send under the XML format should highlight about the information as

Text encoding Format -- Default UTF-8 in 1st line

and Message type name as root node...you may include the namespace with it.

Refer the detail explanation for it.

http://www.intranetjournal.com/articles/200401/ij_01_13_04a.html

Thanks

swarup