Zum Hauptinhalt gehen

Suche

Suche

Send Btxml Response To Web Server

Kommentare

2 Kommentare

  • Avatar
    Shotaro Ito

    Hi Nikita,

     

    BTXML response can be idenfied by Name attribute or ID attribute in XMLScript Tag.

     

    I don't know well about MVC application, however try this setup to post XML response to a web server.

    Method: POST

    Content-type: text/xml

     

    404 error usually means wrong folder / file name specified - make sure the URL specified works.

     

    [attachment=1028:SendXMLResponseToWebServer.png]

     

     

    In ASP.net, response can be received as follows:

            protected void Page_Load(object sender, EventArgs e)
            {
                Page.Response.ContentType = "text/xml";
                // Read XML posted via HTTP
                System.IO.StreamReader reader = new System.IO.StreamReader(Page.Request.InputStream);
                String xmlData = reader.ReadToEnd();
    
                System.IO.File.WriteAllText(@"C:\Temp\Response.xml", xmlData, System.Text.Encoding.UTF8);
    
            }
    

    In received text, you can see Name and ID which specified in the XML Script.

    Print tag's JobName attribute shows document name, since document name is used for BarTender's default print job name.

    [attachment=1029:xmlResponse.png]

    0
  • Avatar
    Legacy Poster

    Hi Shotaro,

     

    Thanks a ton! That completely resolved my issue.  :)

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.