Re: SOAP vs FoxPro
- From: "ATSPSoft" <atspsoft@xxxxxxxxxxx>
- Date: Fri, 24 Nov 2006 13:35:07 -0000
Hi anders,
LOCAL variable AS ... does not existe in VFP6!!
ATSP
"Anders Altberg" <A@A> escreveu na mensagem
news:uCHlaD8DHHA.4832@xxxxxxxxxxxxxxxxxxxxxxx
I think you shoulod staert like this:
LOCAL Serializer As MSSOAP.SoapSerializer30
LOCAL Reader As MSSOAP.SoapReader30
LOCAL ResultElm As IXMLDOMElement
LOCAL FaultElm As IXMLDOMElement
LOCAL Connector As MSSOAP.ISoapConnector
LOCAL xmldoc AS Msxml2.DOMDocument.4.0
LOCAL newRoot As IXMLDOMElement
Connector = NEWOBJECT( 'MSSOAP.HttpConnector30' )
xmlDoc = NEWOBJECT("Msxml2.DOMDocument.4.0")
newRoot = xmlDoc.createElement("root")
xmlDoc.documentElement = newRoot
Reader=NEWOBJECT('MSSOAP.SoapReader30')
* Treat you ResultElm and Faultelm likewise.
With Connector
.Property('EndpoinURL')='qq camonho'
.Connect()
Endwith
With Serializer
.Init(Connector.InputStream)
* .....
EndWith
With Reader
.Load( Connector.OutputStream )
*....
EndWith
I don't have Msxml2.DOMDocument.3.0 installed right now.
Where does the Exedcute come from? A declared object?
-Anders
"ATSPSoft" <atspsoft@xxxxxxxxxxx> skrev i meddelandet
news:newscache$czd89j$hd4$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I would like to convert this VB code to FoxPro code:
(sample in help SOAP 3.0)
Dim Serializer As SoapSerializer30
Dim Reader As SoapReader30
Dim ResultElm As IXMLDOMElement
Dim FaultElm As IXMLDOMElement
Dim Connector As ISoapConnector
Set Connector = New HttpConnector30
Connector.Property("EndPointURL") = "qq caminho"
Connector.Connect
Connector.Property("SoapAction") = "uri:"
Connector.BeginMessage
Set Serializer = New SoapSerializer30
Serializer.Init Connector.InputStream
Serializer.StartEnvelope
Serializer.StartBody
Serializer.StartElement Method, CALC_NS, , "m"
Serializer.StartElement "A"
Serializer.WriteString CStr(A)
Serializer.EndElement
Serializer.StartElement "B"
Serializer.WriteString CStr(B)
Serializer.EndElement
Serializer.EndElement
Serializer.EndBody
Serializer.EndEnvelope
Connector.EndMessage
Set Reader = New SoapReader30
Reader.Load Connector.OutputStream
If Not Reader.Fault Is Nothing Then
MsgBox Reader.FaultString.Text, vbExclamation
Else
Execute = CDbl(Reader.RpcResult.Text)
End If
TIA,
ATSP
.
- References:
- SOAP vs FoxPro
- From: ATSPSoft
- SOAP vs FoxPro
- Prev by Date: Re: SOAP vs FoxPro
- Next by Date: Re: SOAP vs FoxPro
- Previous by thread: Re: SOAP vs FoxPro
- Next by thread: Re: SOAP vs FoxPro
- Index(es):
Relevant Pages
|