DOMANDA Interrogazione webservice asmx con javascript

Skills07

Head of Development
Staff Forum
Utente Èlite
35,439
11,501
CPU
Ryzen 7 5800x
Dissipatore
Deepcool gammax l240 v2
Scheda Madre
Aourus Gigabyte X-470 ultra gaming
HDD
Samsung Evo 850 250gb ,2tb x 2 toshiba P300, 256 Ssd silicon power, Samsung evo plus 1tb nvme
RAM
32 gb G.Skill Tridentz 3200 mhz RGB
GPU
Zotac - RTX 3070 Ti Trinity OC
Monitor
ASUS TUF QHD 165hz IPS, ITEK GCF 165hz IPS QHD, Samsung Curvo 144hz QHD
PSU
Seasonic Focus 650w 80 platinum
Case
Coolermaster h500p
Periferiche
Asus Tuf Wireless
Net
Fibra Tim 100mb
OS
Windows 10 Pro 64 bit
amici del foro

sto lavorando con dei servizi webservice asmx.
Praticamente ho una chiamata che restituisce questa roba:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/">
<schema xmlns="http://www.w3.org/2001/XMLSchema">schema</schema>xml</DataSet>


sostanzialmente contiene questo xml:

Codice:
<DataSet><xs:schema id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Table"><xs:complexType><xs:sequence><xs:element name="RagioneSociale" type="xs:string" minOccurs="0"/><xs:element name="Indirizzo" type="xs:string" minOccurs="0"/><xs:element name="CAP" type="xs:string" minOccurs="0"/><xs:element name="Localita" type="xs:string" minOccurs="0"/><xs:element name="CodFisc_IVA" type="xs:string" minOccurs="0"/><xs:element name="CodiceFiscale" type="xs:string" minOccurs="0"/><xs:element name="CCIA" type="xs:string" minOccurs="0"/><xs:element name="Tribunale" type="xs:string" minOccurs="0"/><xs:element name="Telefono" type="xs:string" minOccurs="0"/><xs:element name="Fax" type="xs:string" minOccurs="0"/><xs:element name="PostaElettronica" type="xs:string" minOccurs="0"/><xs:element name="NUMRUI" type="xs:string" minOccurs="0"/><xs:element name="NumREA" type="xs:string" minOccurs="0"/><xs:element name="IndirizzoWeb" type="xs:string" minOccurs="0"/><xs:element name="PEC" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram><NewDataSet><Table diffgr:id="Table1" msdata:rowOrder="0"><RagioneSociale>PAVIA TICINO</RagioneSociale><Indirizzo>Corso ITALIA, 22/A</Indirizzo><CAP>27100</CAP><Localita>PAVIA</Localita><CodFisc_IVA>11418820152</CodFisc_IVA><CodiceFiscale>11418820152</CodiceFiscale><CCIA>MILANO 11111111</CCIA><Tribunale>MILANO 1111111</Tribunale><Telefono>02 1234567</Telefono><Fax>02 9876543</Fax><PostaElettronica>paviaticino@allianz.it</PostaElettronica><NUMRUI>A000333221</NUMRUI><PEC/></Table></NewDataSet></diffgr:diffgram></DataSet>


come faccio a leggerlo in javascript per prendere solo dati che servono a me'?
 

Ema96

Nuovo Utente
118
18
Non é necessario JavaScript per leggerlo.
Se non ho capito male, devi solo costryure un client per questo web services ? Basta una pagina asp net
 

Skills07

Head of Development
Staff Forum
Utente Èlite
35,439
11,501
CPU
Ryzen 7 5800x
Dissipatore
Deepcool gammax l240 v2
Scheda Madre
Aourus Gigabyte X-470 ultra gaming
HDD
Samsung Evo 850 250gb ,2tb x 2 toshiba P300, 256 Ssd silicon power, Samsung evo plus 1tb nvme
RAM
32 gb G.Skill Tridentz 3200 mhz RGB
GPU
Zotac - RTX 3070 Ti Trinity OC
Monitor
ASUS TUF QHD 165hz IPS, ITEK GCF 165hz IPS QHD, Samsung Curvo 144hz QHD
PSU
Seasonic Focus 650w 80 platinum
Case
Coolermaster h500p
Periferiche
Asus Tuf Wireless
Net
Fibra Tim 100mb
OS
Windows 10 Pro 64 bit
no, infatti non devo costruire nessuna pagina asp.net, ma sto facendo un applicazione nativa per cellulari che necessita di javascript, come vedi sopra io ho già interrogato il webservice, ma non riesco a prendere i dati dalla risposta che il webservice mi manda
 

Skills07

Head of Development
Staff Forum
Utente Èlite
35,439
11,501
CPU
Ryzen 7 5800x
Dissipatore
Deepcool gammax l240 v2
Scheda Madre
Aourus Gigabyte X-470 ultra gaming
HDD
Samsung Evo 850 250gb ,2tb x 2 toshiba P300, 256 Ssd silicon power, Samsung evo plus 1tb nvme
RAM
32 gb G.Skill Tridentz 3200 mhz RGB
GPU
Zotac - RTX 3070 Ti Trinity OC
Monitor
ASUS TUF QHD 165hz IPS, ITEK GCF 165hz IPS QHD, Samsung Curvo 144hz QHD
PSU
Seasonic Focus 650w 80 platinum
Case
Coolermaster h500p
Periferiche
Asus Tuf Wireless
Net
Fibra Tim 100mb
OS
Windows 10 Pro 64 bit
cross platform, sia android che ios ma stesso codice scritto con telerik progress platform, sono app web scritte nativamente in cordova.js etc etc
 

Albo89

Utente Èlite
5,904
2,465
CPU
Ryzen 5700G
Dissipatore
Deep Cool castle 360 rgb v2
Scheda Madre
Rog Strix B550-F GAMING (WI-FI)
HDD
980 1TB
RAM
Ballistix 3600mhz 8Gbx2
GPU
1080 Ti Aorus xtreme
PSU
Corsair RM750x
visto che usi javascript potresti restituire i dati in formato json, non xml. sarebbero più facili da leggere.. nelle chiamate ajax solitamente faccio così
 

Skills07

Head of Development
Staff Forum
Utente Èlite
35,439
11,501
CPU
Ryzen 7 5800x
Dissipatore
Deepcool gammax l240 v2
Scheda Madre
Aourus Gigabyte X-470 ultra gaming
HDD
Samsung Evo 850 250gb ,2tb x 2 toshiba P300, 256 Ssd silicon power, Samsung evo plus 1tb nvme
RAM
32 gb G.Skill Tridentz 3200 mhz RGB
GPU
Zotac - RTX 3070 Ti Trinity OC
Monitor
ASUS TUF QHD 165hz IPS, ITEK GCF 165hz IPS QHD, Samsung Curvo 144hz QHD
PSU
Seasonic Focus 650w 80 platinum
Case
Coolermaster h500p
Periferiche
Asus Tuf Wireless
Net
Fibra Tim 100mb
OS
Windows 10 Pro 64 bit
il problema è che il webservice non l'ho scritto io è scritto da terzi(anche per me sarebbe più facile leggere un json)
 

Albo89

Utente Èlite
5,904
2,465
CPU
Ryzen 5700G
Dissipatore
Deep Cool castle 360 rgb v2
Scheda Madre
Rog Strix B550-F GAMING (WI-FI)
HDD
980 1TB
RAM
Ballistix 3600mhz 8Gbx2
GPU
1080 Ti Aorus xtreme
PSU
Corsair RM750x

Entra

oppure Accedi utilizzando
Discord Ufficiale Entra ora!