Re: Fwd: Axis2 ADB Binding - Compiling All Schema
Deepal, Thanks for looking into my problem. It will not be possible to share all the aar files and schema. Because of size as well as confidentiality issue :(. However its crucial for me to have a better deployment and change management strategy then we have currently. We are soon going in production and may encounter problems if we have any changes in schema in future. If it doesn't sound redundent and you can spare some time, here is again my problem - - There are 12 .aar files one for each Web-Service. - Some of the schemas used by these WSs are common(base.xsd, common.xsd) and then there are XSDs related to each Web Service(WSDL). For A.wsdl -> A.xsd etc..in some rare cases A.wsdl refers B.xsd also.A.xsd, B.xsd tc refer to base.xsd, common.xsd. - I am using ADB binding while doing WSDL2java. But I guess only referred schema from that WSDL gets compiled to classes. So for each WSDL, when I do wsdl2Java there is difference in generated classes. I want to compile all the schema in one go and put that in lib as a jar. So that whenever schema changes I can compile it and test all services. In current arrangement I will need to do WSDL2java again to generate classes for changed schema. - I also tried XSD2java but again it only generated the classes for schema which is being referred by the schema on which I am doing xsd2java. Is there any way I can compile all the schema using ADB binding, irrespective of whether it is being referred to or not? I can then do WSDL2java only to get skeleton and inline schema and keep already genrated classes from external schema as a jar to be referrd to by all skeletons. On Mon, Apr 28, 2008 at 10:57 AM, Deepal jayasinghe <[EMAIL PROTECTED]> wrote: > > Hi Deepal, > > Can you/your team kindly provide your valuable suggestion on following. > > > Is there any possibility of looking at your service aar file , then I can > give your better answer for that. > > > Also in one of your replies you mentioned that Axis2 book is soon to > > come. How fr is that soon :) > > > Will take maximum of two months :) > > Thank you! > Deepal > > > Thanks a lot > > > > > > -- Forwarded message -- > > From: *searl* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > Date: Fri, Apr 25, 2008 at 1:32 AM > > Subject: Re: Axis2 ADB Binding - Compiling All Schema > > To: axis-user@ws.apache.org <mailto:axis-user@ws.apache.org> > > > > > > Hi, > > > > This is something that I've wanted also. > > > > leon > > > > On Thu, 24 Apr 2008 17:35:00 +0530, lucky <[EMAIL PROTECTED] > [EMAIL PROTECTED]>> wrote: > > > HI, > > > I am encountering one issue regarding the deployment of my web > > services. > > I > > > a > > > have a number of WSDL files.Corresponding to each WSDL file I have an > > XSD > > > which has schemas directly used in that WSDL. > > > > > > So say for WSDl A.wsdl I have A.xsd.; B.wsdl , B.xsd and so on. these > > > xsd's > > > intern refer to Base.xsd and some other XSDs. > > > So base.xsd and other Xsds are common among all Web-Services. In some > > rare > > > cases A.wsdl may also refer to B.xsd. > > > > > > Problem - > > > For each WSDL2Java I get a set of classes from Schema which I bundle > > with > > > that Web-Service. > > > I am not able to get the classses for complete schema in one go. I > > tried > > > XSD2Java as well but there if I do it for A.xsd, I get classes for all > > > referred schema's but not B.xsd etc if they are not referred to from > > > A.xsd. > > > > > > How can I compile the whole schema in one go, irrespective of whether > > they > > > refer to each other or not and use that as a library for all my > > > Web-Services.I am using ADB binding. > > > > > > Is there something obvious in Axis2 that I am missing? If any one > > knows > > > the > > > solution kindly assist. > > > > > > Thanks for your time. > > -- > > Leon S. Searl, Software Research Engineer > > Information and Telecommunication Technology Center, University of > > Kansas > > Nichols Hall, 2335 Irving Hill Road, Lawrence, KS 66045-7612 > > Ph: 785-864-7820 Fax: 785-864-0387 > > http://www.ittc.ku.edu > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Fwd: Axis2 ADB Binding - Compiling All Schema
Hi Deepal, Can you/your team kindly provide your valuable suggestion on following. Also in one of your replies you mentioned that Axis2 book is soon to come. How fr is that soon :) Thanks a lot -- Forwarded message -- From: searl <[EMAIL PROTECTED]> Date: Fri, Apr 25, 2008 at 1:32 AM Subject: Re: Axis2 ADB Binding - Compiling All Schema To: axis-user@ws.apache.org Hi, This is something that I've wanted also. leon On Thu, 24 Apr 2008 17:35:00 +0530, lucky <[EMAIL PROTECTED]> wrote: > HI, > I am encountering one issue regarding the deployment of my web services. I > a > have a number of WSDL files.Corresponding to each WSDL file I have an XSD > which has schemas directly used in that WSDL. > > So say for WSDl A.wsdl I have A.xsd.; B.wsdl , B.xsd and so on. these > xsd's > intern refer to Base.xsd and some other XSDs. > So base.xsd and other Xsds are common among all Web-Services. In some rare > cases A.wsdl may also refer to B.xsd. > > Problem - > For each WSDL2Java I get a set of classes from Schema which I bundle with > that Web-Service. > I am not able to get the classses for complete schema in one go. I tried > XSD2Java as well but there if I do it for A.xsd, I get classes for all > referred schema's but not B.xsd etc if they are not referred to from > A.xsd. > > How can I compile the whole schema in one go, irrespective of whether they > refer to each other or not and use that as a library for all my > Web-Services.I am using ADB binding. > > Is there something obvious in Axis2 that I am missing? If any one knows > the > solution kindly assist. > > Thanks for your time. -- Leon S. Searl, Software Research Engineer Information and Telecommunication Technology Center, University of Kansas Nichols Hall, 2335 Irving Hill Road, Lawrence, KS 66045-7612 Ph: 785-864-7820 Fax: 785-864-0387 http://www.ittc.ku.edu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 ADB Binding - Compiling All Schema
HI, I am encountering one issue regarding the deployment of my web services. I a have a number of WSDL files.Corresponding to each WSDL file I have an XSD which has schemas directly used in that WSDL. So say for WSDl A.wsdl I have A.xsd.; B.wsdl , B.xsd and so on. these xsd's intern refer to Base.xsd and some other XSDs. So base.xsd and other Xsds are common among all Web-Services. In some rare cases A.wsdl may also refer to B.xsd. Problem - For each WSDL2Java I get a set of classes from Schema which I bundle with that Web-Service. I am not able to get the classses for complete schema in one go. I tried XSD2Java as well but there if I do it for A.xsd, I get classes for all referred schema's but not B.xsd etc if they are not referred to from A.xsd. How can I compile the whole schema in one go, irrespective of whether they refer to each other or not and use that as a library for all my Web-Services.I am using ADB binding. Is there something obvious in Axis2 that I am missing? If any one knows the solution kindly assist. Thanks for your time.
Axis1 1.3 Client side configuration for https end points
Hi, I configured my Tomcat 5.0 for https.I am able to deploy Axis2 1.3 and can access admin and other pages,service end points are also shown as https and I am able to invoke getVersion of verion service through browser. I am also able to run a sample service without https on same server. However when I access services using https from clients its fails giving validation error. Exception in thread "main" org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target I understand that I need to do some configuration on client side also. Can some one tell me what are those steps and if there is any clear article/tutorial on that. Any help is much appreciated. Thanks a lot
ADB Binding error - Probably BUG
Hi, We are developing a Axis2 Top-Down WebService and while invoking WS we are getting following exception at client side - Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at ws.schemas.EmployeeRs_TypeSequence_type1$Factory.parse(* EmployeeRs_TypeSequence_type1.java:388*) at ws.schemas.EmployeeRs_TypeSequence_type2$Factory.parse(* EmployeeRs_TypeSequence_type2.java:562*) at After debugging it is noticed that, it is going in an infinite loop in class EmployeeRs_TypeSequence_type2.java generated from schema - while (!loopDone2) { // Step to next element event. while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isEndElement()) { //two continuous end elements means we are exiting the xml structure loopDone2 = true; } else { list2.add( ws.schemas.EmployeeRs_TypeSequence_type1.Factory.parse( reader)); } } Corresponding Schema causing trouble – <*xsd:sequence* minOccurs="0"> <*xsd:sequence* minOccurs="0" maxOccurs="unbounded"> While going through the inner sequence, its never coming out of while loop mentioned above. We can't change our WSDL and Schema at this stage and have to make it work. Is it a defect in AXIS 2 ADB binding? Or we doing something wrong here? Any help is much appreciated.Thanking you all in anticipation. P.S. We are using following command to create the stub and other classes from Schema. – wsdl2java -uri D:.\Sequence.wsdl -o D:\Sequence -p wsdl.Sequence -s -ss -sd -d adb -g -ns2p urn:sequence:XSD:1=ws.schemas,urn:sequence:XSD:a= wsdl.Sequence -ssi http://schemas.xmlsoap.org/wsdl/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns="urn:sequence:XSD:a" xmlns:ns1="urn:sequence:XSD:1" targetNamespace="urn:sequence:XSD:a"> http://www.w3.org/2001/XMLSchema"; xmlns:y="urn:sequence:XSD:a"> http://schemas.xmlsoap.org/soap/http"/> http://tbd/EmployeeSvc/EmployeeUpdt"; style="document"/> http://tbd/EmployeeSvc/"/> SequenceSchema.xsd Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: User Token details
Hi Thanks for the prompt reply. I wanted to know the jar for these classes. However it was a silly mistake from my side. I have included all jars from Axis2 1.3 distribution but some how missed wss4j-1.5.3.jar. Thanks On Feb 18, 2008 4:36 PM, Sanjay Vivek <[EMAIL PROTECTED]> wrote: > I was working on this a few weeks back and the complete code listing is > given below. Cheers. > > Sanjay > > import org.apache.axis2.AxisFault; > import org.apache.axis2.context.MessageContext; > import org.apache.axis2.context.OperationContext; > import org.apache.axis2.wsdl.WSDLConstants; > import org.apache.ws.security.WSConstants; > import org.apache.ws.security.WSSecurityEngineResult; > import org.apache.ws.security.WSUsernameTokenPrincipal; > import org.apache.ws.security.handler.WSHandlerConstants; > import org.apache.ws.security.handler.WSHandlerResult; > > import java.util.Vector; > > public class PolicyEchoService { > >public String echo() { > >String user=null; >String password=null; > >MessageContext msgCtx = > MessageContext.getCurrentMessageContext(); >Vector results = null; >if ((results = (Vector) msgCtx >.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) > { >System.out.println("No security results!!"); >throw new RuntimeException("No security results!!"); >} else { >System.out.println("Number of results: " + results.size()); >for (int i = 0; i < results.size(); i++) { >WSHandlerResult rResult = (WSHandlerResult) > results.get(i); >Vector wsSecEngineResults = rResult.getResults(); > >for (int j = 0; j < wsSecEngineResults.size(); j++) { >WSSecurityEngineResult wser = > (WSSecurityEngineResult) wsSecEngineResults.get(j); >if (wser.getAction() == WSConstants.UT >&& wser.getPrincipal() != null) { > >//Extract the principal >WSUsernameTokenPrincipal principal = > (WSUsernameTokenPrincipal)wser.getPrincipal(); > >//Get user/pass >user = principal.getName(); >password = principal.getPassword(); > >} >} >} > >return ("The user was: " + user); >} > >} > > } > > > > > > >From: lucky [mailto:[EMAIL PROTECTED] >Sent: 18 February 2008 11:00 >To: axis-user@ws.apache.org >Subject: User Token details > > >Hi, >I am trying to create a handler and read user name/password > there to authenticate the Web-Service client. I have used Rampart as > explained in articles and able to pass username/password as plain text > and authenticate user. Now I want to capture same details in a handler > so that it can be invoked for all Web-Services. I am referring to > article - http://wso2.org/library/169 and trying to get this as below - > >Vector results = null; >if ((results = (Vector) msgCtx >.getProperty(WSHandlerConstants.RECV_RESULTS)) > == null) { >throw new RuntimeException("No security results!!"); >} else { >for (int i = 0; i < results.size(); i++) { > >//Get hold of the WSHandlerResult instance >WSHandlerResult rResult = (WSHandlerResult) > results.get(i); >Vector wsSecEngineResults = > rResult.getResults(); > >for (int j = 0; j < wsSecEngineResults.size(); > j++) { > >//Get hold of the WSSecurityEngineResult > instance >WSSecurityEngineResult wser = > (WSSecurityEngineResult) >wsSecEngineResults.get(j); > >} >} >} >How ever I am not able to locate > (WSHandlerConstants.RECV_RESULTS). Can any one please help quickly and > tell m whch jar to include for this. I am using Axis2 1.3. > >Many Thanks for your time and help > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
User Token details
Hi, I am trying to create a handler and read user name/password there to authenticate the Web-Service client. I have used Rampart as explained in articles and able to pass username/password as plain text and authenticate user. Now I want to capture same details in a handler so that it can be invoked for all Web-Services. I am referring to article - http://wso2.org/library/169 and trying to get this as below - Vector results = null; if ((results = (Vector) msgCtx .getProperty(WSHandlerConstants.RECV_RESULTS)) == null) { throw new RuntimeException("No security results!!"); } else { for (int i = 0; i < results.size(); i++) { //Get hold of the WSHandlerResult instance WSHandlerResult rResult = (WSHandlerResult) results.get(i); Vector wsSecEngineResults = rResult.getResults(); for (int j = 0; j < wsSecEngineResults.size(); j++) { //Get hold of the WSSecurityEngineResult instance WSSecurityEngineResult wser = (WSSecurityEngineResult) wsSecEngineResults.get(j); } } } How ever I am not able to locate (WSHandlerConstants.RECV_RESULTS). Can any one please help quickly and tell m whch jar to include for this. I am using Axis2 1.3. Many Thanks for your time and help
Re: Reading Header
Thanks for the reply,The article you sent are helping but on first look it appear that Rampart will enforce the authentication also and will read from predefined fields( UserName/Password). I have lot of questions now and want to resolve them myself. Is there any book on Axis2, where I can read all about Axis2 SYSTEMATICALLY ? Thanks a lot On 2/8/08, Nandana Mihindukulasooriya <[EMAIL PROTECTED]> wrote: > Hi, > You can use Username Authentication with Rampart. Please take a look > at > > http://wso2.org/library/240 > http://wso2.org/library/234 > http://wso2.org/library/169 > > thanks, > nandana > > Nandana Mihindukulasooriya > WSO2 inc. > > http://nandana83.blogspot.com/ > http://nandanasm.wordpress.com/ > > - > 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]
Reading Header
Hi, Can some one please point me to Axis2 resource or tell me how I should be doing following - I want to get a UserId/Password in all Web Service requests.I need to extract that and authenticate the user by invoking a 3rd party authentication API. I am a lil scared of doing a handler stuff to extract these fields from header and invoke authentication but this is the only thing coming to my mind with the limited knowledge of Axis2 I am having. Has any one walked the path and guide me? I am sure it must there somewhere in Axis2 tutorials and I am trying to get it mean while iit would be great if experienced and subject experts can provide their valuable suggestion. Thanks a ton
Re: JRun and Axis2
Hi, If you just deploy the axis.war in JRun4 then you will get Axis2 error page with only header image and "Internal Server Error" in body . In the logs you will get messages related to JSP Engine. But my understanding is that this is the way JRun cries when there is some thing wrong. JRun is not able to deploy axis2.war properly.I tried many times and most of the times it doesn't create descriptors (axis2.web.xml,axis2.web.jrun.xml) It by default loads system libraries first then application specific and JRun4 already comes with Axis1. When I try to fix the issue and override this order by putting - false I am able to see the first page of axis 2 but not beyond that. All the time blank page is displayed and in logs messages are like - Server AxisWS ready (startup time: 21 seconds) 01/30 18:35:28 user FileServlet: init 01/30 18:35:28 user JSPServlet: init 01/30 18:35:28 error java.lang.NoClassDefFoundError at jrun.jsp.JSPEngine.initBuiltInTagLibrary(JSPEngine.java:183) at jrun.jsp.JSPEngine.(JSPEngine.java:135) at jrun.jsp.JSPServlet.init(JSPServlet.java:62) at jrun.servlet.WebApplicationService.loadServlet (WebApplicationService. java:1200) at jrun.servlet.JRunRequestDispatcher.init( JRunRequestDispatcher.java:81 2) at jrun.servlet.JRunRequestDispatcher.( JRunRequestDispatcher.java: 83) at jrun.servlet.WebApplicationService.getRequestDispatcher (WebApplicatio nService.java:1075) --- On accessing Root (localhost:8003 )you get this on page -- 500 java.lang.NoClassDefFoundError at jrun.jsp.JSPEngine.initBuiltInTagLibrary(JSPEngine.java:183) at jrun.jsp.JSPEngine.(JSPEngine.java:135) at jrun.jsp.JSPServlet.init(JSPServlet.java:62) at jrun.servlet.WebApplicationService.loadServlet( WebApplicationService.java:1200) at jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java :812) at jrun.servlet.JRunRequestDispatcher.(JRunRequestDispatcher.java:83) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) And what ever other page you try to access - 01/31 09:07:53 user JSPServlet: init [WARN] Error dispatching request /axis2/services/listServices java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.axis2.transport.http.AbstractAgent.handle( AbstractAgent.ja va:78) at org.apache.axis2.transport.http.ListingAgent.handle( ListingAgent.java :108) at org.apache.axis2.transport.http.AxisServlet.doGet( AxisServlet.java:23 7) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java :42) at jrun.servlet.JRunRequestDispatcher.invoke( JRunRequestDispatcher.java: 259) at jrun.servlet.ServletEngineService.dispatch( ServletEngineService.java: 541) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) Thanks On Jan 30, 2008 11:19 PM, Ajith Ranabahu <[EMAIL PROTECTED]> wrote: > is there any specific error ? > something in the logs may be ? > > On Jan 30, 2008 3:46 AM, lucky gupta <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > I am trying to use Axis2 1.3 version with JRun 4 Updater6 for JDK1.5 . > > However the axis2 ,seems, not getting properly deployed. I understand > that > > almost every one using above combination is having trouble. Has any one > used > > Axis2 1.3 successfully with JRun4? If so can you please advise how you > fixed > > it? > > > > Many Thanks > > > > > > > > > > -- > Ajith Ranabahu > > Reading, after a certain age, diverts the mind too much from its > creative pursuits. Any man who reads too much and uses his own brain > too little falls into lazy habits of thinking - Albert Einstein > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
JRun and Axis2
Hi, I am trying to use Axis2 1.3 version with JRun 4 Updater6 for JDK1.5 . However the axis2 ,seems, not getting properly deployed. I understand that almost every one using above combination is having trouble. Has any one used Axis2 1.3 successfully with JRun4? If so can you please advise how you fixed it? Many Thanks
JRun and Axis2
Hi, I am trying to use Axis2 1.3 version with JRun 4 Updater6 for JDK1.5 . However the axis2 ,seems, not getting properly deployed. I understand that almost every one using above combination is having trouble. Has any one used Axis2 1.3 successfully with JRun4? If so can you please advise how you fixed it? Many Thanks