Sto utilizzando JAX-WS per i servizi Web.Java: Mapping JAX-WS
Ogni volta che utilizzo un parametro come parametro, lo ottengo come unsignedShort in xsd (Focus su weatherLetter).
Ecco la dichiarazione:
@WebMethod
public boolean setWXtatus(
@WebParam(name = "weatherLetter") char weatherLetter,
@WebParam(name = "weatherDigit") int weatherDigit,
@WebParam(name = "cloudCover") int cloudCover,
@WebParam(name = "cloudBaseInHundredsOfFeet") int cloudBaseInHundredsOfFeet,
@WebParam(name = "pressureInHg") int pressureInHg,
@WebParam(name = "visibilityInKm") int visibilityInKm,
@WebParam(name = "windSpeed") int windSpeed,
@WebParam(name = "windDirection") int windDirection,
@WebParam(name = "lastUpdateHour") int lastUpdateHour,
@WebParam(name = "lastUpdateMin") int lastUpdateMin
)
Ecco il mapping dei tipi che ricevo:
<xs:complexType name="setWXStatus">
<xs:sequence>
<xs:element name="weatherLetter" type="xs:unsignedShort" minOccurs="0"/>
<xs:element name="weatherDigit" type="xs:int"/>
<xs:element name="cloudCover" type="xs:int"/>
<xs:element name="cloudBaseInHundredsOfFeet" type="xs:int"/>
<xs:element name="pressureInHg" type="xs:int"/>
<xs:element name="visibilityInKm" type="xs:int"/>
<xs:element name="windSpeed" type="xs:int"/>
<xs:element name="windDirection" type="xs:int"/>
<xs:element name="lastUpdateHour" type="xs:int"/>
<xs:element name="lastUpdateMin" type="xs:int"/>
</xs:sequence>
</xs:complexType>
Come posso ottenere weatherLetter per generare come Char o 1 Lettera String o qualcosa del genere?
Avere giocattolo provato a cambiare da char a String nella dichiarazione? – 8vius
Anche se è possibile inserire un codice lato server per vedere che cosa sta inviando sarebbe buono. – 8vius
Non spingere, ma se trovi una risposta che è accettata, sentiti libero di contrassegnarla come una sola :) –