Ciao a tutti ,
Devo inviare un long nel header di un messaggio SOAP, ma per fare questo in automatico utilizza un multiref
invece dovrei cercare di inviare il messaggio senza href una cosa di questo tipo come posso fare ???codice:<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" href="#id0"/> </soapenv:Header> <soapenv:Body> <ns1:statistiche soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://Stats"> <cli xsi:type="xsd:string">065404732</cli> </ns1:statistiche> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:long" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">-4002557832326655874</multiRef> </soapenv:Body> </soapenv:Envelope>
Per realizzzare questo utilizzo :codice:<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xsi:type="soapenc:long" > -4002557832326655874</sessionID > </soapenv:Header> <soapenv:Body> <ns1:statistiche soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://Stats"> <cli xsi:type="xsd:string">065404732</cli> </ns1:statistiche> </soapenv:Body> </soapenv:Envelope>
Tomcat 5.5
JDK 1.5
Java
Axis 2
Ecco la riga di codice che uso
codice:SOAPHeaderElement header = new SOAPHeaderElement("", "sessionID", Long.valueOf(IdSession));

Rispondi quotando