Simple svc client or http client crashing in linux...
Hi, If I run the simple server and echo client ( axis2/c) , if the server dies or hangs for a while (I think) , the client crashes with segmentation fault. To test this, I ran the sample client echo.c Something like this. for(i=0;i10;++i){ ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); printf(%d times\n, i); } The call ran about 1000 times and the client reported SIGSEGV. I face the same problem, using http_client for our program. The call fails at random (either 300 calls or 16000 calls or 5000 calls). My linux version is Suse 8.1 FYI
[Axis 1.6b] How to catch / handle Transport Exception ?
Hi All, We have integrated an app with Axis C++ 1.6b. Currently the app crashes with the following partial stack trace #0 0x400a0c01 in kill () from /lib/libc.so.6 (gdb) bt #0 0x400a0c01 in kill () from /lib/libc.so.6 #1 0x4002625b in raise () from /lib/libpthread.so.0 #2 0x400a2182 in abort () from /lib/libc.so.6 #3 0x40620157 in __cxxabiv1::__terminate(void (*)()) (handler=0x804b7d4) at /usr/local/src/gcc-3.2.3/libstdc++-v3/libsupc++/eh_terminate.cc:47 #4 0x406201a4 in std::terminate() () at /usr/local/src/gcc-3.2.3/libstdc++-v3/l #5 0x40620316 in __cxa_throw (obj=0x83618f8, tinfo=0x0, dest=0) at /usr/local/s #6 0x4069fbe7 in HTTPTransport::readHTTPHeader() (this=0xbf3ff2ec) at /home/dev/svijayar/checkout/stuff/axis-c-1.6b-Linux-trace-src/src/transp o #7 0x4069c078 in HTTPTransport::getBytes(char*, int*) (this=0x83444b0, pcBuffer at /home/dev/svijayar/checkout/stuff/axis-c-1.6b-Linux-trace-src/src/transp o #8 0x401bc85e in SoapBinInputStream::readBytes(unsigned char*, unsigned) () from /home/dev/svijayar/checkout/axisbin/bin/libaxis_xmlparser.so #9 0x404190be in xercesc_2_7::XMLReader::refreshRawBuffer() (this=0x406b0010) a #10 0x40415a89 in XMLReader (this=0x406b0010, pubId=0x0, sysId=0x0, streamToAdop source=Source_Internal, throwAtEnd=false, calculateSrcOfs=false, version=XML #11 0x403a008c in xercesc_2_7::ReaderMgr::createReader(xercesc_2_7::InputSource LReader::Types, xercesc_2_7::XMLReader::Sources, bool) (this=0x8349200, [EMAIL PROTECTED] source=Source_External, calcSrcOfs=false) at ReaderMgr.cpp:426 #12 0x403704c6 in xercesc_2_7::IGXMLScanner::scanReset(xercesc_2_7::InputSource at IGXMLScanner2.cpp:1246 #13 0x4041c651 in xercesc_2_7::XMLScanner::scanFirst(xercesc_2_7::InputSource co [EMAIL PROTECTED], [EMAIL PROTECTED]) at XMLScanner.cpp:589 #14 0x403ad38c in xercesc_2_7::SAX2XMLReaderImpl::parseFirst(xercesc_2_7::InputS [EMAIL PROTECTED], [EMAIL PROTECTED]) at SAX2XMLReaderImpl.cpp:488 #15 0x401bbfd1 in XMLParserXerces::next(bool) () from /home/dev/svijayar/checkou #16 0x081013d6 in axiscpp::SoapDeSerializer::getEnvelope() () #17 0x081020ff in axiscpp::SoapDeSerializer::getVersion() () #18 0x08115bd8 in axiscpp::ClientAxisEngine::invoke(axiscpp::MessageData*) () #19 0x08115874 in axiscpp::ClientAxisEngine::process(axiscpp::SOAPTransport*) () #20 0x080e9a71 in axiscpp::Call::invoke() () Apparently a HTTPTransportException seems to be thrown but I am unable to catch it by putting catch (AxisException e) . After some browsing , I came across these 2 relevant posts http://mail-archives.apache.org/mod_mbox/ws-axis-c-user/200503.mbox/%3CO [EMAIL PROTECTED] https://issues.apache.org/jira/browse/AXISCPP-524 Mark Whitlock says that he fixed HTTPTransportException to derive from AxisGenException. But in the latest Axis C++ 1.6b , HTTPTransportException still derives from AxisException. Are we missing something ? Why does the above exception occur and how to currently handle it ? Thanks in advance , Sriraam
AXIS1.6b:: HTTPTransportException
Hi, I am using 1.6b release of AXIS for C++. I am having problem related to HTTPTransportException. I saw Tim's response to Mark's fix and the solution you have suggested (RTLD_GLOBAL FLAG). I checked the PlatformSpecificUnix.hpp file and I don't see this flag in there. Am I using some wrong version of code or this fix is not yet put in? Regards v. PS:=20 Follow this thread http://marc2.theaimsgroup.com/?l=3Daxis-c-userm=3D111052596028268w=3D4 http://marc2.theaimsgroup.com/?t=3D11103457792r=3D1w=3D4 v.
Re: rahas
Hi, On 12/7/06, George Stanchev [EMAIL PROTECTED] wrote: Hi, Is there a reason rahas is a module at all? In previous builds rahas was a service (aar), which i thought makes more sense - after all, it has a service functionality in it, and if someone wants to extend it, why do they have to define a dummy service (as in the test cases) just to serve a RST. The main purpose of the rahas.mar is to enable STS functionality on a service to support WS-SecureConversation scenarios. In these scenario's the service is expected to issue and cancel SecurityContextTokens. Speaking of the test cases in integration, they only run under the simple HTTP server that comes with axis2. In order to run them under tomcat for example, several changes need to be applied-the TestClient.java needs to be modified to put proper addressing namespace in the RST mssage - it uses AddressingConstants.Submission.WSA_NAMESPACE when it should use AddressingConstants.Final.WSA_NAMESPACE. Unless there is a way to configure axis2 servlet which namespace to recognize. hmm ... I thought axis2 addressing module can handle any addressing version in incoming messages. In addition, opensaml1.1b has a dependency on log4j which is missing from both axis2 1.1 distro and rahas. Adding it to the repo lib dir solves the problem. will add the log4j dependency to rahas. Is there any plan to finish the trust2 model in wss4j sandbox? It would be nice to have some real api for wst ;-) I'm not sure about the trust2 stuff in wss4j ... but you are welcome to suggest any improvements/patches to rahas ... I'll be glad to try to implement/apply them. Thanks, Ruchith Thanks ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. -- www.ruchith.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WS debugging in Eclipse
Hi Rajith, Im using tcp monitor,but sometimes I need to step into code. Now I make it so,that i construct skeleton class direct and run my web service as local application. But sometimes I need to debbug it on Tomcat as it would run in bussiness with all settings. Regards Vladi _ From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 7:36 PM To: axis-user@ws.apache.org Subject: Re: WS debugging in Eclipse Vladi, Another more easy option would be for you to deploy your services on axis2 and then remote debug using eclipse. You can also use tcpmon http://ws.apache.org/commons/tcpmon/ to check the SOAP messages that are exchanged between the service and the client. Regards, Rajith On 12/6/06, VF [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all, Is it possible to debug web services in Eclipse? Vladi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generate WSDL for dynamic types
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Elli wrote: Thanks again. Is there any place to interfere with the service definition before that execution? Maybe in a service lifecycle listener? You can write your own CustomAxisObserver class which will get called when a service is deployed. (You need to put the following entry in the axis2.xml. listener class=full name of your CustomAxisObserver/) That way you can get access for the service configuration at deployment time. I think you need to generate and set schema and type mapping in the service configuration once you have access to it. If you set it properly then the generated WSDL should reflects the actual data types you use for the service. see also : org.apache.ws.java2wsdl.SchemaGenerator org.apache.axis2.deployment.util.Util org.apache.axis2.deployment.DeploymentEngine Hope this will help ..!! Sanka - -- Sanka Samaranayake WSO2 Inc. http://sankas.blogspot.com/ http://www.wso2.net/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFFd9AT/Hd0ETKdgNIRAhqZAJ94O99C3zXMFqyClx74mOfecmpTRQCaAkDX jNqQ69wzL79qQBWauq7dr2g= =nQR/ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WSDL2Java cannot create stubs
Thanks for the quick response. I already figured out the problem. The problem was because of SOAP Encoding style arrays. I found a way to work around this problem.. The same wsdl was working fine with axis2 1.0. Was there anything changed in axis2 1.1 ? Thanks, Binu. From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 12:36 AM To: axis-user@ws.apache.org Subject: Re: WSDL2Java cannot create stubs Post your wsdl and tell us which databinding you are using and maybe we can help. Robert On 12/6/06, Jacob, Binu [EMAIL PROTECTED] wrote: Hi All, With axis2 1.1, I can not create stubs for one of my wsdls. The same wsdl had no problems with axis2 1.0. I get the following error when I use the command line tool as well the eclipse plugin. 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(CodeGener ationEngine.java:224) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcepti on at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp leDBExtension.java:52) Any help would be appreciable, Thanks, Binu. - 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: [AXIS2]: How to enable 2D Array Encoding ?
Hi Sanjiva! What do you want to mean with use XML schema ?? Do you think that exist another way to binding 2D arrays ? Is there something to do on wsdl definition ? ...another issue: I Know the existence of SOAP-ENC namespace (xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; ) some examples reporting the following definition type using soapenc: complexType name=ArrayOfString complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=string[]/ /restriction /complexContent /complexType I'm never seen an example that using 2D array type (for example a definition like: wsdl:arrayType=string[][]) and I don't know it's possible... anyway, I'm never used this approach to defining my services, I simply create the java service class and after I use the codegenerator to create the wsdl. That's all Bye! What you're referring to is SOAP Encoding arrays (from SOAP 1.1). We do not support this yet in Axis2 and, at least from my perspective, its low priority because its a deprecated usage of SOAP (per WS-I Basic Profile and also SOAP 1.2). The better way is to use XML Schema to define the shape of the data you want to send. Is that not an option? We of course welcome a patch on adding support for SOAP Encoding style arrays! Sanjiva. -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada07dic06 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2]: deployment outside axis2 webapp
hello, we try to implement a webservice with axis2. the requirements from our client are quite demanding: a) the service is defined in about 10 wsdl files, each file contains one object with one or more methods b) the services have to be accessable like this: http://server:port/services/ServiceOne http://server:port/services/ServiceServiceTwo there may be another path element but it has to be the same for all services. c) we have to use the standard tomcat deployment (putting a standard war into tomcat/webapps). we are not supposed to deploy in axis2 webapp. d) we want to use the java code generated with WSDL2java the deployment is the part that seems to be difficult. we already managed to deploy *one* service as described here: http://www.wso2.net/kb/90 in short the steps are the following: 1) we generate java classes with WSDL2java 2) we add AxisServlet to web.xml web-app servlet servlet-nameAxisServlet/servlet-name display-nameApache-Axis Servlet/display-name servlet-class org.apache.axis2.transport.http.AxisServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameAxisServlet/servlet-name url-pattern/services/*/url-pattern /servlet-mapping /web-app 3) we use the services.xml generated by WSDL2java for one wsdl (one service in the service group) serviceGroup service name=ServiceOne !-- everything else here -- /service /serviceGroup 4) we deploy the java classes like any other class in our webapp and add services.xml like this: \---WEB-INF | web.xml | \---services \---ServiceOne \---META-INF services.xml it works! our problem now is that we are not able to deploy a *second* (and more) services. we tried to do it this way 5) \---WEB-INF | web.xml | \---services \---ServiceOne \---META-INF services.xml \---ServiceTwo \---META-INF services.xml with the second service described in the services.xml in the corresponding subfolder. does not work. we also tried to put both services into one services.xml in the same group and have a structure like 4) doesn't work either. does anyone have an idea or even some experience with embeding axis2 webservices into a webapp? thank you very much for your help! regards martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to connect to Axis
Hello, I have trouble connecting to the axis server with my client program. The request to the axis server passes through apache httpd which works fine if the client program is on the same machine as the httpd server. But when I try to connect from a remote machine to the httpd server and then to the axis server the call fails. This matter is not firewall related I opened all ports and the call to the httpd server works. I can see the call in the access.log. So something must go wrong between the call from mod_jk to the axis server. Exceptions I get in the client are the usual java.net.SocketTimeoutExceptions. Has somebody an idea what to do? Please see client code below. Cheers, Pete In the stub of my Web Service client I have these proxy settings: Options options = new Options(); options.setProperty (Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE); options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS, Constants.VALUE_TRUE); options.setProperty(HTTPConstants.CHUNKED, Boolean.TRUE); long soTimeout = 2 * 60 * 1000; options.setTimeOutInMilliSeconds(soTimeout); HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties(); proxyProperties.setProxyName(my.proxy.de); proxyProperties.setDomain(anonymous); proxyProperties.setUserName(anonymous); proxyProperties.setPassWord(anonymous); proxyProperties.setProxyPort(80); options.setProperty(HTTPConstants.PROXY, proxyProperties); options.setTo(new EndpointReference(http://192.168.200.194:8080/axis2/services/binarytest;)); options.setProperty(HTTPConstants.PROXY, proxyProperties); _serviceClient.setOptions(options); Versions: httpd 2.0.40, jakarta-tomcat-5.5.9, axis 2. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serialize objects
Hi. Just a newbie question. I'm using Weblogic and Axis 1.4. I have a webservice which will take a Custom class object as an input and another Custom class object as output. I use Java2WSDL to generate the WSDL file, and then i use this WSDL file with WSDL2Java to generate stubs and wsdd files. Where do I set the mapping so that I can use the objects? (I get the following exception: java.io.IOException: No serializer found for class com.edb.om.dto.order.CustomerDetailDTO in registry [EMAIL PROTECTED]) -Espen _ Alt i én. Få Yahoo! Mail med adressekartotek, kalender og notisblokk. http://no.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serialize objects
When you use axis 1.4 You should insert typemapping in your wsdd file. For java bean classes you could use the the element beanmapping instead of the element typemapping. The difference is, that beanmapping uses fixed (De-)Serializers (i.e. org.apache.axis.encoding.ser.BeanSerializerFactory, org.apache.axis.encoding.ser.BeanDeserializerFactory) For example: service ... parameter name=classname value=.../ parameter name=allowedmethods value=getTitle getDetails/ beanMapping xmlns:ns=yournamespace qname=ns:Classname type=java:fullClasspath / hth, Philipp Espen Falkevik schrieb: Hi. Just a newbie question. I'm using Weblogic and Axis 1.4. I have a webservice which will take a Custom class object as an input and another Custom class object as output. I use Java2WSDL to generate the WSDL file, and then i use this WSDL file with WSDL2Java to generate stubs and wsdd files. Where do I set the mapping so that I can use the objects? (I get the following exception: java.io.IOException: No serializer found for class com.edb.om.dto.order.CustomerDetailDTO in registry [EMAIL PROTECTED]) -Espen _ Alt i én. Få Yahoo! Mail med adressekartotek, kalender og notisblokk. http://no.mail.yahoo.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]
parts of attachments are missing
Hi, When I try to upload a file with a webService using MTOM I always encounter the problem, that the file is incomplete. For example: A text file like catalina.policy (with 7kb) is transferred, and saved by the webservice to catalina2.policy - But due to unknown reasons the beginning of the file is missing (see attached) I even tried to cache the files with the following options, but the result is the same: _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR, c:/temp/); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, 0); if this is important: I am using base64Binary data type for the file and adb for databinding. Does anyone know, why this happens? I would appreciate every hint... cheers, Philipp // // catalina.corepolicy - Security Policy Permissions for Tomcat 5 // // This file contains a default set of security policies to be enforced (by the // JVM) when Catalina is executed with the -security option. In addition // to the permissions granted here, the following additional permissions are // granted to the codebase specific to each web application: // // * Read access to the document root directory // // $Id: catalina.policy,v 1.11 2004/03/02 12:36:22 remm Exp $ // // == SYSTEM CODE PERMISSIONS = // These permissions apply to javac grant codeBase file:${java.home}/lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase file:${java.home}/jre/lib/ext/- { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase file:${java.home}/../lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase file:${java.home}/lib/ext/- { permission java.security.AllPermission; }; // == CATALINA CODE PERMISSIONS === // These permissions apply to the launcher code grant codeBase file:${catalina.home}/bin/commons-launcher.jar { permission java.security.AllPermission; }; // These permissions apply to the daemon code grant codeBase file:${catalina.home}/bin/commons-daemon.jar { permission java.security.AllPermission; }; // These permissions apply to the commons-logging API grant codeBase file:${catalina.home}/bin/commons-logging-api.jar { permission java.security.AllPermission; }; // These permissions apply to the server startup code grant codeBase file:${catalina.home}/bin/bootstrap.jar { permission java.security.AllPermission; }; // These permissions apply to the JMX server grant codeBase file:${catalina.home}/bin/jmx.jar { permission java.security.AllPermission; }; // These permissions apply to the servlet API classes // and those that are shared across all class loaders // located in the common directory grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; // These permissions apply to the container's core code, plus any additional // libraries installed in the server directory grant codeBase file:${catalina.home}/server/- { permission java.security.AllPermission; }; // == WEB APPLICATION PERMISSIONS = // These permissions are granted by default to all web applications // In addition, a web application will be given a read FilePermission // and JndiPermission for all files and directories in its document root. grant { // Required for JNDI lookup of named JDBC DataSource's and // javamail named MimePart DataSource used to send mail permission java.util.PropertyPermission java.home, read; permission java.util.PropertyPermission java.naming.*, read; permission java.util.PropertyPermission javax.sql.*, read; // OS Specific properties to allow read access permission java.util.PropertyPermission os.name, read; permission java.util.PropertyPermission os.version, read; permission java.util.PropertyPermission os.arch, read; permission java.util.PropertyPermission file.separator, read; permission java.util.PropertyPermission path.separator, read; permission java.util.PropertyPermission line.separator, read; // JVM properties to allow read access permission java.util.PropertyPermission java.version, read; permission java.util.PropertyPermission
RE: WS debugging in Eclipse
To use eclipse to debug a tomcat servlet: 1. Be sure that tomcat is started with the below. One way to do that is to edit tomcat/bin/catalina.bat, where JAVA_OPTS is defined. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n 2. Set a breakpoint in the servlet code. Note that servlet timeouts may start to occur when you debug, so you want the breakpoint close to the code being debugged. 3. Start the eclipse debugger. Open Run | Debug... Select the section for remote java application. Select the project. Connection type is socket. Set host and address (8000 in the above case). 4. Run the test that invokes the server. The breakpoint should show up in the Eclipse debugger. Betsy From: VF [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 12:24 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Hi Rajith, Im using tcp monitor,but sometimes I need to step into code. Now I make it so,that i construct skeleton class direct and run my web service as local application. But sometimes I need to debbug it on Tomcat as it would run in bussiness with all settings. Regards Vladi From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 7:36 PM To: axis-user@ws.apache.org Subject: Re: WS debugging in Eclipse Vladi, Another more easy option would be for you to deploy your services on axis2 and then remote debug using eclipse. You can also use tcpmon http://ws.apache.org/commons/tcpmon/ to check the SOAP messages that are exchanged between the service and the client. Regards, Rajith On 12/6/06, VF [EMAIL PROTECTED] wrote: Hi all, Is it possible to debug web services in Eclipse? Vladi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 collection of complex objects
Hi, I'm bit new to web services and I need to develop service with Axis2 which handle complex objects as lists/collections. E.g.: class A { List bList; } class B { String str; Integer integer; Long _long; } where the bList is a list of the B class objects. Please could someone point me to an example ??? Thnaks a lot. Pat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.ClassCastException
Hi. I have a webservice with that takes a string in and returns a object. When I use my client I get the followin exception: When I use my client (which uses the stub files generated by WSDL2Java) I get the following exception: Exception in thread main java.lang.ClassCastException: ws.OrderAttributeTO at ws.PresentSoapBindingStub.findOrderDetails(PresentSoapBindingStub.java:165) at webservice.PresentationClient.main(PresentationClient.java:31) Any help would be appreciated I use the Java2WSDL to generate the wsdl file (attached below): ?xml version=1.0 encoding=UTF-8? !--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)-- wsdl:types http://schemas.xmlsoap.org/soap/encoding// complexType name=OrderAttributeTO sequence element name=name nillable=true type=soapenc:string/ element name=value nillable=true type=soapenc:string/ /sequence /complexType /schema /wsdl:types wsdl:message name=findOrderDetailsResponse wsdl:part name=findOrderDetailsReturn type=tns2:OrderAttributeTO/ /wsdl:message wsdl:message name=findOrderDetailsRequest wsdl:part name=in0 type=soapenc:string/ /wsdl:message wsdl:portType name=IOrderPresentation wsdl:operation name=findOrderDetails parameterOrder=in0 wsdl:input message=impl:findOrderDetailsRequest name=findOrderDetailsRequest/ wsdl:output message=impl:findOrderDetailsResponse name=findOrderDetailsResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=presentSoapBinding type=impl:IOrderPresentation http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=findOrderDetails wsdlsoap:operation soapAction=/ wsdl:input name=findOrderDetailsRequest /wsdl:input wsdl:output name=findOrderDetailsResponse /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=IOrderPresentationService wsdl:port binding=impl:presentSoapBinding name=present http://localhost:7001/axis/services/present/ /wsdl:port /wsdl:service /wsdl:definitions My presentation client: ws.IOrderPresentationService service = new ws.IOrderPresentationServiceLocator(); // Now use the service to get a stub which implements the SDI. ws.IOrderPresentation iOrderPresentation = service.getpresent(); // Make the actual call OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE The PresentSoapBindingStub.java: (the exception happens when returning the object (in the catch at the bottom of the code) /** * PresentSoapBindingStub.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package presentation; public class PresentSoapBindingStub extends org.apache.axis.client.Stub implements presentation.IOrderPresentation { private java.util.Vector cachedSerClasses = new java.util.Vector(); private java.util.Vector cachedSerQNames = new java.util.Vector(); private java.util.Vector cachedSerFactories = new java.util.Vector(); private java.util.Vector cachedDeserFactories = new java.util.Vector(); static org.apache.axis.description.OperationDesc [] _operations; static { _operations = new org.apache.axis.description.OperationDesc[1]; _initOperationDesc1(); } private static void _initOperationDesc1(){ org.apache.axis.description.OperationDesc oper; org.apache.axis.description.ParameterDesc param; oper = new org.apache.axis.description.OperationDesc(); oper.setName(findOrderDetails); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName(, in0), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName(http://schemas.xmlsoap.org/soap/encoding/;, string), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName(http://order.dto.om.edb.com;, OrderAttributeTO)); oper.setReturnClass(com.edb.om.dto.order.OrderAttributeTO.class); oper.setReturnQName(new javax.xml.namespace.QName(, findOrderDetailsReturn)); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[0] = oper; } public PresentSoapBindingStub() throws org.apache.axis.AxisFault { this(null); } public PresentSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { this(service); super.cachedEndpoint = endpointURL; } public PresentSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { if (service == null) { super.service = new org.apache.axis.client.Service(); } else {
Re: java.lang.ClassCastException
What came first to my mind is: Try OrderAttributeTO ob = (OrderAttributeTO)iOrderPresentation.findOrderDetails(2); instead of OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE I didn't try, but perhaps that's the problem. Which databinding and version of axis2 do you use? Espen Falkevik schrieb: Hi. I have a webservice with that takes a string in and returns a object. When I use my client I get the followin exception: When I use my client (which uses the stub files generated by WSDL2Java) I get the following exception: Exception in thread main java.lang.ClassCastException: ws.OrderAttributeTO at ws.PresentSoapBindingStub.findOrderDetails(PresentSoapBindingStub.java:165) at webservice.PresentationClient.main(PresentationClient.java:31) Any help would be appreciated I use the Java2WSDL to generate the wsdl file (attached below): ?xml version=1.0 encoding=UTF-8? !--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)-- wsdl:types http://schemas.xmlsoap.org/soap/encoding// complexType name=OrderAttributeTO sequence element name=name nillable=true type=soapenc:string/ element name=value nillable=true type=soapenc:string/ /sequence /complexType /schema /wsdl:types wsdl:message name=findOrderDetailsResponse wsdl:part name=findOrderDetailsReturn type=tns2:OrderAttributeTO/ /wsdl:message wsdl:message name=findOrderDetailsRequest wsdl:part name=in0 type=soapenc:string/ /wsdl:message wsdl:portType name=IOrderPresentation wsdl:operation name=findOrderDetails parameterOrder=in0 wsdl:input message=impl:findOrderDetailsRequest name=findOrderDetailsRequest/ wsdl:output message=impl:findOrderDetailsResponse name=findOrderDetailsResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=presentSoapBinding type=impl:IOrderPresentation http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=findOrderDetails wsdlsoap:operation soapAction=/ wsdl:input name=findOrderDetailsRequest /wsdl:input wsdl:output name=findOrderDetailsResponse /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=IOrderPresentationService wsdl:port binding=impl:presentSoapBinding name=present http://localhost:7001/axis/services/present/ /wsdl:port /wsdl:service /wsdl:definitions My presentation client: ws.IOrderPresentationService service = new ws.IOrderPresentationServiceLocator(); // Now use the service to get a stub which implements the SDI. ws.IOrderPresentation iOrderPresentation = service.getpresent(); // Make the actual call OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE The PresentSoapBindingStub.java: (the exception happens when returning the object (in the catch at the bottom of the code) /** * PresentSoapBindingStub.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package presentation; public class PresentSoapBindingStub extends org.apache.axis.client.Stub implements presentation.IOrderPresentation { private java.util.Vector cachedSerClasses = new java.util.Vector(); private java.util.Vector cachedSerQNames = new java.util.Vector(); private java.util.Vector cachedSerFactories = new java.util.Vector(); private java.util.Vector cachedDeserFactories = new java.util.Vector(); static org.apache.axis.description.OperationDesc [] _operations; static { _operations = new org.apache.axis.description.OperationDesc[1]; _initOperationDesc1(); } private static void _initOperationDesc1(){ org.apache.axis.description.OperationDesc oper; org.apache.axis.description.ParameterDesc param; oper = new org.apache.axis.description.OperationDesc(); oper.setName(findOrderDetails); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName(, in0), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName(http://schemas.xmlsoap.org/soap/encoding/;, string), java.lang.String.class, false, false); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName(http://order.dto.om.edb.com;, OrderAttributeTO)); oper.setReturnClass(com.edb.om.dto.order.OrderAttributeTO.class); oper.setReturnQName(new javax.xml.namespace.QName(, findOrderDetailsReturn)); oper.setStyle(org.apache.axis.constants.Style.RPC); oper.setUse(org.apache.axis.constants.Use.ENCODED); _operations[0] = oper; } public PresentSoapBindingStub() throws org.apache.axis.AxisFault { this(null); } public PresentSoapBindingStub(java.net.URL endpointURL,
[SOLVER]Re: Axis2 collection of complex objects
Use array instead of the list. Sorry to all. Pat On Thu, 7 Dec 2006 13:57:44 +0100, pat wrote Hi, I'm bit new to web services and I need to develop service with Axis2 which handle complex objects as lists/collections. E.g.: class A { List bList; } class B { String str; Integer integer; Long _long; } where the bList is a list of the B class objects. Please could someone point me to an example ??? Thnaks a lot. Pat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: parts of attachments are missing
Got it! If anyone encounters the same problem, here's the solution: I'm using a Struts FormFile for uploading a file. To get the FormFile as DataHandler the following steps are necessary: byte[] bytes = uploadForm.getTheFile().getFileData(); ByteArrayDataSource dataSource = new ByteArrayDataSource(bytes, uploadForm.getTheFile().getContentType()); DataHandler dataHandler = new DataHandler(dataSource); Looks easy, but it was a little bit tricky, because org.apache.struts.upload.FormFile is different to java.io.File and I had to work with byte[] The problem was that I used generated the dataHandler like this in my first attempt: InputStream is = (uploadForm.getTheFile().getInputStream()); MimeBodyPart mbP = new MimeBodyPart(is); uploadFile.setBinaryData(mbP.getDataHandler()); That's simply wrong... hth, Philipp Philipp Perner schrieb: Hi, When I try to upload a file with a webService using MTOM I always encounter the problem, that the file is incomplete. For example: A text file like catalina.policy (with 7kb) is transferred, and saved by the webservice to catalina2.policy - But due to unknown reasons the beginning of the file is missing (see attached) I even tried to cache the files with the following options, but the result is the same: _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR, c:/temp/); _stub._getServiceClient().getOptions().setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, 0); if this is important: I am using base64Binary data type for the file and adb for databinding. Does anyone know, why this happens? I would appreciate every hint... cheers, Philipp // // catalina.corepolicy - Security Policy Permissions for Tomcat 5 // // This file contains a default set of security policies to be enforced (by the // JVM) when Catalina is executed with the -security option. In addition // to the permissions granted here, the following additional permissions are // granted to the codebase specific to each web application: // // * Read access to the document root directory // // $Id: catalina.policy,v 1.11 2004/03/02 12:36:22 remm Exp $ // // == SYSTEM CODE PERMISSIONS = // These permissions apply to javac grant codeBase file:${java.home}/lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase file:${java.home}/jre/lib/ext/- { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase file:${java.home}/../lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase file:${java.home}/lib/ext/- { permission java.security.AllPermission; }; // == CATALINA CODE PERMISSIONS === // These permissions apply to the launcher code grant codeBase file:${catalina.home}/bin/commons-launcher.jar { permission java.security.AllPermission; }; // These permissions apply to the daemon code grant codeBase file:${catalina.home}/bin/commons-daemon.jar { permission java.security.AllPermission; }; // These permissions apply to the commons-logging API grant codeBase file:${catalina.home}/bin/commons-logging-api.jar { permission java.security.AllPermission; }; // These permissions apply to the server startup code grant codeBase file:${catalina.home}/bin/bootstrap.jar { permission java.security.AllPermission; }; // These permissions apply to the JMX server grant codeBase file:${catalina.home}/bin/jmx.jar { permission java.security.AllPermission; }; // These permissions apply to the servlet API classes // and those that are shared across all class loaders // located in the common directory grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; // These permissions apply to the container's core code, plus any additional // libraries installed in the server directory grant codeBase file:${catalina.home}/server/- { permission java.security.AllPermission; }; // == WEB APPLICATION PERMISSIONS = // These permissions are granted by default to all web applications // In addition, a web application will be given a read FilePermission // and JndiPermission for all files and
RE: WS debugging in Eclipse
Another suggestion is to use Tomcat for Eclipse plugin from Sysdeo. It integrates pretty well with eclipse and allows you to start/stop/restart tomcat from the eclipse toolbar and saves you the step to attach the debugger. It gives you also some additional control as you can add projects to the tomcat classpath, jvm paramaters, etc. http://www.sysdeo.com/eclipse/tomcatplugin George Stanchev From: Betsy Frey [mailto:[EMAIL PROTECTED] Sent: Thu 12/7/2006 5:57 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse To use eclipse to debug a tomcat servlet: 1. Be sure that tomcat is started with the below. One way to do that is to edit tomcat/bin/catalina.bat, where JAVA_OPTS is defined. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n 2. Set a breakpoint in the servlet code. Note that servlet timeouts may start to occur when you debug, so you want the breakpoint close to the code being debugged. 3. Start the eclipse debugger. Open Run | Debug... Select the section for remote java application. Select the project. Connection type is socket. Set host and address (8000 in the above case). 4. Run the test that invokes the server. The breakpoint should show up in the Eclipse debugger. Betsy From: VF [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 12:24 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Hi Rajith, Im using tcp monitor,but sometimes I need to step into code. Now I make it so,that i construct skeleton class direct and run my web service as local application. But sometimes I need to debbug it on Tomcat as it would run in bussiness with all settings. Regards Vladi From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 7:36 PM To: axis-user@ws.apache.org Subject: Re: WS debugging in Eclipse Vladi, Another more easy option would be for you to deploy your services on axis2 and then remote debug using eclipse. You can also use tcpmon http://ws.apache.org/commons/tcpmon/ to check the SOAP messages that are exchanged between the service and the client. Regards, Rajith On 12/6/06, VF [EMAIL PROTECTED] wrote: Hi all, Is it possible to debug web services in Eclipse? Vladi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [SOLVER]Re: Axis2 collection of complex objects
Hi Pat- you can construct a Complex Datatype from your array as in this example /modules/adb-codegen/test-resources/testsuite/complete.xsd where array definition is !-- test elements for xsd:anyType -- element name=TestAnyType1 complexType sequence element name=testValue type=xsd:anyType minOccurs=0 maxOccurs=unbounded nillable=true/ /sequence /complexType /element //in code you can reference the whole lot as in /modules/adb-codegen/test/org/apache/axis2/schema/testsuite/XsdAnyElementsTest.java //but first you will need a means to construct the Complex datatype and return Array of OMElement public OMElement[] testAnyTypeArray(OMElement[] innerElement, int type) throws Exception { OMElement omElement; OMElement[] returnObject = null; String omElementString; switch (type) { case 1: { TestAnyType1 testAnyType = new TestAnyType1(); testAnyType.setTestValue(innerElement); omElement = testAnyType.getOMElement(TestAnyType1.MY_QNAME, OMAbstractFactory.getSOAP12Factory()); omElementString = omElement.toStringWithConsume(); System.out.println(OMElement == + omElementString); XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes())); returnObject = TestAnyType1.Factory.parse(xmlReader).getTestValue(); break; } //later on call the testAnyTypeArray method OMElement[] returnObject; try { returnObject = testAnyTypeArray(null,1); } catch(Exception e) { System.out.println(Cannot construct complex Array DataType); } HTH, M- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: pat [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 07, 2006 9:31 AM Subject: [SOLVER]Re: Axis2 collection of complex objects Use array instead of the list. Sorry to all. Pat On Thu, 7 Dec 2006 13:57:44 +0100, pat wrote Hi, I'm bit new to web services and I need to develop service with Axis2 which handle complex objects as lists/collections. E.g.: class A { List bList; } class B { String str; Integer integer; Long _long; } where the bList is a list of the B class objects. Please could someone point me to an example ??? Thnaks a lot. Pat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WS debugging in Eclipse
George, thank you for the info. Do I still need to set the JAVA_OPTS environment variable if I use this Eclipse plugin? From: George Stanchev [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 9:50 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Another suggestion is to use Tomcat for Eclipse plugin from Sysdeo. It integrates pretty well with eclipse and allows you to start/stop/restart tomcat from the eclipse toolbar and saves you the step to attach the debugger. It gives you also some additional control as you can add projects to the tomcat classpath, jvm paramaters, etc. http://www.sysdeo.com/eclipse/tomcatplugin George Stanchev From: Betsy Frey [mailto:[EMAIL PROTECTED] Sent: Thu 12/7/2006 5:57 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse To use eclipse to debug a tomcat servlet: 1. Be sure that tomcat is started with the below. One way to do that is to edit tomcat/bin/catalina.bat, where JAVA_OPTS is defined. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n 2. Set a breakpoint in the servlet code. Note that servlet timeouts may start to occur when you debug, so you want the breakpoint close to the code being debugged. 3. Start the eclipse debugger. Open Run | Debug... Select the section for remote java application. Select the project. Connection type is socket. Set host and address (8000 in the above case). 4. Run the test that invokes the server. The breakpoint should show up in the Eclipse debugger. Betsy From: VF [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 12:24 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Hi Rajith, Im using tcp monitor,but sometimes I need to step into code. Now I make it so,that i construct skeleton class direct and run my web service as local application. But sometimes I need to debbug it on Tomcat as it would run in bussiness with all settings. Regards Vladi From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 7:36 PM To: axis-user@ws.apache.org Subject: Re: WS debugging in Eclipse Vladi, Another more easy option would be for you to deploy your services on axis2 and then remote debug using eclipse. You can also use tcpmon http://ws.apache.org/commons/tcpmon/ to check the SOAP messages that are exchanged between the service and the client. Regards, Rajith On 12/6/06, VF [EMAIL PROTECTED] wrote: Hi all, Is it possible to debug web services in Eclipse? Vladi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.ClassCastException
Espen/Philip I did'nt see ServiceLocator impelemnted in Axis2 ..are you perhaps using Axis-1_3? if you are using 1.3 and look at the AddressBookServiceLocator from samples your signature would be public AddressBookServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { ( the ServiceLocator you are using has no params ) M- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Philipp Perner [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 07, 2006 9:18 AM Subject: Re: java.lang.ClassCastException What came first to my mind is: Try OrderAttributeTO ob = (OrderAttributeTO)iOrderPresentation.findOrderDetails(2); instead of OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE I didn't try, but perhaps that's the problem. Which databinding and version of axis2 do you use? Espen Falkevik schrieb: Hi. I have a webservice with that takes a string in and returns a object. When I use my client I get the followin exception: When I use my client (which uses the stub files generated by WSDL2Java) I get the following exception: Exception in thread main java.lang.ClassCastException: ws.OrderAttributeTO at ws.PresentSoapBindingStub.findOrderDetails(PresentSoapBindingStub.java:165) at webservice.PresentationClient.main(PresentationClient.java:31) Any help would be appreciated I use the Java2WSDL to generate the wsdl file (attached below): ?xml version=1.0 encoding=UTF-8? !--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)-- wsdl:types http://schemas.xmlsoap.org/soap/encoding// complexType name=OrderAttributeTO sequence element name=name nillable=true type=soapenc:string/ element name=value nillable=true type=soapenc:string/ /sequence /complexType /schema /wsdl:types wsdl:message name=findOrderDetailsResponse wsdl:part name=findOrderDetailsReturn type=tns2:OrderAttributeTO/ /wsdl:message wsdl:message name=findOrderDetailsRequest wsdl:part name=in0 type=soapenc:string/ /wsdl:message wsdl:portType name=IOrderPresentation wsdl:operation name=findOrderDetails parameterOrder=in0 wsdl:input message=impl:findOrderDetailsRequest name=findOrderDetailsRequest/ wsdl:output message=impl:findOrderDetailsResponse name=findOrderDetailsResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=presentSoapBinding type=impl:IOrderPresentation http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=findOrderDetails wsdlsoap:operation soapAction=/ wsdl:input name=findOrderDetailsRequest /wsdl:input wsdl:output name=findOrderDetailsResponse /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=IOrderPresentationService wsdl:port binding=impl:presentSoapBinding name=present http://localhost:7001/axis/services/present/ /wsdl:port /wsdl:service /wsdl:definitions My presentation client: ws.IOrderPresentationService service = new ws.IOrderPresentationServiceLocator(); // Now use the service to get a stub which implements the SDI. ws.IOrderPresentation iOrderPresentation = service.getpresent(); // Make the actual call OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE The PresentSoapBindingStub.java: (the exception happens when returning the object (in the catch at the bottom of the code) /** * PresentSoapBindingStub.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package presentation; public class PresentSoapBindingStub extends org.apache.axis.client.Stub implements presentation.IOrderPresentation { private java.util.Vector cachedSerClasses = new java.util.Vector(); private java.util.Vector
Re: java.lang.ClassCastException
Hi. I'm using Axis 1.4. I solved my problem, I think it became a problem because I specified another package name when creating the stub files (don't know why though). When I removed this pacakege option (the -p parameter in org.apache.axis.wsdl.WSDL2Java) then everything works fine. Thanks for the help anyway :) - Espen - Original Message From: Martin Gainty [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 7, 2006 4:14:55 PM Subject: Re: java.lang.ClassCastException Espen/Philip I did'nt see ServiceLocator impelemnted in Axis2 ..are you perhaps using Axis-1_3? if you are using 1.3 and look at the AddressBookServiceLocator from samples your signature would be public AddressBookServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { ( the ServiceLocator you are using has no params ) M- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Philipp Perner [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 07, 2006 9:18 AM Subject: Re: java.lang.ClassCastException What came first to my mind is: Try OrderAttributeTO ob = (OrderAttributeTO)iOrderPresentation.findOrderDetails(2); instead of OrderAttributeTO ob = iOrderPresentation.findOrderDetails(2); //GET THE ERROR HERE I didn't try, but perhaps that's the problem. Which databinding and version of axis2 do you use? Espen Falkevik schrieb: Hi. I have a webservice with that takes a string in and returns a object. When I use my client I get the followin exception: When I use my client (which uses the stub files generated by WSDL2Java) I get the following exception: Exception in thread main java.lang.ClassCastException: ws.OrderAttributeTO at ws.PresentSoapBindingStub.findOrderDetails(PresentSoapBindingStub.java:165) at webservice.PresentationClient.main(PresentationClient.java:31) Any help would be appreciated I use the Java2WSDL to generate the wsdl file (attached below): ?xml version=1.0 encoding=UTF-8? !--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)-- wsdl:types http://schemas.xmlsoap.org/soap/encoding// complexType name=OrderAttributeTO sequence element name=name nillable=true type=soapenc:string/ element name=value nillable=true type=soapenc:string/ /sequence /complexType /schema /wsdl:types wsdl:message name=findOrderDetailsResponse wsdl:part name=findOrderDetailsReturn type=tns2:OrderAttributeTO/ /wsdl:message wsdl:message name=findOrderDetailsRequest wsdl:part name=in0 type=soapenc:string/ /wsdl:message wsdl:portType name=IOrderPresentation wsdl:operation name=findOrderDetails parameterOrder=in0 wsdl:input message=impl:findOrderDetailsRequest name=findOrderDetailsRequest/ wsdl:output message=impl:findOrderDetailsResponse name=findOrderDetailsResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=presentSoapBinding type=impl:IOrderPresentation http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=findOrderDetails wsdlsoap:operation soapAction=/ wsdl:input name=findOrderDetailsRequest /wsdl:input wsdl:output name=findOrderDetailsResponse /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=IOrderPresentationService wsdl:port binding=impl:presentSoapBinding name=present http://localhost:7001/axis/services/present/ /wsdl:port /wsdl:service /wsdl:definitions My presentation client: ws.IOrderPresentationService service = new ws.IOrderPresentationServiceLocator(); // Now use the service to get a stub which implements the SDI. ws.IOrderPresentation iOrderPresentation = service.getpresent(); // Make the actual
RE: Evaluation of application
I am sorry for resurrecting an old thread, but there is a question remaining that I would like some guidance on. Support Overhead: After we implement this interface, it will have to be deployed onto several hundred transaction servers. The initial installation will need to install all of the framework components onto Win2K and 2K3 servers. Most of this will be managed by our support specialists, with the physical tasks of inserting a CD and running the install scripts done by the local system operators. Updates and bug fixes will have to be done either by mailing CDs or connecting to each server with a VNC and manually doing the updates. Can anyone provide a reasonable guess of how many support man-hours will be required for each deployed server to install and then maintain the Axis 2/Tomcat/Apache framework? Thank you, Bob McConnell -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Monday, October 30, 2006 4:28 AM To: axis-user@ws.apache.org Subject: Re: Evaluation of application Hi Bob, The approach I've used for several clients in similar situations is to write an adapter that on one side talks either plain XML or some other format to the existing code, and on the other talks SOAP. If you want the full range of SOAP add-on support (including WS-ReliableMessaging and the like) you'd be best off writing the adapter as an Axis2 application. If you just want SOAP and perhaps WS-Security, writing code that works directly with the XML is in my experience simpler and more robust. That said, I haven't tried interfacing to DCOM. It looks like there are a few ways of doing this, and some searching should let you narrow down the best approach for your needs. Why use custom code for SOAP handling, rather than going through Axis2? This is really just an issue of usage. Axis2, like most SOAP frameworks, is primarily oriented toward working with the SOAP Body content as objects. That's exactly what most developers want to do, but in the case where data is being passed to another application you're generally just converting the XML to some other format. If that's the case, the framework code can add overhead and complexity without providing much useful functionality. I not sure what you mean by the support overhead question, but if you can be more specific I'll try to come up with an answer. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 Bob McConnell wrote: Good morning, I am part of a team evaluating options for web services. We are looking for a way to provide a SOAP style front end for an existing transaction processor (TP). I am trying to find out what server options we have. This project is an attempt to provide a standardized front end to replace several custom interfaces. The service definition will only be provided to third party application developers with a need to post transactions to our servers. Those will be web servers, POS servers and other application servers. The service will only be available to a few selected clients at each location. All connections must be secure, and client authentication is more important than server authentication. In addition, each client will only be able to use a specific subset of functions available on the TP. So there must be a way to tell the server which client sent each transaction. This must run on a Microsoft Windows server, and the interface to the TP is through DCOM objects. Is Axis2, in its current state, likely to be able to satisfy these basic requirements? We did look at Axis, which looked like it would work. But it does not support the client authentication we need. How much support overhead will there be to maintain 800 or so servers scattered all over North America? What is the quickest path to building a test server to evaluate this option? Thank you, Bob McConnell Principal Communications Programmer The CBORD Group, Inc. 61 Brown Road Ithaca NY, 14850 Phone 607 257-2410 FAX 607 257-1902 Email [EMAIL PROTECTED] Web www.cbord.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WS debugging in Eclipse
No, its all automated. From: Danny Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 8:02 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse George, thank you for the info. Do I still need to set the JAVA_OPTS environment variable if I use this Eclipse plugin? From: George Stanchev [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 9:50 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Another suggestion is to use Tomcat for Eclipse plugin from Sysdeo. It integrates pretty well with eclipse and allows you to start/stop/restart tomcat from the eclipse toolbar and saves you the step to attach the debugger. It gives you also some additional control as you can add projects to the tomcat classpath, jvm paramaters, etc. http://www.sysdeo.com/eclipse/tomcatplugin George Stanchev From: Betsy Frey [mailto:[EMAIL PROTECTED] Sent: Thu 12/7/2006 5:57 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse To use eclipse to debug a tomcat servlet: 1. Be sure that tomcat is started with the below. One way to do that is to edit tomcat/bin/catalina.bat, where JAVA_OPTS is defined. -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n 2. Set a breakpoint in the servlet code. Note that servlet timeouts may start to occur when you debug, so you want the breakpoint close to the code being debugged. 3. Start the eclipse debugger. Open Run | Debug... Select the section for remote java application. Select the project. Connection type is socket. Set host and address (8000 in the above case). 4. Run the test that invokes the server. The breakpoint should show up in the Eclipse debugger. Betsy From: VF [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 12:24 AM To: axis-user@ws.apache.org Subject: RE: WS debugging in Eclipse Hi Rajith, Im using tcp monitor,but sometimes I need to step into code. Now I make it so,that i construct skeleton class direct and run my web service as local application. But sometimes I need to debbug it on Tomcat as it would run in bussiness with all settings. Regards Vladi From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 7:36 PM To: axis-user@ws.apache.org Subject: Re: WS debugging in Eclipse Vladi, Another more easy option would be for you to deploy your services on axis2 and then remote debug using eclipse. You can also use tcpmon http://ws.apache.org/commons/tcpmon/ to check the SOAP messages that are exchanged between the service and the client. Regards, Rajith On 12/6/06, VF [EMAIL PROTECTED] wrote: Hi all, Is it possible to debug web services in Eclipse? Vladi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Evaluation of application
Hi Bob- If you get a chance to Read charlie calvert's article located at http://bdn.borland.com/article/31871 you'll see the statement Web Services differ from RMI, DCOM, CORBA, and RPC in that they are specifically designed to work with an XML based technology called SOAP. The great advantage of an XML based technology is that it need not be language or platform specific By implementing thru COM (as dennis mentioned) you will either have to : -write your own COM provider or -purchase/install/configure a 3rd party COM provider One COM provider is located here http://documentation.softwareag.com/crossvision/eli/webservices/services.htm#WS_Runtime_for_DCOM The tradeoffs are time vs budget where if you're short on time you're probably better off purchasing the provider which is a ready to go solution If you have some time and or perhaps a stricter budget which doesnt accomodate 3rd party software (be aware you'll probably need a newer version every time you upgrade Tomcat and or Axis versions) then I would look into writing your own COM provider HTH, Martin -- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Bob McConnell [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 07, 2006 10:30 AM Subject: RE: Evaluation of application I am sorry for resurrecting an old thread, but there is a question remaining that I would like some guidance on. Support Overhead: After we implement this interface, it will have to be deployed onto several hundred transaction servers. The initial installation will need to install all of the framework components onto Win2K and 2K3 servers. Most of this will be managed by our support specialists, with the physical tasks of inserting a CD and running the install scripts done by the local system operators. Updates and bug fixes will have to be done either by mailing CDs or connecting to each server with a VNC and manually doing the updates. Can anyone provide a reasonable guess of how many support man-hours will be required for each deployed server to install and then maintain the Axis 2/Tomcat/Apache framework? Thank you, Bob McConnell -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Monday, October 30, 2006 4:28 AM To: axis-user@ws.apache.org Subject: Re: Evaluation of application Hi Bob, The approach I've used for several clients in similar situations is to write an adapter that on one side talks either plain XML or some other format to the existing code, and on the other talks SOAP. If you want the full range of SOAP add-on support (including WS-ReliableMessaging and the like) you'd be best off writing the adapter as an Axis2 application. If you just want SOAP and perhaps WS-Security, writing code that works directly with the XML is in my experience simpler and more robust. That said, I haven't tried interfacing to DCOM. It looks like there are a few ways of doing this, and some searching should let you narrow down the best approach for your needs. Why use custom code for SOAP handling, rather than going through Axis2? This is really just an issue of usage. Axis2, like most SOAP frameworks, is primarily oriented toward working with the SOAP Body content as objects. That's exactly what most developers want to do, but in the case where data is being passed to another application you're generally just converting the XML to some other format. If that's the case, the framework code can add overhead and complexity without providing much useful functionality. I not sure what you mean by the support overhead question, but if you can be more specific I'll try to come up with an answer. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 Bob McConnell wrote: Good morning, I am part of a team evaluating options for web services. We are looking for a way to provide a SOAP style front end for an existing transaction processor
RE: rahas
Hi Ruchith, I see. My comments below. George -Original Message- From: Ruchith Fernando [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 1:22 AM To: axis-user@ws.apache.org Subject: Re: rahas On 12/7/06, George Stanchev [EMAIL PROTECTED] wrote: Is there a reason rahas is a module at all? In previous builds rahas was a service (aar), which i thought makes more sense - after all, it has a service functionality in it, and if someone wants to extend it, why do they have to define a dummy service (as in the test cases) just to serve a RST. The main purpose of the rahas.mar is to enable STS functionality on a service to support WS-SecureConversation scenarios. In these scenario's the service is expected to issue and cancel SecurityContextTokens. I see. But is there any reason the aar was removed from the build? And speaking of the aar, I could not make it run under tomcat. It kept bombing out when trying to load its configuration settings. I might try to play with it again later on, but meanwhile, have you been successfully able to drop the aar in tomcat and get a RSTR? Speaking of the test cases in integration, they only run under the simple HTTP server that comes with axis2. In order to run them under tomcat for example, several changes need to be applied-the TestClient.java needs to be modified to put proper addressing namespace in the RST mssage - it uses AddressingConstants.Submission.WSA_NAMESPACE when it should use AddressingConstants.Final.WSA_NAMESPACE. Unless there is a way to configure axis2 servlet which namespace to recognize. hmm ... I thought axis2 addressing module can handle any addressing version in incoming messages. May be there is some option I am missing. In the RahasData constructor the addressing namespace is pulled from the message context: this.addressingNs = (String) this.inMessageContext .getProperty(AddressingConstants.WS_ADDRESSING_VERSION); and that is later used in RahasData.processAppliesTo() to extract the address element from the epr element. If the message context doesn't have addressing headers in it, then it uses the epr to determine addressing version (as a comment in RahasData, line 174-175 suggests). In the tests, addressing is not used and therefore addressing is only present in epr element and things work. But with addressing enabled, it uses headers with different version and due to the namespace mismatch rahas cannot extract the epr element. The epr addressing namespace doesn't have to match the message namespace does it? Is there any plan to finish the trust2 model in wss4j sandbox? It would be nice to have some real api for wst ;-) I'm not sure about the trust2 stuff in wss4j ... but you are welcome to suggest any improvements/patches to rahas ... I'll be glad to try to implement/apply them. Googling around, I found an old thread, where you say that the sandbox folder in wss4j contains DOM-based trust implementation and trust2 is a rework but hasn't been finished yet. It looks like it was a good start. For example: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/s andbox/security/trust/message/token/ In the long run I like having separate (reworked) trust client API and STS provider. Speaking of which, how about splitting the issuers in 2 parts - issuer and identity provider. The issuer knows how to issue different tokens as it is now - SAML issuer, UsernameToken issuer, etc. The IdP provides the subjects identity information which the issuer then packages into a token. This way, if users want to extend the STS (to extract subject attributes from LDAP for example) all they have to do is hook their own IdP. George ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.4 Strange behaviour
Nobody knows the answer for this? ... On 12/6/06, Miguel Correia Ricardo [EMAIL PROTECTED] wrote: Hi you all, I'm getting all stressed out with a strange behaviour in Axis version 1.4. When I deploy a webservice, with my own custom handler, the wsdl gets generated. One of the methods, has a parameter of the type ArrayOf_soapenc_int. That is fine, because what I want to do, when I generated my client stubs, is to get an array of Integer's, that is: Integer[] corresponding to the ArrayOf_soapenc_int. But now, the freaky thing... The same webservice, without even stopping it, magically changes ArrayOf_soapenc_int to ArrayOf_xsd_int when I generate the wsdl again (changes it randomly , without any cause) and when I generate the client stubs again, I get of course, an int[] array. And that is not fine, because I want to be able to send nulls. Now, why does Axis, all the sudden changes the type to ArrayOf_soapenc_int, to ArrayOf_xsd_int?? I've searched the web forums, and one person said that the parameter dotnet_soapenc_bugfix, is not reliable, because it can change at any time...Is this true? Is the parameter dotnet_soapenc_bugfix causing this strange behaviour? Because I repeat, Axis changes the parameter type in the wsdl, without even stopping...And only happens to array types... I appreciate any help. Because this is very strange indeed... Thanks, Miguel Ricardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java 5 Enum Support
Can anyone give me guidance on this question? Does Axis2 support the Java 1.5 'enum' keyword? If not, what is the recommended Axis2 best practices for enumerated types? Is it the use of the type safe enum pattern, or something else? Any help would be appreciated. Again, thanks for any response. From: Johnson, Larry D (LJOHNSON) [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 9:40 AM To: axis-user@ws.apache.org Subject: Java 5 Enum Support I am new to Axis2 and am trying to develop a web service using Axis 2 v1.1, Java 1.5 and the POJO approach. The service POJO that I developed uses the keyword enum for many different attribute types. I am able to successfully generate WSDL from the POJO; however, when I try to create the client, via wsdl2java I receive the following errors: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [snip] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Invalid QName value: Localname not a valid NCName in 'ax241:CLFService$CLFCommandType' [snip] I have tried several tricks to make the enum more visible to the service; however, in all cases I continue to receive the above error (only the name of the invalid NCName changes). My question is; does Axis2 v1.1 support the Java 1.5 enum keyword? If so, how do I make the WSDL generator recognize it? I have seen several posts in the mailing-list archives about Axis v1.3; however, none since Axis2 was released. Most of the Axis1 posts were requesting this feature. Has this been introduced? Also, if enum is not supported, do you recommend using the type safe enum pattern to solve this problem? I have also seen posts where people were having problems with that pattern as well. What is the recommended Axis2 best practices approach to solve this? Many thanks for the response.
MTOM Sample
I am trying to get MTOM Sample code to run. I use Eclipse 3.2. After I run the generate.service target, I have the AAR created several source files (e.g. MTOMSampleMessageReceiverInOut.java, MTOMSampleSkeleton.java, etc.) My problem is that in the Client.java class it has import statements: import sample.mtom.service.MTOMSampleStub; import sample.mtom.service.MTOMSampleStub.AttachmentRequest; import sample.mtom.service.MTOMSampleStub.AttachmentResponse; import sample.mtom.service.MTOMSampleStub.AttachmentType; import sample.mtom.service.MTOMSampleStub.Base64Binary; I can't find any of these source files. I added -g argument to the target and got the stub generated. How can I generate the other 4 classes? Any comment and help is appreciated. Danny
RE: Evaluation of application
Hi Martin, The intent of this interface is to provide a standards based front end on a DCOM transaction server. This is needed to allow access to services already available in that DCOM framework for Point Of Sale systems that are not running on MS-Windows. Instead of having to create a new socket based component each time we need another third party interface, we are examining Axis as a framework to build a common interface based on SOAP over https. Then we would publish WSDL subsets for various classes of POS system. Our server components are written in a mix of Visual C++ 6, J++ and VB6. We already know the costs to deploy and maintain the DCOM components, since we have been doing that for about eight years. We need to compare this with the other options in order to evaluate that make/buy decision. We recognize that there will be a cost bump in the initial deployment because of the framework, but we don't know if there are other long term costs involved. That initial bump will not vary much no matter which framework we choose. We have another month or so to make the decisions, then five to eight months to implement the interface before we have to begin deployment. Development manpower is not as big an issue as are deployment and support. Since it takes four to six months to train a new support tech, we need to know if we have to hire more of them to deal with this project. Thank you, Bob McConnell -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 11:11 AM To: axis-user@ws.apache.org Subject: Re: Evaluation of application Hi Bob- If you get a chance to Read charlie calvert's article located at http://bdn.borland.com/article/31871 you'll see the statement Web Services differ from RMI, DCOM, CORBA, and RPC in that they are specifically designed to work with an XML based technology called SOAP. The great advantage of an XML based technology is that it need not be language or platform specific By implementing thru COM (as dennis mentioned) you will either have to : -write your own COM provider or -purchase/install/configure a 3rd party COM provider One COM provider is located here http://documentation.softwareag.com/crossvision/eli/webservice s/services.htm#WS_Runtime_for_DCOM The tradeoffs are time vs budget where if you're short on time you're probably better off purchasing the provider which is a ready to go solution If you have some time and or perhaps a stricter budget which doesnt accomodate 3rd party software (be aware you'll probably need a newer version every time you upgrade Tomcat and or Axis versions) then I would look into writing your own COM provider HTH, Martin -- - Original Message - From: Bob McConnell [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, December 07, 2006 10:30 AM Subject: RE: Evaluation of application I am sorry for resurrecting an old thread, but there is a question remaining that I would like some guidance on. Support Overhead: After we implement this interface, it will have to be deployed onto several hundred transaction servers. The initial installation will need to install all of the framework components onto Win2K and 2K3 servers. Most of this will be managed by our support specialists, with the physical tasks of inserting a CD and running the install scripts done by the local system operators. Updates and bug fixes will have to be done either by mailing CDs or connecting to each server with a VNC and manually doing the updates. Can anyone provide a reasonable guess of how many support man-hours will be required for each deployed server to install and then maintain the Axis 2/Tomcat/Apache framework? Thank you, Bob McConnell -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Monday, October 30, 2006 4:28 AM To: axis-user@ws.apache.org Subject: Re: Evaluation of application Hi Bob, The approach I've used for several clients in similar situations is to write an adapter that on one side talks either plain XML or some other format to the existing code, and on the other talks SOAP. If you want the full range of SOAP add-on support (including WS-ReliableMessaging and the like) you'd be best off writing the adapter as an Axis2 application. If you just want SOAP and perhaps WS-Security, writing code that works directly with the XML is in my experience simpler and more robust. That said, I haven't tried interfacing to DCOM. It looks like there are a few ways of doing this, and some searching should let you narrow down the best approach for your needs. Why use custom code for SOAP handling, rather than going through Axis2? This is really just an issue of usage. Axis2, like most SOAP frameworks, is primarily oriented toward working with the SOAP Body content as objects. That's exactly what
Kandula2
Does anyone know the status of the Kandula2 project at Apache (planned release date, etc.)? We have a definite need for distributed transactions in our current web service... Brennan Spies Sr. Programmer Analyst Shared Application Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java 5 Enum Support
Axis2 AFAIK does not support enum. For one thing Axis2 at minimum needs to compile with java 1.4 . What you may consider is using Enum's per XML Schema. I myself just pass in an Integer defined in WSDL. So for example with this Enum: public enum TipoMib implements Serializable{ MIB2, MIB_GERENCIA, MIB_ESPECIFICA; } I do the conversion as: private static TipoMib getTipoMib(Integer ordinal) { if (TipoMib.MIB2.ordinal() == ordinal) { return TipoMib.MIB2; } else if (TipoMib.MIB_ESPECIFICA.ordinal() == ordinal) { return TipoMib.MIB_ESPECIFICA; } else if (TipoMib.MIB_GERENCIA.ordinal() == ordinal) { return TipoMib.MIB_GERENCIA; } else return null; } To convert the other way I do tipoMib.ordinal() - see the javadoc of Enum about ordinal() . HTH, Robert On 12/7/06, Johnson, Larry D (LJOHNSON) [EMAIL PROTECTED] wrote: Can anyone give me guidance on this question? Does Axis2 support the Java 1.5 'enum' keyword? If not, what is the recommended Axis2 best practices for enumerated types? Is it the use of the type safe enum pattern, or something else? Any help would be appreciated. Again, thanks for any response. From: Johnson, Larry D (LJOHNSON) [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 9:40 AM To: axis-user@ws.apache.org Subject: Java 5 Enum Support I am new to Axis2 and am trying to develop a web service using Axis 2 v1.1, Java 1.5 and the POJO approach. The service POJO that I developed uses the keyword enum for many different attribute types. I am able to successfully generate WSDL from the POJO; however, when I try to create the client, via wsdl2java I receive the following errors: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [snip] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Invalid QName value: Localname not a valid NCName in 'ax241:CLFService$CLFCommandType' [snip] I have tried several tricks to make the enum more visible to the service; however, in all cases I continue to receive the above error (only the name of the invalid NCName changes). My question is; does Axis2 v1.1 support the Java 1.5 enum keyword? If so, how do I make the WSDL generator recognize it? I have seen several posts in the mailing-list archives about Axis v1.3; however, none since Axis2 was released. Most of the Axis1 posts were requesting this feature. Has this been introduced? Also, if enum is not supported, do you recommend using the type safe enum pattern to solve this problem? I have also seen posts where people were having problems with that pattern as well. What is the recommended Axis2 best practices approach to solve this? Many thanks for the response. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] How to build web service that is invoked via HTTP Post ?
Hi, I am new to building web services in Java, even though I have been using Java for several years mostly in building web applications. I have been assigned the task to replace several web services that were previsouly built using some proprietary software, and re-build them in Java. I have started looking into Axis2 several days ago. But the examples I have tried so far do not seem to work the same way as the web services that I am replacing. I have recenly found out that there is no existing WSDL file for the web services that I am converting to Java, and that these web services are invoked via HTTP Post. The client invokes the web service by passing an xml request to them via HTTP Post and then receives back an xml via HTTP Reponse. So it seems that the SOAP examples on the Axis2 website do not apply to me. Should I still use Axis2 in my situation, or how should I go about building these web services in Java? Any suggestions are welcome. Thanks. -Saladin ** * Saladin Sharif * e-mail: [EMAIL PROTECTED] * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs ** Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] How to build web service that is invoked via HTTP Post ?
Have you looked at the REST examples? http://ws.apache.org/axis2/1_1/rest-ws.html Brennan Spies Sr. Programmer Analyst Shared Application Services -Original Message- From: S. Sharif [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 11:09 AM To: axis-user@ws.apache.org Subject: [Axis2] How to build web service that is invoked via HTTP Post ? Hi, I am new to building web services in Java, even though I have been using Java for several years mostly in building web applications. I have been assigned the task to replace several web services that were previsouly built using some proprietary software, and re-build them in Java. I have started looking into Axis2 several days ago. But the examples I have tried so far do not seem to work the same way as the web services that I am replacing. I have recenly found out that there is no existing WSDL file for the web services that I am converting to Java, and that these web services are invoked via HTTP Post. The client invokes the web service by passing an xml request to them via HTTP Post and then receives back an xml via HTTP Reponse. So it seems that the SOAP examples on the Axis2 website do not apply to me. Should I still use Axis2 in my situation, or how should I go about building these web services in Java? Any suggestions are welcome. Thanks. -Saladin ** * Saladin Sharif * e-mail: [EMAIL PROTECTED] * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs ** _ ___ Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.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]
Re: Axis 1.4 Strange behaviour
If you want to use soapenc types, you should not use the dotNet SOAP Encoding bug fix. You might try defining your own type and explicitly specify nillable=true. On 12/7/06, Miguel Correia Ricardo [EMAIL PROTECTED] wrote: Nobody knows the answer for this? ... On 12/6/06, Miguel Correia Ricardo [EMAIL PROTECTED] wrote: Hi you all, I'm getting all stressed out with a strange behaviour in Axis version 1.4. When I deploy a webservice, with my own custom handler, the wsdl gets generated. One of the methods, has a parameter of the type ArrayOf_soapenc_int. That is fine, because what I want to do, when I generated my client stubs, is to get an array of Integer's, that is: Integer[] corresponding to the ArrayOf_soapenc_int. But now, the freaky thing... The same webservice, without even stopping it, magically changes ArrayOf_soapenc_int to ArrayOf_xsd_int when I generate the wsdl again (changes it randomly , without any cause) and when I generate the client stubs again, I get of course, an int[] array. And that is not fine, because I want to be able to send nulls. Now, why does Axis, all the sudden changes the type to ArrayOf_soapenc_int, to ArrayOf_xsd_int?? I've searched the web forums, and one person said that the parameter dotnet_soapenc_bugfix, is not reliable, because it can change at any time...Is this true? Is the parameter dotnet_soapenc_bugfix causing this strange behaviour? Because I repeat, Axis changes the parameter type in the wsdl, without even stopping...And only happens to array types... I appreciate any help. Because this is very strange indeed... Thanks, Miguel Ricardo - 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]
WS Addressing - Not able to Get MessageID in Response.
Hi, Find below my request: ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/addressing; soapenv:Header wsa:Tohttp://127.0.0.1:8080/Axis2/services/fromws/wsa:To wsa:ReplyTo wsa:Addresshttp://www.w3.org/2005/08/addressing/anonymous/wsa:Address /wsa:ReplyTo wsa:MessageIDurn:uuid:154D4ED7795855F43111655301223211/wsa:MessageID wsa:ActionechoString/wsa:Action /soapenv:Header soapenv:Body ns1:echoString xmlns:ns1=http://sunilfromws.org/; ns1:Textecho1/ns1:Text ns1:Sequencesequence1/ns1:Sequence /ns1:echoString /soapenv:Body /soapenv:Envelope I am getting following response: ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header / soapenv:Body ns1:echoStringResponse xmlns:ns1=http://sunilfromws.org/; xmlns:tns=http://ws.apache.org/axis2; ns1:EchoStringReturnecho1---sequence1/ns1:EchoStringReturn /ns1:echoStringResponse /soapenv:Body /soapenv:Envelope WS Addressing is engaged and I was expectring MessageID in response. Could any one help me to confirm my assumption? And if it is true , please let me know why I am not receiving same. I am using Axis 2.0 Version 1.0 Thanks, Sunil
RE: WS Addressing - Not able to Get MessageID in Response.
Hi David, Thanks for response. As per my knowledge addressing module is engaged by default. Find below axi2.xml: Location: C:\Apache\axis2\webapps\WEB-INF\conf axisconfig name=AxisJava2.0 !-- = -- !-- Parameters -- !-- = -- parameter name=hotdeployment locked=falsetrue/parameter parameter name=hotupdate locked=falsefalse/parameter parameter name=enableMTOM locked=falsefalse/parameter !--During a fault, stacktrace can be sent with the fault message. The following flag will control -- !--that behaviour.-- parameter name=sendStacktraceDetailsWithFaults locked=falsetrue/parameter !--If there aren't any information available to find out the fault reason, we set the message of the expcetion-- !--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -- !--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-- !--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-- parameter name=DrillDownToRootCauseForFaultReason locked=falsefalse/parameter parameter name=userName locked=falseadmin/parameter parameter name=password locked=falseaxis2/parameter !-- If you have a frontend host which exposes this webservice using a different public URL -- !-- use this parameter to override autodetected url -- !--parameter name=httpFrontendHostUrl locked=falsehttps://someotherhost/context/parameter-- !--The way of adding listener to the system-- !--listener class=org.apache.axis2.ObserverIMPL-- !--parameter name=RSS_URL locked=falsehttp://127.0.0.1/rss/parameter-- !--/listener-- !-- = -- !-- Message Receivers -- !-- = -- !--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -- !--all the other MEP implement it and add the correct entry to here , so that you can refer from-- !--any operation -- !--Note : You can ovride this for particular service by adding the same element with your requirement-- messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver/ messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /messageReceivers !-- = -- !-- Transport Ins -- !-- = -- transportReceiver name=http class=org.apache.axis2.transport.http.SimpleHTTPServer parameter name=port locked=false6060/parameter !--If you want to give your own host address for EPR generation-- !--uncommet following paramter , and set as you required.-- !--parameter name=hostname locked=falsehttp://myApp.com/ws/parameter-- /transportReceiver !--Uncomment if you want to have SMTP transport support-- !--transportReceiver name=mail class=org.apache.axis2.transport.mail.SimpleMailListener-- !--parameter name=transport.mail.pop3.host locked=false127.0.0.1/parameter-- !--parameter name=transport.mail.pop3.user locked=falseaxis2/parameter-- !--parameter name=transport.mail.pop3.password locked=falseaxis2/parameter-- !--parameter name=transport.mail.pop3.port locked=false110/parameter-- !--parameter name=transport.mail.replyToAddress locked=false[EMAIL PROTECTED]/parameter-- !--/transportReceiver-- transportReceiver name=tcp class=org.apache.axis2.transport.tcp.TCPServer parameter name=port locked=false6060/parameter !--If you want to give your own host address for EPR generation-- !--uncommet following paramter , and set as you required.-- !--parameter name=hostname locked=falsetcp://myApp.com/ws/parameter-- /transportReceiver !--Uncomment this if you want JMS transport support-- !--transportReceiver name=jms class=org.apache.axis2.transport.jms.SimpleJMSListener-- !--parameter name=transport.jms.Destination locked=falsedynamicQueues/FOO/parameter-- !--parameter name=java.naming.factory.initial locked=false-- !--org.activemq.jndi.ActiveMQInitialContextFactory/parameter-- !--parameter name=java.naming.provider.url locked=falsetcp://localhost:61616/parameter-- !--/transportReceiver-- !-- = -- !-- Transport Outs -- !-- = -- transportSender name=tcp class=org.apache.axis2.transport.tcp.TCPTransportSender/ transportSender name=local class=org.apache.axis2.transport.local.LocalTransportSender/ transportSender
getting an document object from SOAPEnvelope
Hello, This is how invoke a web service Service service = new Service(); service.setMaintainSession(true); Call call = (Call)service.createCall(); SOAPEnvelope env = new SOAPEnvelope(call.getMessageContext().getSOAPConstants(), call.getMessageContext().getSchemaVersion()); env.addBodyElement(new SOAPBodyElement(intId)); env = call.invoke(env); after that I am getting the expected result ...as follows ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsse=http://schemas.xmlsoap.org/ws/2002/04/secext; soap:Body Response xmlns=http://webservices.tesr.com/ity; response Header TransactionId14431654-205186AAA/TransactionId QueId20061211AAA/QueId Status0/Status /Header /response /Response /soap:Body /soap:Envelope Now I need to add a new element inside soap.Body Requester Raj CMSS /Requester so my final document should look like ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsse=http://schemas.xmlsoap.org/ws/2002/04/secext; soap:Body Response xmlns=http://webservices.tesr.com/ity; Requester Raj CMSS /Requester response Header TransactionId14431654-205186AAA/TransactionId QueId20061211AAA/QueId Status0/Status /Header /response /Response /soap:Body /soap:Envelope I tried to get the document object from my soap envelope env (SOAPEnvelope).. so I can add the needed element inside the soap.Body but I am not able to do. I tried org.w3c.dom.Document documentresponse = env.getAsDocument(); I am not sure why I am not able to get the document object out of my soap envelope or If I am going in the right direction. Please shed some light. Thanks in advance Raj Arumugam 614-422-5689 (w) 614-218-5284 (c) Our lives become beautiful not because we are perfect. Our lives become beautiful because we put our heart into what we are doing. - Sadhguru Jaggi Vasudev This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
handleResponse from GenericHandler acting funny
When I register just one handler under the responseFlow section of the server-config.wsdd file, it runs but does not seem to see the entire message. Specifically, it looks like some parts of it are not yet SOAP elements. When trying to do some metrics on the size of the message in this handler, I wanted to just traverse the tree, counting elements and summing bytes using the SAAJ API. In order to traverse the tree, I check to see if the next element in the list is a SOAPElement. If so, I simply recursively call the method that does traversal. The problem I have, like I said, is that some of the message that I would expect to be SOAPElements at this point are not. They are instead the same types that were generated using WSDL2Java and populated in my business logic. It gets really weird when I add a response handler before the one described above. Doing so, even using a handler that effectively does nothing causes the elements in my message that were not SOAPElements now are. This is fine, because it is how I intend to run the web service anyway, but I would like to know why this happens before I deploy it for real and call it production-grade code. Is there any reason why adding a handler before one that traverses the message tree should change the contents of MessageContext? Thank you Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] How to build web service that is invoked via HTTP Post ?
Thanks for sharing the link with me. I read it; it is brief. I looked through the Axis2 project site, but did not come across any other pages that talked specifically about builing REST web services using Axis2. The wiki section only provides two external links for REST; both links pointed to two very brief articles as well, both of which did not address writting the service-side code for REST in Axis2. This leads me to conclude that Axis2 (even though it supports REST) was mostly designed for building SOAP web services. At this point it seems that the existing web services that I am converting to Java, were developed as REST web services. This means that I have no choice but to keep them as REST web services when I re-build them in Java, so that I don't impact any existing clients that are currently inoking the web services. I am still puzzled as to whether I should use Axis2 or not. What would be the advantage of using Axis2 vs. writing a Java servlet? Currently the web services that I need to convert to Java, do not have a WSDL file, each web service has only one single point of entry (no multiple methods per web service), and each service takes in an xml as input (submitted to the web service via HTTP Post) and it returns an xml as output via HTTP reponse. So I am thinking that I could implement each of these web services as a Java servlet, and the single point of entry for a web service would be the doPost(request, response) method in the Servlet. Then I can retrieve the input xml from the body of the HTTP request using the request.getReader() method. I am not certain how a single point of entry into a web service would be implemented with Axis2. The one example provided on the Axis2 project site shows two methods inside of a web service: echo() and ping(). And how the web service knows which method to call is not clear to me. Though I did notice that the input xml seems to be wrapped in an xml tag that carries the same name as the name of the method that is to be invoked inside of the web service. So maybe that is how it mapps each input xml to each method to be invoked. In any case, I am open to any suggestions on how I should re-build my REST web services in Java. Any help would be very much appreciated. Thanks, -Saladin --- Spies, Brennan [EMAIL PROTECTED] wrote: Have you looked at the REST examples? http://ws.apache.org/axis2/1_1/rest-ws.html Brennan Spies Sr. Programmer Analyst Shared Application Services -Original Message- From: S. Sharif [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 11:09 AM To: axis-user@ws.apache.org Subject: [Axis2] How to build web service that is invoked via HTTP Post ? Hi, I am new to building web services in Java, even though I have been using Java for several years mostly in building web applications. I have been assigned the task to replace several web services that were previsouly built using some proprietary software, and re-build them in Java. I have started looking into Axis2 several days ago. But the examples I have tried so far do not seem to work the same way as the web services that I am replacing. I have recenly found out that there is no existing WSDL file for the web services that I am converting to Java, and that these web services are invoked via HTTP Post. The client invokes the web service by passing an xml request to them via HTTP Post and then receives back an xml via HTTP Reponse. So it seems that the SOAP examples on the Axis2 website do not apply to me. Should I still use Axis2 in my situation, or how should I go about building these web services in Java? Any suggestions are welcome. Thanks. -Saladin ** * Saladin Sharif * e-mail: [EMAIL PROTECTED] * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs ** ** * Saladin Sharif * e-mail: [EMAIL PROTECTED] * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs ** Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Null pointer exception when using the WSDL2Java tool
This is my first post, so here goes. I'm new to the Java world for creating Web services and I'm trying to use the WSDL2Java tool to generate my server-side skeleton code. The results are below. The WSDL file imports the XSD files that it uses. Could someone provide me with a few pointers on how to investigate this further? I could post the WSDL as well. Thanks in advance. C:\WCA\PocWebService\TypesWSDL2Java.bat -uri PocService.wsdl -ss -sd -d xmlbean s -o ..\out -p services.pocservice Using AXIS2_HOME: C:\axis2-1.1 Using JAVA_HOME:C:\j2sdk1.4.2_13 Retrieving schema at 'EmployerInfoResponse.xsd', relative to 'file:/C:/WCA/PocWe bService/Types/'. Retrieving schema at 'ContactTypes.xsd', relative to 'file:/C:/WCA/PocWebService /Types/EmployerInfoResponse.xsd'. Retrieving schema at 'EmployerInfoException.xsd', relative to 'file:/C:/WCA/PocW ebService/Types/'. Retrieving schema at 'EmployerInfoRequest.xsd', relative to 'file:/C:/WCA/PocWeb Service/Types/'. Dec 7, 2006 5:01:50 PM org.apache.axis2.description.WSDL11ToAxisServiceBuilder p opulateService SEVERE: java.lang.NullPointerException Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException : Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerat ionEngine.java:112) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) Caused by: org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi ce(WSDL11ToAxisServiceBuilder.java:250) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerat ionEngine.java:103) ... 2 more Caused by: java.lang.NullPointerException at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi ce(WSDL11ToAxisServiceBuilder.java:235) ... 3 more Find out about young workers' safety needs at www.demandsafety.ca CONFIDENTIALITY DISCLAIMER The information contained in this transmission may contain privileged and confidential information of WorkSafeBC - the Workers' Compensation Board. It is intended for review only by the person(s) named above. Dissemination, distribution or duplication of this communication is strictly prohibited by all recipients unless expressly authorized otherwise. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.
SAXException: Invalid element in com..... : How to avoid this error ?
Hi There, I'm trying to understand why a homegenous system where both client and server(both axis 1.2.1) on Windows XP should result in this Error. The JavaBean has a serialVersionUID element (generated by eclipse). We obtained the .WSDL and then generated the stub using WSDL2Java with the following command java org.apache.axis.wsdl.WSDL2Java -o . -p com.summitsite.wsclient.clientproxy homebanking.wsdl All that was done was that the Server added a new element called status to the Javabean. The client (.java) did NOT update the .WSDL file. The client is complaining(see below) about this newly added element status. Is there a way to tell the client NOT to bother about this ? Pls. find the stacktrace below. Pls let me know if you need any further info. Thank you, BR, ~A History: [java] log4j:WARN No appenders could be found for logger ( org.apache.axis.i18n.ProjectResourceBundle). [java] log4j:WARN Please initialize the log4j system properly. [java] AxisFault [java] faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException [java] faultSubcode: [java] faultString: org.xml.sax.SAXException: Invalid element in com.summitsite.wsclient.clientproxy.AccountHistoryInfo - status [java] faultActor: [java] faultNode: [java] faultDetail: [java] { http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid element in com.summitsite.wsclient.clientproxy.AccountHistoryInfo - st atus [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild( BeanDeserializer.java:258) [java] at org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1035) [java] at org.apache.axis.message.SAX2EventRecorder.replay( SAX2EventRecorder.java:165) [java] at org.apache.axis.message.MessageElement.publishToHandler( MessageElement.java:1141) [java] at org.apache.axis.encoding.DeserializerImpl.startElement( DeserializerImpl.java:369) [java] at org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1048) [java] at org.apache.axis.message.SAX2EventRecorder.replay( SAX2EventRecorder.java:165) [java] at org.apache.axis.message.MessageElement.publishToHandler( MessageElement.java:1141) [java] at org.apache.axis.message.RPCElement.deserialize( RPCElement.java:236) [java] at org.apache.axis.message.RPCElement.getParams( RPCElement.java:384) [java] at org.apache.axis.client.Call.invoke(Call.java:2448) [java] at org.apache.axis.client.Call.invoke(Call.java:2347) [java] at org.apache.axis.client.Call.invoke(Call.java:1804) [java] at com.summitsite.wsclient.clientproxy.HomeBankingSoapBindingStub.getAccountHistory (HomeBankingSoapBindingStub.java:688) [java] at HomeBankingClient.getAccountHistory( HomeBankingClient.java:124) [java] at HomeBankingClient.main(HomeBankingClient.java:360) [java] {http://xml.apache.org/axis/}hostname:xp-xx [java] org.xml.sax.SAXException: Invalid element in com.summitsite.wsclient.clientproxy.AccountHistoryInfo - status [java] at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) [java] at org.apache.axis.client.Call.invoke(Call.java:2451) [java] at org.apache.axis.client.Call.invoke(Call.java:2347) [java] at org.apache.axis.client.Call.invoke(Call.java:1804) [java] at com.summitsite.wsclient.clientproxy.HomeBankingSoapBindingStub.getAccountHistory (HomeBankingSoapBindingStub.java:688) [java] at HomeBankingClient.getAccountHistory( HomeBankingClient.java:124) [java] at HomeBankingClient.main(HomeBankingClient.java:360) [java] Caused by: org.xml.sax.SAXException: Invalid element in com.summitsite.wsclient.clientproxy.AccountHistoryInfo - status [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild( BeanDeserializer.java:258) [java] at org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1035) [java] at org.apache.axis.message.SAX2EventRecorder.replay( SAX2EventRecorder.java:165) [java] at org.apache.axis.message.MessageElement.publishToHandler( MessageElement.java:1141) [java] at org.apache.axis.encoding.DeserializerImpl.startElement( DeserializerImpl.java:369) [java] at org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1048) [java] at org.apache.axis.message.SAX2EventRecorder.replay( SAX2EventRecorder.java:165) [java] at org.apache.axis.message.MessageElement.publishToHandler( MessageElement.java:1141) [java] at org.apache.axis.message.RPCElement.deserialize( RPCElement.java:236) [java] at org.apache.axis.message.RPCElement.getParams( RPCElement.java:384) [java] at org.apache.axis.client.Call.invoke(Call.java:2448) [java] ... 5 more -- BR, Anjan Bacchu Summit Information
RE: [Axis2] How to build web service that is invoked via HTTP Post ?
You may just have a POX (plain old XML) service, and not really REST, per se. A RESTful service uses HTTP methods such as POST, GET, PUT and DELETE to achieve the basic CRUD operations (create, read, update, and delete)--you use the appropriate HTTP 'verb' for the appropriate CRUD method. All resources are identified using distinct URIs--use of GET params to identify a resource is discouraged. Otherwise, RESTful services are very much POX. Sun has a good article on REST, and specifically when to use REST vs. SOAP. http://java.sun.com/developer/technicalArticles/WebServices/restful/ (It's JAX-WS, not Axis2, but still informative). This might give you some insight as to whether or not to go with REST, or switch to SOAP. The IBM Developerworks article linked at the bottom of the Axis2 page on REST is also good. REST or POX is a highly simplified way of doing web services--hence the appeal. This you can do just as easily with a simple servlet as with Axis2. The main argument for SOAP, on the other hand, is the support of WS-* standards. Here you really do need a SOAP engine such as Axis2. -Original Message- From: S. Sharif [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 5:22 PM To: axis-user@ws.apache.org Subject: RE: [Axis2] How to build web service that is invoked via HTTP Post ? Thanks for sharing the link with me. I read it; it is brief. I looked through the Axis2 project site, but did not come across any other pages that talked specifically about builing REST web services using Axis2. The wiki section only provides two external links for REST; both links pointed to two very brief articles as well, both of which did not address writting the service-side code for REST in Axis2. This leads me to conclude that Axis2 (even though it supports REST) was mostly designed for building SOAP web services. At this point it seems that the existing web services that I am converting to Java, were developed as REST web services. This means that I have no choice but to keep them as REST web services when I re-build them in Java, so that I don't impact any existing clients that are currently inoking the web services. I am still puzzled as to whether I should use Axis2 or not. What would be the advantage of using Axis2 vs. writing a Java servlet? Currently the web services that I need to convert to Java, do not have a WSDL file, each web service has only one single point of entry (no multiple methods per web service), and each service takes in an xml as input (submitted to the web service via HTTP Post) and it returns an xml as output via HTTP reponse. So I am thinking that I could implement each of these web services as a Java servlet, and the single point of entry for a web service would be the doPost(request, response) method in the Servlet. Then I can retrieve the input xml from the body of the HTTP request using the request.getReader() method. I am not certain how a single point of entry into a web service would be implemented with Axis2. The one example provided on the Axis2 project site shows two methods inside of a web service: echo() and ping(). And how the web service knows which method to call is not clear to me. Though I did notice that the input xml seems to be wrapped in an xml tag that carries the same name as the name of the method that is to be invoked inside of the web service. So maybe that is how it mapps each input xml to each method to be invoked. In any case, I am open to any suggestions on how I should re-build my REST web services in Java. Any help would be very much appreciated. Thanks, -Saladin --- Spies, Brennan [EMAIL PROTECTED] wrote: Have you looked at the REST examples? http://ws.apache.org/axis2/1_1/rest-ws.html Brennan Spies Sr. Programmer Analyst Shared Application Services -Original Message- From: S. Sharif [mailto:[EMAIL PROTECTED] Sent: Thursday, December 07, 2006 11:09 AM To: axis-user@ws.apache.org Subject: [Axis2] How to build web service that is invoked via HTTP Post ? Hi, I am new to building web services in Java, even though I have been using Java for several years mostly in building web applications. I have been assigned the task to replace several web services that were previsouly built using some proprietary software, and re-build them in Java. I have started looking into Axis2 several days ago. But the examples I have tried so far do not seem to work the same way as the web services that I am replacing. I have recenly found out that there is no existing WSDL file for the web services that I am converting to Java, and that these web services are invoked via HTTP Post. The client invokes the web service by passing an xml request to them via HTTP Post and then receives back an xml via HTTP Reponse. So it seems that the SOAP examples on the Axis2 website do not apply to me. Should I still use Axis2 in my situation, or how should I go about building these web
java2wsdl and optional (nillable) method arguments
Using Axis 1.4 here... I'd like my WSDL (generated with Java2WSDL) to represent some of the arguments to some of my methods as optional (nillable). Is this possible, or is this only something one can do by going the other direction--WSDL-to-Java? -dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WS Addressing - Not able to Get MessageID in Response.
Your configuration and trace looks right so I don't know what's gone wrong. Unfortunately there isn't much trace in the WS-Addressing module in 1.0 so determining the problem may be very difficult. I hate to ask but could you try with Axis2 1.1? It contains a lot more trace which might indicate what's going on. Cheers, David On 08/12/06, Sunil Choudhari -X (suchaudh - Satyam at Cisco) [EMAIL PROTECTED] wrote: Hi David, Thanks for response. As per my knowledge addressing module is engaged by default. Find below contents of Console at startup: Dec 7, 2006 4:03:09 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur nNull=true Dec 7, 2006 4:03:11 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Apache\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\Axis2.xml - Deploying module : addressing-1.0 - Deploying module : sandesha2-1.0 - Deploying module : soapmonitor-1.0 Dec 7, 2006 4:03:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Apache\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\balancer.xml Dec 7, 2006 4:03:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Apache\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\manager.xml Looks like addressing-1.0 is engaged at server end Find below axi2.xml: Location: C:\Apache\axis2\webapps\WEB-INF\conf axisconfig name=AxisJava2.0 !-- = -- !-- Parameters -- !-- = -- parameter name=hotdeployment locked=falsetrue/parameter parameter name=hotupdate locked=falsefalse/parameter parameter name=enableMTOM locked=falsefalse/parameter !--During a fault, stacktrace can be sent with the fault message. The following flag will control -- !--that behaviour.-- parameter name=sendStacktraceDetailsWithFaults locked=falsetrue/parameter !--If there aren't any information available to find out the fault reason, we set the message of the expcetion-- !--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -- !--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-- !--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-- parameter name=DrillDownToRootCauseForFaultReason locked=falsefalse/parameter parameter name=userName locked=falseadmin/parameter parameter name=password locked=falseaxis2/parameter !-- If you have a frontend host which exposes this webservice using a different public URL -- !-- use this parameter to override autodetected url -- !--parameter name=httpFrontendHostUrl locked=falsehttps://someotherhost/context/parameter-- !--The way of adding listener to the system-- !--listener class=org.apache.axis2.ObserverIMPL-- !--parameter name=RSS_URL locked=falsehttp://127.0.0.1/rss/parameter-- !--/listener-- !-- = -- !-- Message Receivers -- !-- = -- !--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers for -- !--all the other MEP implement it and add the correct entry to here , so that you can refer from-- !--any operation -- !--Note : You can ovride this for particular service by adding the same element with your requirement-- messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver/ messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /messageReceivers !-- = -- !-- Transport Ins -- !-- = -- transportReceiver name=http class=org.apache.axis2.transport.http.SimpleHTTPServer parameter name=port locked=false6060/parameter !--If you want to give your own host address for EPR generation-- !--uncommet following paramter , and set as you required.-- !--parameter name=hostname locked=falsehttp://myApp.com/ws/parameter-- /transportReceiver !--Uncomment if you want to have SMTP transport support-- !--transportReceiver name=mail class=org.apache.axis2.transport.mail.SimpleMailListener-- !--parameter name=transport.mail.pop3.host locked=false127.0.0.1/parameter-- !--parameter name=transport.mail.pop3.user locked=falseaxis2/parameter-- !--parameter name=transport.mail.pop3.password