WSDL version issue
Hi, Is the any way in Axis2 to find out the version of WSDL file programmatically, I need to find ouf if a given WSDL file is version 1.1 or 2.0? Best Regards
returning custom wsdl.
Hi, I implemented that getWSDL method for WSDLSupplier interface and returned WSDL when ?wsdl is asked. It worked just fine. How can I do the same thing if some one asks for ?wsdl2 ? (i.e. return a custom wsdl 2.0) Best Regards, Shah
Re: minimum set of libraries in classpath.
Hi Amila, Thanks for you response. Shah On Sat, Jan 3, 2009 at 9:28 PM, Amila Suriarachchi amilasuriarach...@gmail.com wrote: please have a look at here[1]. thanks, Amila. [1]http://amilachinthaka.blogspot.com/2008/11/minimal-jars-to-run-apache-axis2.html On Sat, Jan 3, 2009 at 12:55 AM, Shah Asrani shahasr...@gmail.com wrote: Is there any link that talks about minimum set of libraries for Axis2 required on classpath. There are so many libaries and I am including all of them in the classpath to build an OperationClient. I would prefer to keep classpath entries to minimum. Shah -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
SOAP Header issue.
I am using operation client and building the soap request message with some headers. I add the header as follows: soapHeader = soapEnvelope.getHeader(); for( int i=0; iheaders.size(); i++){ Mydata hdrs = (MyData)headerList.get(i); OMElement hdr = (OMElement) AXIOMUtil.stringToOM(hdrs.toXmlString(myObject)); Iterator iter = hdr.getChildren(); SOAPHeaderBlock shb = soapFactory.createSOAPHeaderBlock(hdr.getLocalName(), hdr.getNamespace()); while(iter.hasNext()) { shb.addChild((OMNode) iter.next()); } soapHeader.addChild(shb); } if there is only one header, then everything works fine. however, if I add more that one headers (i.e. the for loop iterates more than once), then, the following exception occurs when invoking the service line of code : operationClient.execute(true); java.lang.NullPointerException at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getPrintableName(OMSourcedElementImpl.java:147) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:659) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240) Any Ideas? Shah
Dynamic creation of AxisModule
Is it possilbe to create module for a string, Say, I have the follwing in module.xml file module name=someModule InFlow handler name=SomeHandler class=test.SomeHandler order phase=Transport/ /handler /InFlow /module My requirement is that I will get access of this xml file as a string at runtime. Is there any way to build a module and egage it dynamically. I see that DeploymentEngine.buildModule expects File as parameter. Is there any way to build Module from the string? Shah
libraries for axis2
What are the minimum set of libraries required to be in classpath for axis2. I see there are quite a lot of jar files in lib folder. Is there need for all of these libraries at runtime or there is a sub-set that can be used? Shah
how to set style in axis2
In Axis1, I could do call.setOperationStyle(document); or call.setOperationStyle(literal); to set the style. How to set style in Axis2? Best Regards, Shah
Re: generateWSDL method in Axis2
Hi Keith, Thanks for your suggestions. On Thu, Dec 18, 2008 at 9:43 PM, keith chapman keithgchap...@gmail.com wrote: Hi, With Axis2 you do not have such a callback method. But here is a workaround that you could use. Extend the AxisServlet and override the doGet method. In there check whether its a request for a WSDL and invoke your code for generating the WSDL. Thanks, Keith. On Thu, Dec 18, 2008 at 10:52 PM, Shah Asrani shahasr...@gmail.com wrote: In Axis1, I had implemented a call back method generateWSDL in my provider that extended the BasicProvider. In moving to Axis2, I have MessageReceiver that extends RawXMLInOutMessageReceiver. Which callback method is equivalent to generateWSDL method in Axis1. I need to generate WSDL with my custom code. Shah Asrani. -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
listServices issue
I have deployed a web service dynamically in Axis2. The web service works fine. When client make a call, web service is found and a response is returned. However, if I use the url to list the services, it returns nothing: http://localhost:8080/mycontext/services/listServices Any Ideas? Shah Asrani
generateWSDL method in Axis2
In Axis1, I had implemented a call back method generateWSDL in my provider that extended the BasicProvider. In moving to Axis2, I have MessageReceiver that extends RawXMLInOutMessageReceiver. Which callback method is equivalent to generateWSDL method in Axis1. I need to generate WSDL with my custom code. Shah Asrani.
Re: listServices issue
Thanks Raghu, your answer explains the reasoning. On Thu, Dec 18, 2008 at 1:48 PM, Raghu Upadhyayula rupadhyay...@responsys.com wrote: Hi Shah, The listServices will only work if you have the axis2-web folder which comes with the Axis2 webapp in your war at the same level of WEB-INF, because the listServices functionality in AxisServlet is referring a jsp file (listServices.jsp) which is inside axis2-web folder. Thanks Raghu -Original Message- From: Shah Asrani [mailto:shahasr...@gmail.com] Sent: Thursday, December 18, 2008 11:19 AM To: axis-user@ws.apache.org Subject: Re: listServices issue yes, I must have missed something. I can even do ?wsdl on the service and get wsdl. really weird. I will try do some more debugging and may be I can find out what is wrong. On Thu, Dec 18, 2008 at 11:40 AM, Deepal jayasinghe deep...@gmail.com wrote: Shah Asrani wrote: I have deployed a web service dynamically in Axis2. The web service works fine. When client make a call, web service is found and a response is returned. However, if I use the url to list the services, it returns nothing: http://localhost:8080/mycontext/services/listServices it is weird :), if you can access the service then it should be list under the available services. May be you have missed something. Deepal Any Ideas? Shah Asrani -- Thank you! http://blogs.deepal.org http://deepal.org
Re: Deployment Issue
Hi Amila, Thanks for you response. The link you provided seems very useful. I will work throught it and hopefully, it will resolve my issue. Marc, I am writting the java code using ConfigurationContext, AxisService and few other classes to deploy the web servcies dynamically. There is no aar file or no services.xml file. Shah Asrani. On Sun, Nov 30, 2008 at 1:37 AM, Amila Suriarachchi [EMAIL PROTECTED] wrote: I think you need to write a custom deployer. please have a look at here[1] thanks, Amila. [1] http://wso2.org/library/3708 On Thu, Nov 27, 2008 at 8:59 PM, Shah Asrani [EMAIL PROTECTED] wrote: Hi, I have just started using Axis2. I have been going through series tutorials and articles and have managed to write a few simple examples and they work. However, I have tried to deploy a web service dynamically. My scenario is that in web deployment descriptor, I have a custom application registered as a listener. When this listener starts, inside the listner code, I dynamically build the web service and deploy it. However, the AxisServlet is listed after the listener in the descriptor. And when Axis 2 framework is deployed, it over-rides any ConfigurationContext I had created dynamically. Is there any way to tell Axis 2 that a ConfigurationContext is already available in the JVM and that should be used. Let me know if my question does not make sense, I am just learning Axis2. Best Regards, Shah Asrani -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic Deployment, is this right way?
I have a scenario where I need to deploy a service dynamically in a web-app. This web app starts as a listener and I need to build the web service while it is starting. This web-app starts before the Axis2 because AxisServlet starts after the listener. So, I build the service dynamically and store it in the ConfigurationContext. Then I use, serveltContext.setAttribute(AxisServlet.CONFIGURATION_CONTEXT, configurationContext). When Axis2 starts, it picks up the value of attribute AxisServlet.CONFIGURATION_CONTEXT and deploy the web service specified in the configurationContext reference I stored. Everything works fine. My question is: Is this way of storing AxisServlet.CONFIGURATION_CONTEXT attribute in servletContext correct for my scenario? Should I have any concern about using the attribute AxisServlet.CONFIGURATION_CONTEXT ? Thanks a lot! Shah Asrani - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deployment Issue
Hi, I have just started using Axis2. I have been going through series tutorials and articles and have managed to write a few simple examples and they work. However, I have tried to deploy a web service dynamically. My scenario is that in web deployment descriptor, I have a custom application registered as a listener. When this listener starts, inside the listner code, I dynamically build the web service and deploy it. However, the AxisServlet is listed after the listener in the descriptor. And when Axis 2 framework is deployed, it over-rides any ConfigurationContext I had created dynamically. Is there any way to tell Axis 2 that a ConfigurationContext is already available in the JVM and that should be used. Let me know if my question does not make sense, I am just learning Axis2. Best Regards, Shah Asrani
NPE in response
Hi, I have created a module to handle a soap request. When the client invokes the web service, the module class's invoke(MessageContext) gets invoked. In the module, I write up a response as an envelope and set it on MessageContext. I also set the property isResponseWritten to true. However, I get the following NPE. * java.lang.NullPointerException * at org.apache.axis2.engine.AxisEngine.receive(*AxisEngine.java:170*) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(* HTTPTransportUtils.java:275*) at org.apache.axis2.transport.http.AxisServlet.doPost(*AxisServlet.java:133* ) at javax.servlet.http.HttpServlet.service(*HttpServlet.java:709*) at javax.servlet.http.HttpServlet.service(*HttpServlet.java:802*) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(* ApplicationFilterChain.java:252*) Any ideas what could be wrong. Best Regards, Shah Asrani
Re: NPE in response
Hi Deepal, Thanks for your response. I have debugged my code and it goes through all the lines successfully, Here is the code of the invoke mehod of my module. May be I am missing to set something else too. --- try { OMElement omElement = AXIOMUtil.stringToOM(p:hello xmlns:p=\hellorui\hello/p:hello); SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope soapEnvelope = factory.createSOAPEnvelope(); SOAPBody soapBody =factory.createSOAPBody(); soapBody.addChild(omElement); soapEnvelope.addChild(soapBody); msgContext.setEnvelope(soapEnvelope); msgContext.setResponseWritten(true); } catch(AxisFault fault){ throw fault; } catch (Throwable exp) { exp.printStackTrace(); } return InvocationResponse.CONTINUE; Best Regards, Shah Asrani On Thu, Nov 27, 2008 at 11:04 AM, Deepal jayasinghe [EMAIL PROTECTED] wrote: Hi Shah , I think NPE is coming from your code , can you please double check your code. Deepal Hi, I have created a module to handle a soap request. When the client invokes the web service, the module class's invoke(MessageContext) gets invoked. In the module, I write up a response as an envelope and set it on MessageContext. I also set the property isResponseWritten to true. However, I get the following NPE. _ java.lang.NullPointerException _ at org.apache.axis2.engine.AxisEngine.receive( _AxisEngine.java:170_) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest( _HTTPTransportUtils.java:275_) at org.apache.axis2.transport.http.AxisServlet.doPost( _AxisServlet.java:133_) at javax.servlet.http.HttpServlet.service( _HttpServlet.java:709_) at javax.servlet.http.HttpServlet.service( _HttpServlet.java:802_) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( _ApplicationFilterChain.java:252_) Any ideas what could be wrong. Best Regards, Shah Asrani -- Thank you! http://blogs.deepal.org - 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]
how to return a respnose from module
Hi I have a web service running. The web service has method called getVersion and it returns an OMElement. The web service has a custom handler that gets invoked. I set the envelope in the MessageContext. but web service continues and returns the response from the getVersion method. How can return the respone from custom handler (i.e., I don't want web service to reach to getVersion method and I want to write the response in module. Best Regards, Shah Asrani - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]