Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP MSSoap.SoapClient30
Message
From
11/12/2017 15:37:25
 
 
To
11/12/2017 13:34:08
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01656273
Message ID:
01656289
Views:
98
>Sorry, I switch the files.
>
>Here they are: (attached)

This goes completely untested, the errors not handled, fueled by a lot of guesswork, and not properly organized. Yet, it may serve as a basis for what you'll have to do.
LOCAL WS AS MSXML2.ServerXMLHTTP60
LOCAL SOAPAddress AS String
LOCAL SOAPRequest AS String
LOCAL SOAPResponse AS MSXML2.DOMDocument60
LOCAL SessionId AS String
LOCAL StationName AS String
LOCAL UserName AS String
LOCAL UserPassword AS String
LOCAL Status AS String

m.SOAPAddress = "http://rmn-armz01:1353/GP.CrossEnterpriseUnit.Integrator/ISession2"

m.WS = CREATEOBJECT("MSXML2.ServerXMLHTTP.6.0")
m.WS.open("Post", m.SOAPAddress, .F.)
m.WS.setRequestHeader("Content-type", "application/soap+xml; charset=utf-8")

TEXT TO m.SOAPRequest NOSHOW TEXTMERGE
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://tempuri.org/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns0:Open>
      <ns0:remoteClientType>WebserviceClient</ns0:remoteClientType>
    </ns0:Open>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ENDTEXT

m.WS.send(m.SOAPRequest)

m.SOAPResponse = m.WS.responseXML
m.SOAPResponse.setProperty("SelectionNamespaces", 'xmlns:gp="http://schemas.datacontract.org/2004/07/GP.CrossEnterpriseUnit.Integrator"')
m.SessionId = m.SOAPResponse.selectNodes("//gp:SessionId").item(0).text

m.StationName = "WebService"
m.UserName = "WebService"
m.UserPassword = "Rmn123@456-"

TEXT TO m.SOAPRequest NOSHOW TEXTMERGE
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://tempuri.org/"
  xmlns:gp="http://schemas.datacontract.org/2004/07/GP.CrossEnterpriseUnit.Integrator">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns0:LogOn>
      <ns0:sessionId><<m.SessionId>></ns0:sessionId>
      <ns0:logOnArgs>
        <gp:StationName><<m.StationName>></gp:StationName>
        <gp:UserName><<m.UserName>></gp:UserName>
        <gp:UserPassword><<m.UserPassword>></gp:UserPassword>
      </ns0:logOnArgs>
    </ns0:LogOn>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ENDTEXT

m.WS.open("Post", m.SOAPAddress, .F.)
m.WS.setRequestHeader("Content-type", "application/soap+xml; charset=utf-8")
m.WS.send(m.SOAPRequest)

m.SOAPResponse = m.WS.responseXML
m.SOAPResponse.setProperty("SelectionNamespaces", 'xmlns:gp="http://schemas.datacontract.org/2004/07/GP.CrossEnterpriseUnit.Integrator"')
m.Status = m.SOAPResponse.selectNodes("//gp:Status").item(0).text

? m.Status
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform