Issues with XML Format Post Processor

309 views
Skip to first unread message

oconnorm...@gmail.com

unread,
Apr 3, 2014, 2:44:12 PM4/3/14
to jmeter-...@googlegroups.com
Hi All,

I'm struggling to get the XML Format Post Processor to work.

I've added the JMeterPlugins-Extras.jar to my lib\ext directory and added the Post Processor to my HTTP test, and at the start of the thread



I'm using XML in the Body Data of my HTTP Request, and I get an XML response.

Unfortunately my response isn't displaying as formatted.....



















Does anyone know what the issue could be?

The JMeter command line is also erroring with the following.....

Andrey Pohilko

unread,
Apr 4, 2014, 4:45:58 AM4/4/14
to jmeter-...@googlegroups.com, oconnorm...@gmail.com
Hi,

There is some extra bytes at the beginning of your XML, as seen on screenshot. So it looks not correct to XML parser and it fails to do its job. What are those bytes?

--
Andrey

четверг, 3 апреля 2014 г., 22:44:12 UTC+4 пользователь oconnorm...@gmail.com написал:

Matthew O'Connor

unread,
Apr 5, 2014, 5:04:50 AM4/5/14
to jmeter-...@googlegroups.com, oconnorm...@gmail.com

Unfortunately those characters only seem to appear when the output option is set to Text. 

Anything else and my XML looks valid, including the existing XML option.

If I save the response to a file, the format also looks fine. E.g.....

<LearnerEvent><Queries><Events list="1"><Event><EventHeader>Event Resources for Class event</EventHeader><EventTypeCode>CL</EventTypeCode><EventLongDescription>Class</EventLongDescription><EventShortDescription>Class</EventShortDescription><EventCode>CATH101event</EventCode><Description>Class event</Description><SessionCode>2013</SessionCode><EventId>221</EventId><RegisterEventDetailId>521</RegisterEventDetailId><ObjectType>Learner</ObjectType><IsForEma>Y</IsForEma><LocationShortDescription>North Sydney</LocationShortDescription><EventSlots list="1"><EventSlot><StartDate>2012-12-24T09:00:00.000+11:00</StartDate><EndDate>2012-12-24T10:00:00.000+11:00</EndDate><DayOfWeek>Monday</DayOfWeek><DayNumber>1</DayNumber><RegisterEventDetailId>521</RegisterEventDetailId><RegisterEventSlotId>361</RegisterEventSlotId><EventCourses list="1"><EventCourse><CourseCode>CATH101</CourseCode><UIOID>2207</UIOID><TutorGroups>NOGROUP</TutorGroups><RegisterEventSlotId>361</RegisterEventSlotId></EventCourse></EventCourses><EventRooms list="1"><EventRoom><RoomCode>R101</RoomCode><Description>R101</Description><RegisterEventSlotId>361</RegisterEventSlotId></EventRoom></EventRooms><EventStaffs list="1"><EventStaff><StaffName>MISS Alicia Sellwood</StaffName><AltPreferredName>MISS  Sellwood</AltPreferredName><PersonCode>3071</PersonCode><RegisterEventSlotId>361</RegisterEventSlotId></EventStaff><EventStaff><StaffName>Brad Knowles</StaffName><AltPreferredName>B Knowles</AltPreferredName><PersonCode>4881</PersonCode><RegisterEventSlotId>361</RegisterEventSlotId></EventStaff></EventStaffs></EventSlot></EventSlots></Event></Events><People list="1"><Person><SRN>31102013</SRN><UserId null="1" /><Header>Events for: Mr Derek Satan</Header><CurrentSessionCode>2013</CurrentSessionCode><AllEventTypes>CL,EX,FL,IN,IS,ME,NA,ON,SD,WV</AllEventTypes><CurrentWeekNumber>-1</CurrentWeekNumber><AllWeekNumbers>1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53</AllWeekNumbers></Person></People></Queries></LearnerEvent>

Just seem to be having trouble formatting it......:(

Many thanks,

Andrey Pohilko

unread,
Apr 5, 2014, 12:56:50 PM4/5/14
to jmeter-...@googlegroups.com, oconnorm...@gmail.com
Could you try viewing your saved to file xml in some binary viewer? To see if those bytes are present. I guess it may be the http://en.wikipedia.org/wiki/Byte_order_mark , looks very similar. The preprocessor does not expect BOM in its input. 

Maybe it will allow it if your XML will have <?xml ...> starting, just guessing.

Hope this helps

--
Andrey

суббота, 5 апреля 2014 г., 13:04:50 UTC+4 пользователь Matthew O'Connor написал:
Reply all
Reply to author
Forward
0 new messages