79101738

Date: 2024-10-18 10:54:18
Score: 1
Natty:
Report link

Ciao, ho un problema analogo al tuo e sono giorni che sto impazzendo ma con scarsi risultati. Ho trovato ora la tua soluzione ma continua a non funzionarmi.

Ho provato sia la prima soluzione aggiungendo

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "richiestaPrecheckMessaggioSIIType", namespace = "http://www.acquirenteunico.it/schemas/2010/SII_AU/MessaggioSII")
public class RichiestaPrecheckMessaggioSIIType
    extends MessaggioSIIType
{
    @XmlAttribute(name = "type", namespace = XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)
    private String xsiType = "richiestaPrecheckMessaggioSIIType";
}

Che la seconda soluzione aggiungendo lo @SchemaValidation ma anche qui senza risultati.

@WebService(targetNamespace = "http://www.sii.acquirenteunico.it/PK1", name = "PK1")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(style = SOAPBinding.Style.RPC)
@SchemaValidation(type = SchemaValidationType.OUT)
public interface PK1 {

    @WebMethod(operationName = "PK1.0050", action = "PK1.0050")
    @WebResult(name = "MessaggioSII", targetNamespace = "http://www.sii.acquirenteunico.it/PK1", partName = "MessaggioSII")
    public AmmissibilitaVerificaMessaggioSIIType pk10050(

        @WebParam(partName = "MessaggioSII", name = "MessaggioSII")
        RichiestaPrecheckMessaggioSIIType messaggioSII
    );

    @WebMethod(operationName = "PK1.0051", action = "PK1.0051")
    @WebResult(name = "MessaggioSII", targetNamespace = "http://www.sii.acquirenteunico.it/PK1", partName = "MessaggioSII")
    public EsitoIntegrazioneRichiestaMessaggioSIIType pk10051(

        @WebParam(partName = "MessaggioSII", name = "MessaggioSII")
        IntegrazioneRichiestaPrecheckMessaggioSIIType messaggioSII
    );
}

Cosa sto sbagliando? l'errore che continuo a ricevere MessaggioSII without attributes (xsi:type is requred)

Spero tu possa essermi di aiuto, grazie in anticipo Manuel.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @SchemaValidation
  • Low reputation (1):
Posted by: Manuel Papiani