dcsimg
SOAP Error
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mahesh_jangir
Posted On:   Wednesday, January 4, 2006 02:35 AM

hi, I am trying a JAXM application but the client program is show the following error. Can u provide a solution for that. I have included saaj-impl.jar, commons- logging.jar, soap.jar, activation.jar, jaxm-api.jar, mail.jar, jaxm-api.jar, dom.jar,saaj-api.jar, mail.jar, log4j.jar, xerces.jar in classpath import javax.xml.soap.*; import java.net.URL; import java.io.*; public class Client { public static void main ( String[] args ) { Client object = new Client() ; object.toMessage(args) ; } public void toMessage(String[] args) {    More>>

hi,

I am trying a JAXM application but the client program
is show the following error. Can u provide a solution
for that. I have included saaj-impl.jar, commons-
logging.jar, soap.jar, activation.jar, jaxm-api.jar,
mail.jar, jaxm-api.jar, dom.jar,saaj-api.jar, mail.jar,
log4j.jar, xerces.jar in classpath


import javax.xml.soap.*;


import java.net.URL;


import java.io.*;


public class Client


{


public static void main ( String[] args ) {


Client object = new Client() ;


object.toMessage(args) ; }


public void toMessage(String[] args)


{


try


{


URL endpoint = null;


if (args.length > 0) endpoint = new URL(args[0]);


else endpoint = new URL(" http://localhost:8080/soap/WEB-INF/classes/org/apache/soap/server/http");


SOAPConnectionFactory scf = scf = SOAPConnectionFactory.newInstance();


SOAPConnection conn = scf.createConnection();


System.out.println ("hello 1");


MessageFactory mf = MessageFactory.newInstance();


System.out.println("hello 2");


SOAPMessage msg = mf.createMessage();


System.out.println("hello 3");


SOAPPart part = msg.getSOAPPart();


System.out.println("hello 4");


SOAPEnvelope env = part.getEnvelope();


System.out.println("hello 5");


SOAPBody body = env.getBody();


System.out.println("hello 6");


// TODO : Request message.


SOAPBodyElement elm = body.addBodyElement(env.createName( "RequestBody", "m", "urn:MsgServerSample" ));
elm.addChildElement( env.createName("Request")). addTextNode("request Test OK?.");


System.out.println("hello 7");


msg.saveChanges(); System.out.println("hello 8");


SOAPMessage reply = conn.call(msg, endpoint);


System.out.println ("hello 9");


// TODO : Response message.


if( reply==null ){ System.out.println("No response.");


}


else


{


System.out.println("test is done") ;


reply.writeTo(System.out);


}


conn.close();


}


catch (Throwable t)


{


System.out.println("No 23response.");


t.printStackTrace();


}


}


}


output: with errors


hello 1


hello 2


hello 3


No 23response.


java.lang.VerifyError: (class: com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl, method: cloneNode signature: (Z)Lorg/w3c/dom/Node;) Incompatible argument to function


at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.(SOAPPartImpl.java:49)


at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.(SOAPPart1_1Impl.java:24)


at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart (Message1_1Impl.java:50)


at Client.toMessage(Client.java:27) at Client.main(Client.java:9)


thanks and regards


mahesh

   <<Less
About | Sitemap | Contact