Salve. vorrei trasformare l'interrogazione SOAP lanciata da access 2003 in interrogazione php. Ho letto parecchia documentazione ma non rieco a venirne a capo. Se qualcuno può aiutarmi inserendo le istruzioni base di SOAP in php, tenendo conto di ciò che io faccio in access, mi farebbe gradita. Grazie
codice:
Option Compare Database
Public POggetto As String
Private Const stringaIntPuntuale = "<?xml version=""1.0"" standalone=""yes"" ?><!DOCTYPE IP [<!ELEMENT IP (Data)><!ELEMENT Data (Identificazione,Protocollo)><!ELEMENT Identificazione (Utente,Password,Ufficio)><!ELEMENT Utente (#PCDATA)><!ELEMENT Password (#PCDATA)><!ELEMENT Ufficio (#PCDATA)><!ELEMENT Protocollo (#PCDATA)>]>"
Private Const stringaIntPuntuale = "<?xml version=""1.0"" standalone=""yes"" ?><!DOCTYPE IP [<!ELEMENT IP (Data)><!ELEMENT Data (Identificazione,Protocollo)><!ELEMENT Identificazione (Utente,Password,Ufficio)><!ELEMENT Utente (#PCDATA)><!ELEMENT Password (#PCDATA)><!ELEMENT Ufficio (#PCDATA)><!ELEMENT Protocollo (#PCDATA)>]>"
Private Function InterrogaGenerico(stringaIn As String) As Boolean
Set env = CreateObject("pocketSOAP.Envelope.11")
Dim http
Dim xmlresult As New MSXML2.DOMDocument
Dim node, node2 As IXMLDOMNode
Dim Esito As Boolean
Esito = False
env.SetMethod "testWs", "PortaWS"
env.Parameters.Create "pp", stringaIn
Set http = CreateObject("pocketSOAP.HTTPTransport")
http.Send "http://xxxxxxxxxxxxxxxxxx/ClasseWeb", env
env.parse http
xmlresult.loadXML (env.Parameters.Item(0).Value) 'estrapolo solo la parte contenente il risultato
POggetto = ""
codesito = xmlresult.getElementsByTagName("Esito").Item(0).Text
If Not codesito = "0000" Then
Ges_errore (codesito)
Exit Function
End If
PTipo = xmlresult.getElementsByTagName("Tipo").Item(0).Text
If PTipo = "IP" Then
POggetto = xmlresult.getElementsByTagName("Oggetto").Item(0).Text
End If
Set xmlresult = Nothing
Set http = Nothing
Set env = Nothing
InterrogaGenerico = Esito
End Function
Property Get GetResult() As Object
Set GetResult = prvRisultato
End Property
Public Function InterrogaPuntuale(strCodiceAoo, strUtente, strPassword, strUfficio, strProtocollo As String) As Boolean
InterrogaPuntuale = InterrogaGenerico(stringaIntPuntuale & "<IP><Data><Identificazione><CodiceAoo>" & strCodiceAoo & "</CodiceAoo><Utente>" & strUtente & "</Utente><Password>" & strPassword & "</Password><Ufficio>" & strUfficio & "</Ufficio></Identificazione><Protocollo>" & strProtocollo & "</Protocollo></Data></IP>")
End Function
Public Function Ges_errore(codesito)
If codesito = "F001" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Utente non riconosciuto !")
End If
If codesito = "F002" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Aggregazione ufficio/servizio/categoria errata !")
End If
If codesito = "F003" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Utente non abilitato all'ufficio !")
End If
If codesito = "F004" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Mancano dati obbligatori !")
End If
If codesito = "F005" Then
MsgBox ("Richiesta a e-prot fallita !" & Chr$(13) & "Documento non presente in archivio !")
End If
If codesito = "F006" Then
MsgBox ("Richiesta a e-prot fallita !" & Chr$(13) & "Protocollo richiesto non è di un documento in uscita !")
End If
If codesito = "F007" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Formato dei campi errato !")
End If
If codesito = "S000" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "Sistema non disponibile !")
End If
If codesito = "S001" Then
MsgBox ("Protocollazione e-prot fallita !" & Chr$(13) & "UTG chiamata non attiva !")
End If
End Function
il tutto viene lanciato dal comando su maschera access :
Call InterrogaPuntuale("PR_xxxxx", "utente", "password", "Ufficio xxx", "numeroprotocollo")
MsgBox ("Oggetto " & POggetto)