Options

Problem in reply error from Navision Communication Component

TongAnonTongAnon Member Posts: 2
I make a Web Service for run Navision Process by NAS with MSMQ Adapter. When a message is delivered successfully to NAS but an error occurs at Navision Process. The Navision Communication Component automatically generates this error message. I try to read it but I have a problem.

This is an error message body that returned from The Navision Communication Component

FF FE 3C 00 3F 00 78 00 6D ÿþ<.?.x.m
00 6C 00 20 00 76 00 65 00 .l. .v.e.
72 00 73 00 69 00 6F 00 6E r.s.i.o.n
00 3D 00 22 00 31 00 2E 00 .=.".1...
30 00 22 00 3F 00 3E 00 3C 0.".?.>.<
00 4E 00 61 00 76 00 69 00 .N.a.v.i.
73 00 69 00 6F 00 6E 00 45 s.i.o.n.E
00 72 00 72 00 6F 00 72 00 .r.r.o.r.
4D 00 73 00 67 00 20 00 78 M.s.g. .x
00 6D 00 6C 00 6E 00 73 00 .m.l.n.s.
3D 00 22 00 75 00 72 00 6E =.".u.r.n
00 3A 00 77 00 77 00 77 00 .:.w.w.w.
2D 00 4E 00 61 00 76 00 69 -.N.a.v.i
00 73 00 69 00 6F 00 6E 00 .s.i.o.n.
2D 00 63 00 6F 00 6D 00 3A -.c.o.m.:
00 4E 00 61 00 76 00 69 00 .N.a.v.i.
73 00 69 00 6F 00 6E 00 45 s.i.o.n.E
00 72 00 72 00 6F 00 72 00 .r.r.o.r.
4D 00 73 00 67 00 2E 00 78 M.s.g...x
00 6D 00 6C 00 22 00 3E 00 .m.l.".>.
3C 00 45 00 72 00 72 00 6F <.E.r.r.o
00 72 00 4E 00 6F 00 3C 00 .r.N.o.<.
45 00 72 00 72 00 6F 00 72 E.r.r.o.r
00 4D 00 65 00 73 00 73 00 .M.e.s.s.
61 00 67 00 65 00 3E 00 4F a.g.e.>.O
00 76 00 65 00 72 00 66 00 .v.e.r.f.
6C 00 6F 00 77 00 20 00 75 l.o.w. .u
00 6E 00 64 00 65 00 72 00 .n.d.e.r.
20 00 74 00 79 00 70 00 .t.y.p.

I try to use Visual Basic .NET to read this message by NavisionErrorMsg formatter, but an error occurs at xml document.
I think, this xml is a UTF-16 Encoding but I don't know how to solve this.

Please help!

Thank you.

Comments

  • Options
    rossirossi Member Posts: 36
    Hi!

    Difficult to determine what is going wrong in your Navision process, but the error message is something about 'overflow during type conversion'.
    You must look closer into the parts of your code where this takes place.

    Good luck ..
  • Options
    rjncrjnc Member Posts: 6
    I'm having the same problem, have you figured it out?
    In .net when i try to read the xml, it give´s me an XML Exception, and it says that the XML Root element is missing.

    Any suggestion?

    Thnks
  • Options
    DenSterDenSter Member Posts: 8,304
    An XML document MUST have a root element, which is an element that occurs not more and not less than one time. You can call it anything you like, provided that you only use allowed characters. If you get a parser error like that, the resolution is usually fairly simple. Just make sure that your document has such an element, and you shouldn't get the error anymore.

    If you have questions about how to properly format an XML document, you should read up on that before programming with it. There's a good resource here, or you could go to the "official" keeper of XML standards here.
  • Options
    rjncrjnc Member Posts: 6
    Thank you for your reply, but in my case, the xml document isnt created by me. What im doing is developing some web services that communicate with Navision through MSMQ, and the services are working just fine, but know i want handle errors that occur in Navision. According with the documentation (cd drive\Client\Common\Navision\Communication Component\devguide.chm) Navision creates a message, NavisionErrorMsg with the description of the error. But it seems that's something wrong with the xml that Navision generates, when i try to read the xml in the webService, it returns me a XMLException, and says that the XML Root Element is missing.
    Here is the message that im getting

    FF FE 3C 00 3F 00 78 00 6D ÿþ<.?.x.m
    00 6C 00 20 00 76 00 65 00 .l. .v.e.
    72 00 73 00 69 00 6F 00 6E r.s.i.o.n
    00 3D 00 22 00 31 00 2E 00 .=.".1...
    30 00 22 00 3F 00 3E 00 3C 0.".?.>.<
    00 4E 00 61 00 76 00 69 00 .N.a.v.i.
    73 00 69 00 6F 00 6E 00 45 s.i.o.n.E
    00 72 00 72 00 6F 00 72 00 .r.r.o.r.
    4D 00 73 00 67 00 20 00 78 M.s.g. .x
    00 6D 00 6C 00 6E 00 73 00 .m.l.n.s.
    3D 00 22 00 75 00 72 00 6E =.".u.r.n
    00 3A 00 77 00 77 00 77 00 .:.w.w.w.
    2D 00 4E 00 61 00 76 00 69 -.N.a.v.i
    00 73 00 69 00 6F 00 6E 00 .s.i.o.n.
    2D 00 63 00 6F 00 6D 00 3A -.c.o.m.:
    00 4E 00 61 00 76 00 69 00 .N.a.v.i.
    73 00 69 00 6F 00 6E 00 45 s.i.o.n.E
    00 72 00 72 00 6F 00 72 00 .r.r.o.r.
    4D 00 73 00 67 00 2E 00 78 M.s.g...x
    00 6D 00 6C 00 22 00 3E 00 .m.l.".>.
    3C 00 45 00 72 00 72 00 6F <.E.r.r.o
    00 72 00 4E 00 6F 00 3C 00 .r.N.o.<.
    45 00 72 00 72 00 6F 00 72 E.r.r.o.r
    00 4D 00 65 00 73 00 73 00 .M.e.s.s.
    61 00 67 00 65 00 3E 00 4C a.g.e.>.L
    00 6F 00 63 00 61 00 6C 00 .o.c.a.l.
    69 00 7A 00 61 00 E7 00 E3 i.z.a.ç.ã
    00 6F 00 20 00 43 00 F3 00 .o. .C.ó.
    64 00 69 00 67 00 6F 00 d.i.g.o.

    This error is forced in Navision, with the objective of testing this situation. So, since the xml document isnt created by me, i would like to know if this is a bug from Navision, or i have errors in my code.

    Thnks,
    rjnc
  • Options
    DenSterDenSter Member Posts: 8,304
    What you missed in my reply is that I haven't worked with this particular message, so I am just brainstorming without actually knowing what I am talking about :).

    I don't think that Navision automatically returns that error, so there must be some code in your MessageReceived event that sends it back. What I would do is try to catch the message before it is returned and save it as a file, so you can take a look at it. Whenever I have a parser error like that, it is usually because there is something missing in my programming, although I would not rule out an error on Navision's part.
  • Options
    rjncrjnc Member Posts: 6
    This problem seems to be solved, the solution is here http://www.mibuso.com/forum/viewtopic.php?p=27037#27037

    rjnc
Sign In or Register to comment.