You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by matteo belloni <be...@cefriel.it> on 2001/03/07 10:14:13 UTC
Error in executing my example
Sorry someone can help me to solve my problem:
I have created a Document named doc and I want put it in the Envelope Body.
I do so:
URL url=null;
try{
url=new URL("http://localhost:8080/soap/servlet/rpcrouter/");
}catch(Exception e){System.out.println("Errore"+e);};
Body body=new Body();
Vector vect=new Vector();
Envelope env=new Envelope();//=Envelope.unmarshall(doc.getDocumentElement());("xmlns:s",Constants.NS_URI_SOAP_ENC); vect.addElement(doc);
body.setBodyEntries(vect);
System.out.println("Eccolo: "+body.getBodyEntries());
env.setBody(body);
SOAPTransport st=new SOAPHTTPConnection();
Message msg=new Message();
msg.setSOAPTransport(st);
System.out.println(env);
try{
msg.send(url,"",env);
}catch(SOAPException e){System.out.println("Qui"+e);}
and the error is :
[Attributes={ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"}] [Header=null] [Body=[Attributes={}] [BodyEntries=
[(0)=5]
]] [EnvelopeEntries=]
Qui[SOAPException: faultCode=SOAP-ENV:Client; msg=Unknown type of body entry: 'class java.lang.String'; targetException=java.lang.IllegalArgumentException: Unknown type of body entry: 'class java.lang.String']
How I wrong?
thanks in advance
Theo