Re: Redirect SOAP Message using Handler?
Thank you very much Deepal, but coud you please, tell me how to do? --- Riadh - Original Message - From: "Deepal Jayasinghe" <[EMAIL PROTECTED]> To: Sent: Thursday, June 22, 2006 1:28 PM Subject: Re: Redirect SOAP Message using Handler? With Axis2 you can That is what actually happening in Synapse Riadh BEN HALIMA wrote: Hello, Can I redirect SOAP Message form Server1 to Server2 using Handler? Could you please, help me to answer this question? Thanks in advance. --- Riadh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect SOAP Message using Handler?
Hello, Can I redirect SOAP Message form Server1 to Server2 using Handler? Could you please, help me to answer this question? Thanks in advance. --- Riadh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] UserExceptions and WSDL
Hi, I have modified your code in order to lunch your exception, see below. --- Riadh - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, June 21, 2006 5:49 PM Subject: [axis2] UserExceptions and WSDL Sorry for bringing this up again, but nobody answered. Any hints ? Hi, I have a service implementation, that is NOT generated by WSDL2Java. It is just simple Java-classes. There I have some methods, that can throw my own UserExceptions. To put some helpful response back to the client, I manually create my SOAPFaults and put them on the incoming MessageContext, then throwing an AxisFault. Chinthaka was so kind to describe that on: http://www.wso2.net/kb/171 So shortly, how it looks like: -- Service imlementation -- public OMElement myMethod(OMElement input) throws MyUserException { try { // do what the service should do throw new MyUserException("message", originalException); } catch ( (Exception e) { // build the SOAPFault with all the details // put it on the MC // throw new AxisFault("some errortext"); } } - MYUserExcption --- public class MyUserException extends AxisFault { //or extends Exception or RemoteException public MyUserException(String message, Throwable ex){ super(message, ex); } } I suggest, if I generate a WSDL-File from this code, there would not appear MyUserException in a faultmessage. I have to admit, I haven't tried it so far. My questions: - Is this the right way to use UserExceptions? - How can I achieve the Userexceptions been represented in the WSDL-file? Maybe someone could provide an example?! Thanks in advance for your time Bille __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Relation between SOAP Header and Body?
Thank you very much ---Riadh - Original Message - From: Anne Thomas Manes To: axis-user@ws.apache.org Sent: Wednesday, June 21, 2006 3:59 PM Subject: Re: Relation between SOAP Header and Body? They're both in a SOAP envelope...The SOAP Body should be used to convey the application payload.The SOAP Header should be used to convey information used by the middleware to manage and coordinate the service interaction. The specific relationship between Header and Body elements will be dependent on the purpose of the Header bloock. For example, if you're using a header to convey a digital signature, it must reference the Body elements that have been signed. Anne On 6/21/06, Riadh BEN HALIMA <[EMAIL PROTECTED]> wrote: Hello,Are there any relationship between a soap body and a sopa header elements? Thanks in advance---Riadh
Relation between SOAP Header and Body?
Hello,Are there any relationship between a soap body and a sopa header elements? Thanks in advance---Riadh
Re: [SPAM] - SOAP Message redirect?
Hi,Could you please, tell me how to do? could you maybe provide a very minimum example?ThanksRiadh - Original Message - From: Dhakshinamoorthy, Hariharasudhan To: axis-user@ws.apache.org Sent: Wednesday, June 21, 2006 12:37 PM Subject: RE: [SPAM] - SOAP Message redirect? - Bayesian Filter detected spam Yes! you can simply do it . ;-) -Original Message-From: Riadh BEN HALIMA [mailto:[EMAIL PROTECTED]Sent: Wednesday, June 21, 2006 3:39 PMTo: axis-user@ws.apache.orgSubject: [SPAM] - SOAP Message redirect? - Bayesian Filter detected spam Hi all, I simply would like to know if we can redirect SOAP Message from one server to another! Thank in advance. ---Riadh Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have recieved this electronic message in error, please notify the sender immediately and destroy the original message and all copies. Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies.
Re: [Axis14] Newbie: How to get XML data which is sent over network?
ok, You put ClientHandler.java in the client folder, and add those lines to your client code: java.util.List list = helloService.getHandlerRegistry().getHandlerChain(new QName(nameSpaceUri, portName)); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,null,null)); ClientHandler.java import javax.xml.rpc.handler.soap.*; import javax.xml.soap.*; public class ClientHandler implements javax.xml.rpc.handler.Handler { public ClientHandler() { } public boolean handleRequest(javax.xml.rpc.handler.MessageContext context) { System.out.println("ClientHandler: In handleRequest"); if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); System.out.println("SOAP in: "); System.out.println(se.toString()); } catch (SOAPException ex) {ex.printStackTrace();} } return true; } public boolean handleResponse(javax.xml.rpc.handler.MessageContext context) { System.out.println("ClientHandler: In handleResponse"); if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); System.out.println("SOAP in: "); System.out.println(se.toString()); } catch (SOAPException ex) {ex.printStackTrace();} } //***/ return true; } public boolean handleFault(javax.xml.rpc.handler.MessageContext context) { System.out.println("ClientHandler: In handleFault"); return true; } public void init(javax.xml.rpc.handler.HandlerInfo config) { } public void destroy() { } public javax.xml.namespace.QName[] getHeaders() { return null; } } Wi can also make a Handler in the server side. Good luck Riadh - Original Message - From: Axel Bock To: axis-user@ws.apache.org Sent: Wednesday, June 21, 2006 12:37 PM Subject: Re: [Axis14] Newbie: How to get XML data which is sent over network? Hi Riadh, that is a good hint, thank you, but without wanting you to do my work - could you maybe provide a very minimum example? :-) that would be great!Greetings & thanks, Axel. On 6/21/06, Riadh BEN HALIMA <[EMAIL PROTECTED]> wrote: Hi, TrYou can use Axis Handlers! --- Riadh - Original Message - From: Axel Bock To: axis-user@ws.apache.org Sent: Wednesday, June 21, 2006 11:21 AM Subject: [Axis14] Newbie: How to get XML data which is sent over network? Hi all, I am using Axis 1.4 with generated stubs to call some web services. Now I would really like to get to the XML data which is sent by Axis over the network, but using a sniffer is (1) cumbersome and (2) very hard, for the web service uses a HTTPS connection. So I hope that maybe one of the gurus in here could hack in some lines of example code about how I could achieve this :) . That would be really great ... Thanks in advance & greetings, Axel.
SOAP Message redirect?
Hi all, I simply would like to know if we can redirect SOAP Message from one server to another! Thank in advance. ---Riadh
Re: [Axis14] Newbie: How to get XML data which is sent over network?
Hi, TrYou can use Axis Handlers! ---Riadh - Original Message - From: Axel Bock To: axis-user@ws.apache.org Sent: Wednesday, June 21, 2006 11:21 AM Subject: [Axis14] Newbie: How to get XML data which is sent over network? Hi all, I am using Axis 1.4 with generated stubs to call some web services. Now I would really like to get to the XML data which is sent by Axis over the network, but using a sniffer is (1) cumbersome and (2) very hard, for the web service uses a HTTPS connection. So I hope that maybe one of the gurus in here could hack in some lines of example code about how I could achieve this :) . That would be really great ... Thanks in advance & greetings, Axel.
Re: SOAP Message update!
Thank you Robert, I have doing this, but.. I have hodified the SOAP Message through a ClientHandler in the handleResponse method, but I can't see the modification in the client side!!! Riadh - Original Message - From: "robert lazarski" <[EMAIL PROTECTED]> To: Sent: Tuesday, June 20, 2006 6:27 PM Subject: Re: SOAP Message update! Do you mean to say you can't a client side handler registered in axis 1.x ? Try searching the list as this has been explained a few times ... buts basically it works like this: ServiceFactory sf = ServiceFactory.newInstance(); Service svc = sf.createService(svcQName); //add ClientHandler to chain of events java.util.List list = svc.getHandlerRegistry().getHandlerChain(portQN); list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null)); HTH, Robert http://www.braziloutsource.com/ On 6/20/06, Riadh BEN HALIMA <[EMAIL PROTECTED]> wrote: Hi, I' m using Axis Handler. I make change to SOAP messge in handleResponse ("public boolean handleResponse(javax.xml.rpc.handler.MessageCo ntext context)"), But I can't found this modification in the client side, can you please help me! --- Riadh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOAP Message update!
Hi,I' m using Axis Handler. I make change to SOAP messge in handleResponse ("public boolean handleResponse(javax.xml.rpc.handler.MessageCo ntext context)"),But I can't found this modification in the client side, can you please help me! ---Riadh
Re: [Axis2]ServiceClient and http basic auth
On 6/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:HiI am not sure how I can set http basic auth header user/pword using ServiceClient. It seems thats the api I should be using for axis2 insteadof Jax-rpc Call as ServiceClient has apis to engage the axis 2 moduleswhich I need. I know that the recommended approach is to use the UsernameToken profile - but just for backward compatibility I would alsolike to support http basic auth settings. Any pointers is appreciated.thanksAnamitra- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
SOAP update problem!!
Hi,I' m using Axis Handler. I make change to SOAP messge in handleResponse ("public boolean handleResponse(javax.xml.rpc.handler.MessageContext context)"),But I can't found this modification in the client side, can you please help me! Riad
SOAP update problem!!
Hi,I' m using Axis Handler. I make change to SOAP messge in handleResponse ("public boolean handleResponse(javax.xml.rpc.handler.MessageContext context)"),But I can't found this modification in the client side, can you please help me! Riad
Save change to SOAP message in Handler
Hi,I' m using Axis Handler. I make change to SOAP messge in handleResponse ("public boolean handleResponse(javax.xml.rpc.handler.MessageContext context)"),But I can't found this modification in the client side, can you please help me! Riad
SOAP update problem!!
Hello,I'm using Axis Handlers to intercep SOAP message,I have modified SOAP message in the "handleResponse" method, but I can't found this modification in the client side, despite that when I display the SOAP in the Handler, I see the modification! Can you help me?Sincerely yoursRiadh
ref to Multiref
Hi,How to resolve "ref" in order to reach data in multiref using Handler?Thanks in advance.
Re: Java2WSDL problem
Hi, javax.wsdl.extensions.ExtensibilityElement exists in wsdl4j-1.5.1.jar!!! You forget the wsdl4j-1.5.1 extension (.jar) in your class path: %AXIS_LIB%\axis.jar; %AXIS_LIB%\commons-discovery-0.2.jar; %AXIS_LIB%\commons-logging-1.0.4.jar; %AXIS_LIB%\jaxrpc.jar; %AXIS_LIB%\saaj.jar; %AXIS_LIB%\log4j-1.2.8.jar; %AXIS_LIB%\xml-apis.jar; %AXIS_LIB%\xercesImpl.jar; %AXIS_LIB%\wsdl4j-1.5.1; You forget ''.jar'' in this line %AXIS_LIB%\axis-ant.jar ; %AXIS_LIB%\axis-schema.jar; %AXIS_LIB%\log4j.properties; %AXIS_LIB%\xml-apis.jar; Riadh - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Saturday, April 15, 2006 12:14 PM Subject: Java2WSDL problem Hi there, I'm trying to create a WSDL file from Java source code, by executing the following comand from my console: java org.apache.axis.wsdl.Java2WSDL -o cruise.wsdl -l http://192.168.1.10:8080/axis/servlet/AxisServlet -n "urn:cruise" -S "CruiseService" CruiseService but I get the following Exception: Java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensibilityElement I have included the wsdl4j-1.5.1.jar file in my class path, following is my Environment setup: AXIS_HOME C:\axis AXIS_LIB %AXIS_HOME%\lib AXISCLASSPATH %AXIS_LIB%\axis.jar; %AXIS_LIB%\commons-discovery-0.2.jar; %AXIS_LIB%\commons-logging-1.0.4.jar; %AXIS_LIB%\jaxrpc.jar; %AXIS_LIB%\saaj.jar; %AXIS_LIB%\log4j-1.2.8.jar; %AXIS_LIB%\xml-apis.jar; %AXIS_LIB%\xercesImpl.jar; %AXIS_LIB%\wsdl4j-1.5.1; %AXIS_LIB%\axis-ant.jar ; %AXIS_LIB%\axis-schema.jar; %AXIS_LIB%\log4j.properties; %AXIS_LIB%\xml-apis.jar; AXISROOT C:\Tomcat5\webapps\axis\WEB-INF\lib\ Can you please advice me what I'm doing wrong, or what I need to do to fix this exception. I will appreciate a quick response, as I dnt rly have much time, this is part of my Final Year Project, and the due date is almost at my door-step :( Many thanx yasmin
Re: I want to add an information to soap-request message and to get it in soap-response message, how to do?
Thanks Robert for another time, But get/set Property work just in a single PC. So, when I setProperty("Data","value") in client handler (PC1), I can't get it in server handler (located in PC2). I want a solution witch allow me to enrich or extend soap message 4 times: request-client handler, request-server handler, response-server handler and response-client handler. I tried using session, but it doesnt work in client side Is there another way? Can You help me? Riadh - Original Message - From: robert lazarski To: axis-user@ws.apache.org Sent: Friday, April 14, 2006 5:31 PM Subject: Re: I want to add an information to soap-request message and to get it in soap-response message, how to do? messageContext.getProperty and messageContext.setProperty should do the trick. You can access the MessageContext via a static method or in the handler. HTH,Robert On 4/14/06, Riadh BEN HALIMA <[EMAIL PROTECTED]> wrote: Hi, I want to add an information to soap-request message and to get it in soap-response message, how to do? Can I do it using Session? And how? Please help me. Riadh
I want to add an information to soap-request message and to get it in soap-response message, how to do?
Hi, I want to add an information to soap-request message and to get it in soap-response message, how to do? Can I do it using Session? And how? Please help me. Riadh
Re: SOAP Managment/ intercept request and response
Thanks Robet. I'm already using 2 handlers, but I would like to set the "information" in the requesthandler, and to get it in the responsehandler. Can I do this with just one handler? So, I think that the server-response regenerates a new soap message and delete all information in the soap-request message. Is it right? Riadh. - Original Message - From: robert lazarski To: axis-user@ws.apache.org Sent: Friday, April 14, 2006 12:37 PM Subject: Re: SOAP Managment/ intercept request and response The way I do this is: Client side handler, handleRequest --> tweak request --> soapCtx.setMessage(soapMsg); --> send to web service --> service side handler, handleRequest --> evaluate tweaked request. So you have two handlers - one client side, other service side. Each tweak has to be put back into the SOAPContext. One tweak by a handler is read by another. So the first step is to verify with tcpmon or the soap monitor that your tweak is being put in properly. Then you have to decide where you want to use it. HTH, Robert http://www.braziloutsource.com/ On 4/14/06, Riadh BEN HALIMA < [EMAIL PROTECTED]> wrote: Hi, I'm using Handler to intercept SOAP message.I append "an information" to the soap message Request, but i can't find it in the response!!Can you help me? My Handler contains this: //public boolean handleRequest(javax.xml.rpc.handler.MessageContext context) { if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); // soap message enrichment Name name = se.createName("Test"); SOAPHeaderElement hdr = sh.addHeaderElement(name); hdr.addTextNode("DATA"); }catch (SOAPException ex) {ex.printStackTrace();}}return true;} public boolean handleResponse(javax.xml.rpc.handler.MessageContext context) {if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); java.util.Iterator it= sh.examineAllHeaderElements();String tab[]=new String[10]; try{int i=0; while (it.hasNext()) { SOAPHeaderElement e =(SOAPHeaderElement)it.next(); tab[i] =e.getValue(); System.out.println(tab[i]); i++; // I can't find (int the table) the request enrichment (Test & DATA) } } catch (SOAPException ex) {ex.printStackTrace();} }return true;} // Thanks in advance. Riadh
SOAP Managment/ intercept request and response
Hi, I'm using Handler to intercept SOAP message.I append "an information" to the soap message Request, but i can't find it in the response!!Can you help me? My Handler contains this: //public boolean handleRequest(javax.xml.rpc.handler.MessageContext context) { if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); // soap message enrichment Name name = se.createName("Test"); SOAPHeaderElement hdr = sh.addHeaderElement(name); hdr.addTextNode("DATA"); }catch (SOAPException ex) {ex.printStackTrace();}}return true;} public boolean handleResponse(javax.xml.rpc.handler.MessageContext context) {if (context instanceof SOAPMessageContext) { try { SOAPMessageContext soapMsgCtx = (SOAPMessageContext)context; SOAPMessage soapMsg = soapMsgCtx.getMessage(); SOAPPart sp = soapMsg.getSOAPPart(); SOAPEnvelope se = sp.getEnvelope(); SOAPBody sb = se.getBody(); SOAPHeader sh = se.getHeader(); java.util.Iterator it= sh.examineAllHeaderElements();String tab[]=new String[10]; try{int i=0; while (it.hasNext()) { SOAPHeaderElement e =(SOAPHeaderElement)it.next(); tab[i] =e.getValue(); System.out.println(tab[i]); i++; // I can't find (int the table) the request enrichment (Test & DATA) } } catch (SOAPException ex) {ex.printStackTrace();} }return true;} // Thanks in advance. Riadh