Results 1 to 10 of 10

Thread: xml through winsock?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    13

    xml through winsock?

    Please give me some basic explanation how to send and receive xml strings. Winsock? MSXML?

  2. #2
    Addicted Member
    Join Date
    Nov 2006
    Posts
    129

    Re: xml through winsock?

    split()

  3. #3
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: xml through winsock?

    if you want to send the XML data over the internet or a network you will need the winsock control, or the winsock API. Have a look at some tutorials theres loads.
    Chris

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: xml through winsock?

    Quote Originally Posted by sspoke
    split()

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    13

    Re: xml through winsock?

    I have server, named Intellex and a lot of COMs(APIs) to comunicate with him. This is wath happens:

    send
    0000 3C 56 53 44 4D 73 67 3E-30 00 00 00 F5 05 00 00 <VSDMsg>0.......
    0010 90 01 00 00 00 00 00 00-0B 00 00 00 31 39 32 2E ............192.
    0020 31 36 38 2E 31 2E 31 00-00 00 00 00 00 00 00 00 168.1.1.........
    0030 00 00 00 00 00 00 00 00-00 00 00 00 3C 2F 56 53 ............</VS
    0040 44 4D 73 67 3E DMsg>
    received
    0000 3C 56 53 44 4D 73 67 3E-1C 01 00 00 FD 05 00 00 <VSDMsg>........
    0010 01 00 00 00 00 00 00 00-08 01 00 00 00 00 00 00 ................
    0020 3C 45 78 49 6E 66 6F 3E-0D 0A 3C 53 69 74 65 3E <ExInfo>..<Site>
    0030 0D 0A 3C 4E 61 6D 65 3E-49 4E 54 45 4C 4C 45 58 ..<Name>INTELLEX
    0040 3C 2F 4E 61 6D 65 3E 0D-0A 3C 2F 53 69 74 65 3E </Name>..</Site>
    0050 0D 0A 3C 50 6F 72 74 73-20 4D 61 69 6E 20 3D 20 ..<Ports Main =
    0060 22 35 30 30 30 22 20 4C-69 76 65 20 3D 20 22 35 "5000" Live = "5
    0070 30 30 31 22 20 45 76 65-6E 74 20 3D 20 22 35 30 001" Event = "50
    0080 30 33 22 20 2F 3E 0D 0A-3C 4D 61 78 4C 69 76 65 03" />..<MaxLive
    0090 43 6C 69 65 6E 74 73 3E-35 3C 2F 4D 61 78 4C 69 Clients>5</MaxLi
    00A0 76 65 43 6C 69 65 6E 74-73 3E 0D 0A 3C 41 75 64 veClients>..<Aud
    00B0 69 6F 3E 0D 0A 3C 4E 75-6D 3E 30 3C 2F 4E 75 6D io>..<Num>0</Num
    00C0 3E 0D 0A 3C 2F 41 75 64-69 6F 3E 0D 0A 3C 54 65 >..</Audio>..<Te
    00D0 78 74 3E 0D 0A 3C 4E 75-6D 3E 30 3C 2F 4E 75 6D xt>..<Num>0</Num
    00E0 3E 0D 0A 3C 2F 54 65 78-74 3E 0D 0A 3C 53 65 63 >..</Text>..<Sec
    00F0 4D 6F 64 65 3E 30 3C 2F-53 65 63 4D 6F 64 65 3E Mode>0</SecMode>
    0100 0D 0A 3C 41 6C 61 72 6D-54 61 67 73 3E 0D 0A 3C ..<AlarmTags>..<
    0110 2F 41 6C 61 72 6D 54 61-67 73 3E 0D 0A 3C 2F 45 /AlarmTags>..</E
    0120 78 49 6E 66 6F 3E 0D 0A-3C 2F 56 53 44 4D 73 67 xInfo>..</VSDMsg
    0130 3E

    So, how to send the first string?
    Last edited by VbFob; Dec 3rd, 2006 at 03:48 AM.

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    13

    Re: xml through winsock?

    Quote Originally Posted by DigiRev
    UL=LdI/dt

  7. #7
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: xml through winsock?

    Quote Originally Posted by VbFob
    UL=LdI/dt


    Quote Originally Posted by VbFob
    So, how to send the first string?
    Do you know how to connect/send data with Winsock?

    The first string would look something like this:
    VB Code:
    1. Dim strPacket As String
    2.    
    3.     strPacket = "<VSDMsg>0...................192.168.1.1.....................</VSDMsg>"
    4.     'periods (.) represent Chr(0) in the port monitor/packet sniffer.
    5.     strPacket = Replace$(strPacket, ".", Chr$(0))
    6.    
    7.     'You have to connect to the server before you can send data using TCP.
    8.     winsock1.SendData strPacket

  8. #8
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: xml through winsock?

    I don't have a lot of experience with packet sniffers but one thing that puzzles me is why there is a dash in the hex representation on the left side?

    Code:
    0000 3C 56 53 44 4D 73 67 3E-30 00 00 00 F5 05 00 00

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    13

    Re: xml through winsock?

    Quote Originally Posted by DigiRev




    Do you know how to connect/send data with Winsock?

    The first string would look something like this:
    VB Code:
    1. Dim strPacket As String
    2.    
    3.     strPacket = "<VSDMsg>0...................192.168.1.1.....................</VSDMsg>"
    4.     'periods (.) represent Chr(0) in the port monitor/packet sniffer.
    5.     strPacket = Replace$(strPacket, ".", Chr$(0))
    6.    
    7.     'You have to connect to the server before you can send data using TCP.
    8.     winsock1.SendData strPacket
    Thank you blues bro, this is enough.
    The dash is from some winsock monitor app.

  10. #10

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    13

    Re: xml through winsock?

    It's not enought. The Protocol is IPv4 and after connection become TCP ??????? Well, this maybe will not happend on LAN........... OK, I have some responce, how to catch him ?
    Last edited by VbFob; Dec 3rd, 2006 at 04:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width