Salve,
Mi è stato richiesto da un dottore un'applicativo in VBA per utilizzare i webservice della sogei che permettono, mediante SOAP, XSD e WSDL di inoltrare le ricette all'INPS.
Ho creato la classe di connessione partendo dai WSDL e gli XSD forniti dalla SOGEI ma ho problemi ad invocare i servizi.
Per creare la classe di comunicazione ho usato SOAP Toolkit 3.0 che mi ha generato la classe descritta nel WSDL:
codice:
Private sc_InterrogazioneLavorat As SoapClient30
Private Const c_WSDL_URL As String = "file:///C:/Documents and Settings/fo/Desktop/soap/20100720-wsdl-inps/InterrogazioneLavoratore.wsdl"
Private Const c_SERVICE As String = "InterrogazioneLavoratore"
Private Const c_PORT As String = "InterrogazioneLavoratore"
Private Const c_SERVICE_NAMESPACE As String = "http://interrogazionelavoratore.wsdl.cert.mir.sanita.finanze.it/wsdl/"
Private Sub Class_Initialize()
Dim str_WSML As String
str_WSML = ""
Set sc_InterrogazioneLavorat = New SoapClient30
sc_InterrogazioneLavorat.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
'Utilizzare il server proxy definito nelle impostazioni di Internet Explorer
'relative alla LAN, impostando ProxyServer su <CURRENT_USER>.
sc_InterrogazioneLavorat.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"
'Attivare il rilevamento automatico delle impostazioni del server proxy, se attivato anche in Internet Explorer,
'impostando EnableAutoProxy su True.
sc_InterrogazioneLavorat.ConnectorProperty("EnableAutoProxy") = True
sc_InterrogazioneLavorat.ConnectorProperty("AuthUser") = "test"
sc_InterrogazioneLavorat.ConnectorProperty("AuthPassword") = "test"
End Sub
quando però provo ad instanziare il servizio ricevo l'errore:
Connection Failure: No Matching Authorizzation Scheme on Connector
purtroppo SOAP è un campo nuovo per me e quindi non sò come debbo implementare il servizio nel modo corretto.
Questo è il WSDL che descrive il servizio da implementare:
codice:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:requestns="http://interrogazionelavoratorerequest.xsd.cert.mirsac.sanita.finanze.it"
xmlns:responsens="http://interrogazionelavoratoreresponse.xsd.cert.mirsac.sanita.finanze.it"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://interrogazionelavoratore.wsdl.cert.mir.sanita.finanze.it/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://interrogazionelavoratore.wsdl.cert.mir.sanita.finanze.it/wsdl/">
<wsdl:documentation>
Interrogazione del lavoratore
Versione 0.4
</wsdl:documentation>
<wsdl:types>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://interrogazionelavoratorerequest.xsd.cert.mirsac.sanita.finanze.it"
schemaLocation="InterrogazioneLavoratoreRequest.xsd"/>
</xsd:schema>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://interrogazionelavoratoreresponse.xsd.cert.mirsac.sanita.finanze.it"
schemaLocation="InterrogazioneLavoratoreResponse.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="interrogazioneLavoratoreRequest">
<wsdl:part element="requestns:InterrogazioneLavoratore" name="interrogazioneLavoratoreRequest"/>
</wsdl:message>
<wsdl:message name="interrogazioneLavoratoreResponse">
<wsdl:part element="responsens:RicevutaLavoratore" name="interrogazioneLavoratoreResponse"/>
</wsdl:message>
<wsdl:portType name="interrogazioneLavoratorePT">
<wsdl:operation name="interrogazioneLavoratore">
<wsdl:input message="tns:interrogazioneLavoratoreRequest"/>
<wsdl:output message="tns:interrogazioneLavoratoreResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="interrogazioneLavoratoreBinding" type="tns:interrogazioneLavoratorePT">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="interrogazioneLavoratore">
<soap:operation soapAction="http://interrogazionelavoratore.wsdl.cert.mir.sanita.finanze.it/wsdl/InterrogazioneLavoratore"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InterrogazioneLavoratore">
<wsdl:port binding="tns:interrogazioneLavoratoreBinding" name="InterrogazioneLavoratore">
<soap:address location="https://mirservicetest.sanita.finanze.it/TrasmissioneCertificatiWeb/services/InterrogazioneLavoratore"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Dov'è che sbaglio? Purtroppo non sò come continuare e i tecnici SOGEI sono latitanti...