Never mind.  I was not allowing enough space for the token.


On 2/22/2015 12:57 PM, Jeff Johnson wrote:
Tracy: you helped me with this.  Here is your code that works:

    LOCAL oHttp as MSXML2.ServerXMLHTTP30
    oHttp = CREATEOBJECT('msxml2.serverxmlhttp.3.0')
oHttp.open("post", "http://support.itsonboarding.com/OnBoarding.svc";, .F.)
    oHttp.setRequestHeader("Accept", "text/xml")
    oHttp.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
oHttp.setRequestHeader("SOAPAction", "http://tempuri.org/IOnBoarding/GetInsurance";)

    TEXT TO postText NOSHOW
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:tem="http://tempuri.org/";>
       <soapenv:Header/>
       <soapenv:Body>
          <tem:GetInsurance>
             <tem:UserName>JS</tem:UserName>
             <tem:Password>pa</tem:Password>
<tem:Token>hIzPN7YwfAsPpSQQ1HV2uGAU2IJTgigbn0R6yJuW959Ck6Yst4z3hg==</tem:Token>
          </tem:GetInsurance>
       </soapenv:Body>
    </soapenv:Envelope>
    ENDTEXT

    oHttp.send(postText)
    x = oHttp.responsexml.xml

I need to change the token each time so
Here is my code that does not work:

    LOCAL oHttp as MSXML2.ServerXMLHTTP30
    oHttp = CREATEOBJECT('msxml2.serverxmlhttp.3.0')
oHttp.open("post", "http://support.itsonboarding.com/OnBoarding.svc";, .F.)
    oHttp.setRequestHeader("Accept", "text/xml")
    oHttp.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
oHttp.setRequestHeader("SOAPAction", "http://tempuri.org/IOnBoarding/GetInsurance";)

    postText = ''
postText = postText + '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:tem="http://tempuri.org/";>' + crlf
    postText = postText + '   <soapenv:Header/>' + crlf
    postText = postText + '   <soapenv:Body>' + crlf
    postText = postText + '      <tem:GetInsurance>' + crlf
    postText = postText + ' <tem:UserName>JS</tem:UserName>' + crlf
    postText = postText + ' <tem:Password>pa</tem:Password>' + crlf
postText = postText + ' <tem:Token>' + lctoken + '</tem:Token>' + crlf
    postText = postText + '      </tem:GetInsurance>' + crlf
    postText = postText + '   </soapenv:Body>' + crlf
    postText = postText + '</soapenv:Envelope>'

    oHttp.send(postText)
    x = oHttp.responsexml.xml

I tried it with crlf = chr(13) + chr(10) and also crlf = ''

Is the line delimiter wrong or what am I missing. I need to put that token in each call.


--
Jeff

Jeff Johnson
[email protected]
SanDC, Inc.
(623) 582-0323
SMS (602) 717-5476
Fax 623-869-0675

www.san-dc.com
www.cremationtracker.com
www.agentrelationshipmanager.com

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to