Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Errori nella creazione messaggio SOAP

0 views
Skip to first unread message

Rustichello da Pisa

unread,
Mar 18, 2008, 7:29:36 AM3/18/08
to
Salve a tutti ho una classe che dovrebbe creare un messaggio soap per
invocare un web service installato su jboss solo che ho un errore che
non riesco a capire.
L'errore mi viene lanciato quando richiamo il costruttore della mia
classe (chiamata SOAPRequestManager).
Il costruttore della classe è il seguente:

[code]
public SOAPRequestManager(){

try {


messageFactory = MessageFactory.newInstance();

//Su questa chiama a createMessage() di messageFactory ho l'errore
message = messageFactory.createMessage();

soapPart =message.getSOAPPart();
envelope = soapPart.getEnvelope();
body =envelope.getBody();
byteValue = new ByteArrayOutputStream();

} catch (/*SOAP*/Exception e) {
// TODO Auto-generated catch block
//e.printStackTrace();
System.out.println("----*****ERRORE:"+e.getMessage());
}

}
[/code]

Gli oggetti che vengono inizializzati sono i seguenti:
[code]
private MessageFactory messageFactory=null;
private SOAPMessage message=null;
private SOAPPart soapPart=null;
private SOAPEnvelope envelope=null;
private SOAPBody body=null;
private ByteArrayOutputStream byteValue = null;
[/code]

Gli import della classe SOAPRequestManager sono:
[code]
import java.io.ByteArrayOutputStream;
import java.io.IOException;

import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
[/code]

Il messaggio d'errore dell'eccezione lanciata è il seguente:
[code]
12:12:37,493 INFO [STDOUT] ----*****ERRORE:setProperty must be overr
idden by all subclasses of SOAPMessage
[/code]

Non capisco cosa voglia dire, dato che la classe che ho scritto io
(SOAPRequestManager) non implementa nessuna interfacca e non estende
nessuna classe SOAPMessage; nè, tantomeno, estendono quella classe le
classi che utilizzano SOAPRequestManager.

Se faccio un printStackTrace sull'eccezione ecco cosa ottengo:
[code]
12:24:20,141 ERROR [STDERR] java.lang.UnsupportedOperationException:
setProperty
must be overridden by all subclasses of SOAPMessage
12:24:20,142 ERROR [STDERR] at
javax.xml.soap.SOAPMessage.setProperty(SOAPMe
ssage.java:424)
12:24:20,144 ERROR [STDERR] at
org.jboss.ws.core.soap.SOAPMessageImpl.<init>
(SOAPMessageImpl.java:67)
12:24:20,145 ERROR [STDERR] at
org.jboss.ws.core.soap.MessageFactoryImpl.cre
ateMessage(MessageFactoryImpl.java:161)
12:24:20,147 ERROR [STDERR] at
org.polito.util.SOAPRequestManager.<init>(Unk
nown Source)
[/code]

Ho copiato solo la prima parte di quello che mi viene stampato (poi
vengono semplicemente citate le classi che utilizzano
SOAPRequestManager).

Purtroppo non ho la minima idea della causa di questo errore, qualcuno
può aiutarmi?
Come posso risolvere?
Grazie a tutti, ciao ciao.

0 new messages