|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Aug 2004
Città: Palermo
Messaggi: 1079
|
[JAVA] Creazione messaggio SOAP
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: Codice:
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());
}
}
Codice:
private MessageFactory messageFactory=null; private SOAPMessage message=null; private SOAPPart soapPart=null; private SOAPEnvelope envelope=null; private SOAPBody body=null; private ByteArrayOutputStream byteValue = null; Codice:
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; Codice:
12:12:37,493 INFO [STDOUT] ----*****ERRORE:setProperty must be overr idden by all subclasses of SOAPMessage Se faccio un printStackTrace sull'eccezione ecco cosa ottengo: Codice:
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) Purtroppo non ho la minima idea della causa di questo errore, qualcuno può aiutarmi? Come posso risolvere? Grazie a tutti, ciao ciao. |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:39.



















