[AXIS2C] [WSDL2C] NullPointerException in CStructWriter
Platform: SUSE linux Axis version: Nightly build (7th may) I'm trying to run WSDL2C on an Amazon WSDL ( http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl ). I've written a shell script called wsdl2c.sh, which consists of this: sh `dirname $0`/axis2.sh org.apache.axis2.wsdl.WSDL2C $* When I run the following: wsdl2c.sh -uri /home/sunildm/sandbox/wsdlstuff/AWSECommerceService.wsdl -d adb -u I get the following NullPointerException. Any idea what could be wrong? Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:256) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:28) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:209) ... 2 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:47) ... 3 more Caused by: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerException at org.apache.axis2.schema.writer.CStructWriter.write(CStructWriter.java:237) at org.apache.axis2.schema.SchemaCompiler.writeSimpleType(SchemaCompiler.java:955) at org.apache.axis2.schema.SchemaCompiler.processSimpleSchemaType(SchemaCompiler.java:2254) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:861) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:454) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1790) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1711) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:967) at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:855) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:454) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1790) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1711) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:967) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:876) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:857) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:465) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:597) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:454) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1790) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1711) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:967) at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:876) at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:857) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:465) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:597) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:454) at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1790) at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1711) at
RE: Too many sockets being created. Bad architecture?
I would second that... asynchronous is definitely the way to go. And I don't think it's a just a matter of the number of sockets at the OS level, it's also a matter of the number of threads your web/app server can run. A heavy-duty app server like weblogic has 15 execute threads by default. Here you're talking about a 100 new requests coming in per second, and each taking 25 seconds to complete. So even if you had 10 weblogic servers in a load-balanced cluster, you would still run out of available threads after just a few seconds ... Regards, Sunil D'Monte Tavant Technologies http://www.tavant.com -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 17:18 To: axis-user@ws.apache.org Subject: Re: Too many sockets being created. Bad architecture? My question is : What is the standard way to architect web services which have a very long blocking synchronous operations ? Don't. Design an asynchronous exchange instead. Anne On 8/2/06, kk kk [EMAIL PROTECTED] wrote: Hi, I am developing a WS which provides an operation that takes around 25 seconds to complete. I can not speed this up nor I can not use a polling pattern or a callback to inform the client of the result of the request. I want to make the WS server capable to handle 100 new requests per second, so 100 x 25 = 2500 sockets connections will exist at any point in time with my current design !! I am sure this is bad but am not sure what is the best way to go to get a scalable solution with a single server process. I am using Axis 1.2 and Tomcat on the server which is a Sun Solaris box. My test client is a Axis/Java application though I need to be able to support other clients too. As expected, I can see huge numbers of open sockets and FDs using unix commands like netstat and lsof. I have been experimenting with TCP/IP kernel setting on the server and using ideas from http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic= /com.ibm.websphere.express.doc/info/exp/ae/tprf_tunesolaris.html I have used ndd -set /dev/tcp tcp_conn_req_max_q 8000 to increase number of sockets that the server can handle and this does seem to allow a 1500+ parallel sockets to exist. My question is : What is the standard way to architect web services which have a very long blocking synchronous operations ? Assuming I have a small number of clients each making many WS calls is there a way to somehow multiplex many SOAP requests for eackh client down one socket? Is there a way to get Axis/Tomcat server to use UDP/IP rather than TCP/IP? I am new to this and all ideas much appreciated. Cheers, KP ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deployment issues on OpenVMS
Did it create an entry in your server-config.wsdd file? I think that's all the admin client does; you could just as well copy and paste the XML into server-config.wsdd yourself. It's worth trying this at least to see if your service works. Regards, Sunil D'Monte Tavant Technologies http://www.tavant.com -Original Message- From: Willem Grooters [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 12:37 To: 'axis-user@ws.apache.org' Subject: Deployment issues on OpenVMS Hi, I'm running Apache 1.3-1, Tomcat 4.1.24 and Axis 1.1 under Java 1.4.2-P2 on OpenVMS 7.3-1. These all have been installed as dowloaded from the HP website, without extensive configuration, so rather out-of-the-box. All the examples can be run nicely. Collegues running in a .NET environment obtain the right answers when they access these services using the same URL's as I do from my browser. These collegues have an application that communicates with a TRU64 machine for getting data, and they want to use the same client application to retrieve similar data from the VMS box. However, I cannot use the TRU64 java code because the data is completely different (storage, lyaout, codes). They sent me the WSDL file from the Unix application, from which I could create the java sources that would form the webservices, using WSDL2Java. The generation process also creates a deploy.wsdd and undeploy.wsdd. I have added code where required and could compile all without errror. However, when using these the services do not show up at all: $ java org.apache.axis.client.AdminClient /amazone_src/deploy.wsdd (the quotes are required since VMS is non case-senistive if non-quoted). It tells me it processes the file, no problems at all, but the service appears to be non-existing. I had problems on this before: $ set def amazone_ws:[00] ! which is the root where the code started (the web application path starts here) $ java org.apache.axis.client.AdminClient ./path/deploy.wsdd says it cannot find the file to process, but $ set def [.amazone.ws] ! which is the same location amazone-ws:[00] refers to! $ java org.apache.axis.client.AdminClient ./path/deploy.wsdd succeeded - but with an error as above. However, this is considered a minor issue. Above is the same on a 7.3-2 system, so the OS version is not the problem. Stopping and starting AXIS makes no difference, nor did stopping and restarting Tomcat. Even worse: all of a sudden, even this failed: $ java org.apache.axis.client.AdminClient /amazone_src/deploy.wsdd Processing file /amazone_src/deploy.wsdd Exception:: org.apache.axis.deployment.wsdd.WSDDException: javax.xml.rpc.JAXRPCException: Null serializer factory specified. javax.xml.rpc.JAXRPCException: Null serializer factory specified. at org.apache.axis.encoding.TypeMappingImpl.register(TypeMappingI mpl.java) at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping( WSDDServic e.java) at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java) at org.apache.axis.deployment.wsdd.WSDDService.init(WSDDService.java) at org.apache.axis.deployment.wsdd.WSDDDeployment.init(WSDDDepl oyment.java) at org.apache.axis.deployment.wsdd.WSDDDocument.init(WSDDDocument.java) at org.apache.axis.utils.Admin.processWSDD(Admin.java) at org.apache.axis.utils.Admin.process(Admin.java) at org.apache.axis.utils.Admin.AdminService(Admin.java) ... I'm not sure if stopping and starting of Tomcat has influenced this (is shouldn't). Later, I stopped Axis, stopped Tomcat and started it again, and found THIS problem was gone However, deployment of the service still is not possible. One thing I noticed, just for completeness: WSDL2Java creates a file _GetConfigurationRequest_GetConfigurationResult.java - containing the code of the same class. The filename is over 39 characters, so it will be truncated to 39 - causing trouble in building the service. I changed the name of the class and file to _getConfRequest_GetConfResult - and did the same where referenced in both other (generated) java code to get it compiled. I did change the reference to this class in deploy.wsdd but that did not solve the problem - nor did it contribute to the last issue, since restoring the original file did still trigger the WSDDExecption shown. So I doubt that would be a cause of trouble. All help is welcome - I'm rather new on this technique. WIllem Disclaimer: The information contained in this E-mail and its attachments is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance of the contents of this E-mail and any attachments
RE: Deployment issues on OpenVMS
server-config.wsdd should be in the WEB-INF directory of your web application... Also when you say non-existent, what exactly do you mean - does it show up in the list of services you get at /servlet/AxisServlet? Also do check the logs in debug mode. Regards, Sunil D'Monte Tavant Technologies http://www.tavant.com -Original Message- From: Willem Grooters [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 14:35 To: 'axis-user@ws.apache.org' Subject: RE: Deployment issues on OpenVMS It wasn't, so I did add it myself (assuming the right spot is in tomcat's [.webapps.axis] directory. I also added the jar files that contain the server's classes, but it seems non-existant still. Even after tomcat was restarted. in [.webapps.axis.classes] I found that the samples are not stored as .jar files but expanded. Would I need to expand the jar files, or specify them in stead of the full path: Currently, it is sepcified as: service name=OrganisatieWebServiceSoap provider=java:RPC style=wrapped use=literal parameter name=wsdlTargetNamespace value=http://politie.nl/webservices/xpol/organisatie/ parameter name=wsdlServiceElement value=OrganisatieWebService/ parameter name=wsdlServicePort value=OrganisatieWebServiceSoap/ parameter name=className value=nl.politie.webservices.xpol.organisatie.OrganisatieWebS erviceSoapSkel eton/ parameter name=wsdlPortType value=OrganisatieWebServiceSoap/ parameter name=allowedMethods value=*/ The .jar files is named: OrganisatieWebService.jar, containing the path nl/politie/webservices/xpol/organisatie. There are a number of jars that hold calsses used in the application. The current system does NOT carry the domain politie.nl - just the nodename. Does that matter? Willem -Oorspronkelijk bericht- Van: Sunil D'Monte [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 18 oktober 2005 10:07 Aan: 'axis-user@ws.apache.org' Onderwerp: RE: Deployment issues on OpenVMS Did it create an entry in your server-config.wsdd file? I think that's all the admin client does; you could just as well copy and paste the XML into server-config.wsdd yourself. It's worth trying this at least to see if your service works. Regards, Sunil D'Monte Tavant Technologies http://www.tavant.com -Original Message- From: Willem Grooters [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 18, 2005 12:37 To: 'axis-user@ws.apache.org' Subject: Deployment issues on OpenVMS Hi, I'm running Apache 1.3-1, Tomcat 4.1.24 and Axis 1.1 under Java 1.4.2-P2 on OpenVMS 7.3-1. These all have been installed as dowloaded from the HP website, without extensive configuration, so rather out-of-the-box. All the examples can be run nicely. Collegues running in a .NET environment obtain the right answers when they access these services using the same URL's as I do from my browser. These collegues have an application that communicates with a TRU64 machine for getting data, and they want to use the same client application to retrieve similar data from the VMS box. However, I cannot use the TRU64 java code because the data is completely different (storage, lyaout, codes). They sent me the WSDL file from the Unix application, from which I could create the java sources that would form the webservices, using WSDL2Java. The generation process also creates a deploy.wsdd and undeploy.wsdd. I have added code where required and could compile all without errror. However, when using these the services do not show up at all: $ java org.apache.axis.client.AdminClient /amazone_src/deploy.wsdd (the quotes are required since VMS is non case-senistive if non-quoted). It tells me it processes the file, no problems at all, but the service appears to be non-existing. I had problems on this before: $ set def amazone_ws:[00] ! which is the root where the code started (the web application path starts here) $ java org.apache.axis.client.AdminClient ./path/deploy.wsdd says it cannot find the file to process, but $ set def [.amazone.ws] ! which is the same location amazone-ws:[00] refers to! $ java org.apache.axis.client.AdminClient ./path/deploy.wsdd succeeded - but with an error as above. However, this is considered a minor issue. Above is the same on a 7.3-2 system, so the OS version is not the problem. Stopping and starting AXIS makes no difference, nor did stopping and restarting Tomcat. Even worse: all of a sudden, even this failed: $ java org.apache.axis.client.AdminClient /amazone_src/deploy.wsdd Processing file /amazone_src/deploy.wsdd Exception:: org.apache.axis.deployment.wsdd.WSDDException: javax.xml.rpc.JAXRPCException: Null serializer factory specified. javax.xml.rpc.JAXRPCException: Null serializer factory specified
RE: soapenc:string rather then xsd:string ?
I seriously advise the WSDL-first approach - if you have that option. The only time I'd use Java2WSDL is if I have an *existing* Java API that I want to expose as a web service. When I first started playing around with Axis, I broke my head over the Java-first approach for weeks... then I switched to WSDL-first and it worked like a dream. The WSDL is the contract for your web service - the fact that it's Java + Axis that implements it behind the scenes is purely incidental. Just FYI I have several webservices with Axis 1.2 and VB .NET as both clients and servers, and interop has worked like a dream so far. The editor I use for WSDL is Cape Clear's free SOA editor - http://www.capescience.com/soa/index.shtml. PS one more advantage of WSDL-first is that you learn *much* more... -Original Message- From: Dr Janusz Martyniak [mailto:[EMAIL PROTECTED] Sent: Friday, October 07, 2005 18:20 To: axis-user@ws.apache.org Subject: RE: soapenc:string rather then xsd:string ? On Fri, 7 Oct 2005, Grossberger, Guenter wrote: Hi! Although Sunil is right about starting from a WSDL you can still use Java2WSDL but you have to select document style and literal use or even better wrapped style instead of rpc/encoding. Best regards, Thanks Guenter, I discovered these ( -y and -u) options and I'm fighting with an axis client at the moment. cheers JM -- ** * * Janusz Martyniak TEL +44 (0)207 594 7810 * * HEP Group, Physics Dept. FAX: +44 (0)207 823 8830 * * Blackett Lab, Imperial College, Prince Consort Rd, LONDON SW7 2BW * ** *