Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 8 of 8

Thread: Show Case - Print Ticket with JavaScript/SOAP

  1. #1
    Senior Member
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    291

    Default Show Case - Print Ticket with JavaScript/SOAP

    The following sample allows to print a ticket with JavaScript and a PHP SOAP application. It is actually only a show case with some limitations that we hope to solve very soon.

    What does it do?

    By pressing the “print” button on an Incident Ticket a browser window is opened. The JavaScript application parses a print template (looks like a smarty template) and calls the PHP SOAP application. The ticket data is displayed in the browser window.

    Check out details on http://meintool.blogidoo.de/2007/01/...avascriptsoap/

    I'm curious for any feedback.

    Lars

  2. #2
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Sounds interesting.

    I filled out the form but did not receive an email.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  3. #3
    Senior Member
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    291

    Default

    Hi,

    maybe it's SPAM-filtered..? I have sent you a link again to the e-mail address you entered in the form.

    Greets,

    Lars

  4. #4
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Got it thanks. Also got the original mail later.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

    Want to keep this site alive? Consider making a donation. Click here.

  5. #5
    Senior Member
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    291

    Default

    I would love to hear, if someone succeeds to test it

    You can test it without installing the PHP SOAP application - you only need internet. Then it is displayed over 'http://www.outlance.de/scprint/prepare_ticket.php'

    or you install it on your server, then you need to modify the following function in OuPrintTicket ScriptLibrary.





    Code:
    function printTicketSOAP(contentArray)
    {
    	var content = '';
    	for(line in contentArray)
    	{
    		content = content + contentArray[line];
    	}
    	var url = 'http://www.outlance.de/scprint/prepare_ticket.php';
    	var xml = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SOAP-ENV:Body><ns1:printTicket xmlns:ns1=\"urn:xmethods-printTicket\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><content xsi:type=\"xsd:string[1]\"><![CDATA[" + content + "]]></content></ns1:printTicket></SOAP-ENV:Body></SOAP-ENV:Envelope>";
    	var attachment = new Array();
    	var quote = new XML;
    	quote = doSOAPRequest( url, 'printTicket', xml, null, null, 10, 10, 10, attachment );
    	return quote.getFirstChildElement().getFirstChildElement().getFirstChildElement().getNodeValue();
    }
    Last edited by tommy; 2007-01-19 at 19:02. Reason: put code into code box to avoid smilies appearing

  6. #6
    Senior Member
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    291

    Default

    Version 0.2 is available now.

    It is still unstable.
    We have added the usage of variables to templates. Checkout readme.txt in download file.

    Environment:

    - works with an out-of-the-box SC6.0 and SC6.1/SC6.2
    - uses a custom created PHP application. This application uses a PHP SOAP
    library (NuSOAP - licensed under GNU Lesser General Public - which means
    it can be used as a library together with any commercial application)

    For testing you only need internet access and ServiceCenter on your workstation (no installation required)


    What does it do?

    By pressing the “print” button on an Incident Ticket a browser window is opened. The JavaScript application parses a print template (looks like a smarty template) and calls the PHP SOAP application. The ticket data is displayed in the browser window.

    Features planned for V 0.3

    - Enhanced formatting of array fields
    modification of html template for better printing
    - documentation
    - later: SOAP SMTP E-Mail, Classic Text E-Mail, Other exporting/interfaces

    We need your suggestions for further enhancements!!!

    You can use this module free of charge without any warranty as is. As well you can modify it for your needs (check out license details).

    I’m courious about any feedback!




    check out http://meintool.blogidoo.de

  7. #7
    Junior Member
    Join Date
    Jan 2002
    Location
    Switzerland
    Posts
    20

    Default

    i have loaded your solution but i geht this error after i pressed the print button:
    "Process panel process.option in RAD display encountered error in line 4 (display,process.option)" and it shows a popup with the question: "What executable do you want to launch?"
    any Idea before I start to Trace ?

    my oob system is on 6.2.2 and my standard browser is firefox.
    Last edited by cschweri; 2007-07-17 at 14:19.

  8. #8
    Senior Member
    Join Date
    Jun 2002
    Location
    Germany
    Posts
    291

    Default

    Hello,

    sorry for late reply.
    I will check tomorrow on my SC6.2 system and let you know....
    Greets from Mannheim,
    Lars

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

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