Jump to content

tartnboy

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

2 Neutral

About tartnboy

  • Rank
    Newbie
  • Birthday 03/11/1966

Previous Fields

  • Languages
    html, Classic ASP, VBScript, JavaScript, CSS

Contact Methods

  • MSN
    billmessick@winn-dixie.com
  • ICQ
    0

Profile Information

  • Location
    Jacksonville, FL
  1. OK, first and foremost, am using classic ASP as that is what I have to work with. All electronic forms in my company are currently in classic ASP. Too many of them to move to .net any time soon. That said, I have written an html form that includes sending a SOAP request to our CRM (ticketing system) which is vendor hosted. They are supplying the .net web service to the CRM's database. This will send back a response not only of a successful receipt, but also a ticket number which I am to display to the customer's screen. I am pretty comfortable with the sending part, I think. It is the response I am not so sure about. I've done XML responses through a web service before; however, I've never had a response I would have to parse before. Here are the questions that I have: 1. Are the request and response generally coded in the same envelope or separately? 2. I'm pretty comfortable displaying text received in a response using xmlhttp.responseText, but HOW would you parse the SOAP response in classic ASP? Below is the code I have for the Request: strXML = "" strXML = strXML & "<?xml version=""1.0"" encoding=""UTF-8""?>" & strCR strXML = strXML & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" & strCR strXML = strXML & " <SOAP-ENV:Header>" & strCR strXML = strXML & " <m:header xmlns:m='http://VenderURL'>" & strCR strXML = strXML & " <docType>Esr Client</docType>" & strCR strXML = strXML & " <version>3.0</version>" & strCR strXML = strXML & " <sender type='CUSTSYSID'>WIN</sender>" & strCR strXML = strXML & " <receiver type='CUSTSYSID'>CCC</receiver>" & strCR strXML = strXML & " <requestSyncType>synchronous</requestSyncType>" & strCR strXML = strXML & " <deployment.Mode>test</deployment.Mode>" & strCR strXML = strXML & " <partner type='CUSTSYSID'>" & String & "</partner>" & strCR strXML = strXML & " <transactionId>" & IntPONumber & "</transactionId>" & strCR strXML = strXML & " <timestamp>" & strTimeStamp & "</timestamp>" & strCR strXML = strXML & " </m:header>" & strCR strXML = strXML & " </SOAP-ENV:Header>" & strCR strXML = strXML & " <SOAP-ENV:Body>" & strCR strXML = strXML & " <m:serviceRequest xmlns:m='http://VendorURL' action='String'>" & strCR strXML = strXML & " <ticketInfo ticketNumber='String'>" & strCR strXML = strXML & " <refTicketNumber>" & "intPONumber" & "</refTicketNumber>" & strCR strXML = strXML & " <openedDateStamp>" & strTimeStamp & "</openedDateStamp>" & strCR strXML = strXML & " <sentDateStamp>" & strTimeStamp & "</sentDateStamp>" & strCR strXML = strXML & " <transDateStamp>" & strTimeStamp & "</transDateStamp>" & strCR strXML = strXML & " <problemDescription>" & "strCCDescription" & "</problemDescription>" & strCR strXML = strXML & " <resolution code='String' timeStamp='YYYY-MM-DDTHH:MM:SS'>" & String & "</resolution>" & strCR strXML = strXML & " <shortDescription>" & strSubject & "</shortDescription>" & strCR strXML = strXML & " <status>2</status>" & strCR strXML = strXML & " <priority internalCode='3'/>" & strCR strXML = strXML & " <severity code='3'/>" & strCR strXML = strXML & " <sla contractId=””>" & strCR strXML = strXML & " <contractName>Winn-Dixie SLA Contract</contractName>" & strCR strXML = strXML & " </sla>" & strCR strXML = strXML & " <technician.id>" & strTechnician & "</technician>" & strCR strXML = strXML & " <category name='IssueCode1'>INCIDENT</category>" & strCR strXML = strXML & " <category name='IssueCode2'>HARDWARE</category>" & strCR strXML = strXML & " <category name='IssueCode3'>BREAK / FIX</category>" & strCR strXML = strXML & " </ticketInfo>" & strCR strXML = strXML & " <entitlement>" & strCR strXML = strXML & " <code>" & CustCode & "</code>" & strCR strXML = strXML & " </entitlement>" & strCR strXML = strXML & " <contact type='primary' vip=”false”>" & strCR strXML = strXML & " <company>WINN-DIXIE</company>" & strCR strXML = strXML & " <Email>WD REQ</Email>" & strCR strXML = strXML & " </contact>" & strCR strXML = strXML & " <serviceAddress site='0'>" & strCR strXML = strXML & " </serviceAddress>" & strCR strXML = strXML & " <equipment>" & strCR strXML = strXML & " <model>" & part_no & "</model>" & strCR strXML = strXML & " <description>" & strConfigItem & "</description>" & strCR strXML = strXML & " </equipment>" & strCR strXML = strXML & " <extrinsics name='FLEX2'>" & strPartDesc & "</extrinsics>" & strCR strXML = strXML & " </m:serviceRequest>" & strCR strXML = strXML & " <SOAP-ENV:Fault>" & strCR strXML = strXML & " <faultcode>SOAP-ENV:Client</faultcode>" & strCR strXML = strXML & " <faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>" & strCR strXML = strXML & " <faultactor>http://b2bqc.compucom.com/soap</faultactor>" & strCR strXML = strXML & " </SOAP-ENV:Fault>" & strCR strXML = strXML & " </SOAP-ENV:Body>" & strCR strXML = strXML & "</SOAP-ENV:Envelope>" ' End of Request section ' Call the webservice using POST baseURL="[url="https://b2bqc.compucom.com/ws/CcEsrV4:provider"]https://b2bqc.compucom.com/ws/CcEsrV4:provider[/url]" 'Link for Production Environment Set objXmlHttp = CreateObject("MSXML2.ServerXMLHTTP.3.0") objXmlHttp.setTimeouts toResolve, toConnect, toSend, toReceive objXmlHttp.Open "POST", baseURL, False objXMLHttp.Send(strXML) Here's the code for the response: strXMLResponse = ""strXMLResponse = strXMLResponse & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='[url="http://schemas.xmlsoap.org/soap/envelope/"]http://schemas.xmlsoap.org/soap/envelope/[/url]' xmlns:SOAP-ENC='[url="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/url]' xmlns:xsd='[url="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/url]'xmlns:xsi='[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]'>" & strCRstrXMLResponse = strXMLResponse & "<SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & " <serviceResponse>" & strCRstrXMLResponse = strXMLResponse & " <status code="?">string</status>" & strCRstrXMLResponse = strXMLResponse & " <statusMsg>string</statusMsg>" & strCRstrXMLResponse = strXMLResponse & " <ticketNumber>string</ticketNumber>" & strCRstrXMLResponse = strXMLResponse & " <refTicketNumber>string</refTicketNumber>" & strCRstrXMLResponse = strXMLResponse & " </ESR:serviceResponse>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Envelope>" ' XML Response from VendorresponseXML = xmlhttp.responseTextresponse.write("Your Ticket Number is: ") & "<b><font color='#cc0000' size='4'>" & responseXML & "</font></b>" Any guidance anyone can provide would be greatlly appreciated. Thanks, BillM
  2. I figured that was the case, but that is one of those elements of JavaScript I haven't had to use before. Could you suggest sample code of usage of that method? Again, when an amount is entered in textbox1, I want to multiply that value entered by 0.25 and show the result in textbox2, displayed as a monitary value, with the standard 2 decimal places.Thanks in advance for your assistance. Sincerely,BillM
  3. I have an eForm written in classic ASP. The mailer, which is written in vbscript does the multiplication just fine, and sends the result of the total amount entered in the first text box as a dollar value, and the result of that value multiplied by 0.25 in the email sent to the customer. The problem is, the client wants the result to show up in a separate field immediately on the form after the amount is entered in the first text box. It won't do it with VBScript because that is server side code and can't update the information until I hit the submit button. I have looked at several examples of AJAX and JavaScript throughout the internet in an attempt to find something that will do what I need. I think that I would need to use the getelementbyid function, but not sure. Can anyone suggest the proper way to do this?Thanks for any direction anyone can provide.Sincerely,BillM
  4. All the remote tools I have only work within my domain. So, no, I don't think I can. As to the other options, using includes files is in the ASP tutorial. Considering that you are using html instead of asp, I don't think the include file would have worked for you. Using frames really isn't anywhere in this site, but a frames page allows you to make one or more frame in the window static, meaning for example, that if you wanted to, you could have made your common_files.html page your top frame and just made the name for your bottom frame the target and displayed the page there. It doesn't matter since the option I gave you worked, but might be things you want to look up for future reference and improving your skills. The thing to remember about using frames in general, including iframes, is that there are security vulnerabilities that make their use undesirable if used in anything other than an intranet site, where security to the site is tightly controlled. Glad I could help and best of luck to you.Bill
  5. I created 3 pages with the same names and same content as you posted, aside from the internal style sheet. With what you posted, I could only see the following, until I started clicking links:Page ONE | Page TWO That is, at least until I started clicking the links, alternating between the two. Then I ultimately got down to the following:Computer - ZERO ONE Laptop - ZERO TWOComputer - ZERO ONELaptop - ZERO TWOThen, there were no more links. I guess the big question here is: Why you are trying to do this in an iframe? Granted, we don't know if there is/will be additional content other than what you have included in your presented code. From what you have shown us, you would do better to either:A. Put the shared content you have shown in common_links.html on both pages, using parent as the targetB. Use the common_links.html as an include file (kind of overkill considering the simplicity of the code)C. Use a split frames page to present the content, showing the links at the top, bottom, or wherever you preferD. In your links, you don't have a target. If you include target="parent", the resulting link takes over the whole page. I believe this is what you were looking for to happen.Changing the code on the recreated sample and using option D, I got it to work the way I think you intended. Try changing your two links in the common_links.html page to the following:<a href="01.html" target="_parent" class="style2">Page ONE</a> | <a href="02.html" target="_parent" class="style2">Page TWO</a>I think you will find that this works. Good luck. BillM
  6. Newbie,Seems to display fine when I tested it. Would help to know what you are trying to accomplish and what your expectations are in terms of what is to be displayed. Please provide more information.Thanks,BillM
×
×
  • Create New...