Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Definizione Array in WSDL. Aiutooooo!!!!

    Ciao a tutti, volevo chiedervi gentilmente se qualcuno può aiutarmi nel risolvere un problemino che ormai da qualche giorno mi rende inquieto.

    Sto lavorando per la mia tesi con AXIS2. Nell'ambito della scrittura del file WSDL ho la necessità di definire un complexType Array che viene ritornato al client in seguito all'invocazione del servizio.

    La definizione del complexType è la seguente:

    <complexType name="ArrayOfString">
    <complexContent>
    <restriction base="soapenc:Array">
    <attribute ref="soapenc:arrayType"
    wsdl:arrayType="string[]"/>
    </restriction>
    </complexContent>
    </complexType>


    Altro frammento del WSDL in cui ArrayOfString viene richiamato è:

    <xs:element name="getDataResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="return" nillable="true"
    type="xs:ArrayOfString"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>

    Altre parti dello schema WSDL coinvolte sono:

    <wsdl:definitions
    xmlns:axis2="http://EmsService.test/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:ns="http://EmsService.test/xsd"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="http://EmsService.test/">

    ed ancora:

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    attributeFormDefault="qualified"
    elementFormDefault="qualified"
    targetNamespace="http://EmsService.test/xsd"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding">

    Il mio problema sta nel fatto che compilando mi viene fuori questo errore:

    java.lang.RuntimeException: Cannot unwrap element {http://EmsService.test/xsd}getDataResponse: no abstract mapping definition found for type {http://www.w3.org/2001/XMLSchema}ArrayOfString (used by element {http://EmsService.test/xsd}return)

    Il mio sospetto è che non essendo l'array un tipo di dato standard, potrebbe non esser definito in xs="http://www.w3.org/2001/XMLSchema". Per cui suppongo che si dovrebbe definire magari: xxx:"http://......." in cui viene definito l'array. Come fare questo usando axis in localhost?

    Qualcuno può aiutarmi?

    Vi ringrazio!!!Ciao

  2. #2
    Moderatore di Programmazione L'avatar di LeleFT
    Registrato dal
    Jun 2003
    Messaggi
    17,328

    Moderazione

    Una letta al regolamento prima di postare, please.

    Titoli e quant'altro da rivedere.

    Modifico io.

    Ciao.
    "Perchè spendere anche solo 5 dollari per un S.O., quando posso averne uno gratis e spendere quei 5 dollari per 5 bottiglie di birra?" [Jon "maddog" Hall]
    Fatti non foste a viver come bruti, ma per seguir virtute e canoscenza

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.