This is a sample of a SOAPRequest I have to do:
<?xml version="1.0" ?>
<soapenv:Envelope xmlns:ser="http://xxx" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ser:UserTokenHeader>
<ser:IdUtente>005</ser:IdUtente>
</ser:UserTokenHeader>
<ser:ConsumerTokenHeader>
<!--Optional:-->
<ser:Token>F547FE5FEA81E6DB4E6CC3D4E693DC49B75740E8F01307F6C881D4371B33C1201C063EB165C0292C6E8DE9C17010EB009AB08CBECD6D9D0D1CDF493DFD015C8E</ser:Token>
</ser:ConsumerTokenHeader>
</soapenv:Header>
<soapenv:Body>
<ser:RicercaAssistiti>
<!--Optional:-->
<ser:req>
<!--Optional:-->
<ser:RicercaPerNominativo>
<!--Optional:-->
<ser:Nominativo>
<!--Optional:-->
<ser:Nome>John</ser:Nome>
<!--Optional:-->
<ser:Cognome>Doe</ser:Cognome>
</ser:Nominativo>
<ser:RicercaParziale>false</ser:RicercaParziale>
</ser:RicercaPerNominativo>
<!--Optional:-->
<ser:RicercaPerCodiceFiscale>
<!--Optional:-->
<ser:CodiceFiscale/>
</ser:RicercaPerCodiceFiscale>
<!--Optional:-->
<ser:RicercaPerCodiceSSN>
<!--Optional:-->
<ser:CodiceSSN/>
</ser:RicercaPerCodiceSSN>
</ser:req>
</ser:RicercaAssistiti>
</soapenv:Body>
</soapenv:Envelope>
This is a sample code used:
[code] Dim sm As SOAPMethod
Dim sr As SOAPResult
Dim Address as String = “http://…?wsdl”
sm = New SOAPMethod(Address)
sm.Parameter(“IdUtente”) = “101”
sm.Parameter(“Token”) = “93A898907B82D06666090AC5EC01A59392B49B5778C974AB1CFE5FC3B18753791D872CD6A840B5BF74594830B58F5440776F983F8F0FD57B7E2FBED3A49C9897”
sm.Parameter(“Nome”) = “John”
sm.Parameter(“Cognome”) = “Doe”
sr = sm.Invoke(“RicercaAssistiti”)[/code]
Running code, this is the error:
An exception of class SOAPException was not handled. The application must shut down.
Exception Message: Incorrect parameters
But calling method with other SOAP tool, everything works fine.
I also have some questions:
- How can I set a parameter with SOAPMethod.Parameter(“NodeName”) if my xml request structure is indented or/and I can have same NodeName in different tree?
- As in point 1., ho can I read with SOAPResult.Result (“NodeName”) if my xml response structure is indented or/and I can have same NodeName in different tree?