Re: [AXIS2C] - problem in coding special signs in server answer
The problem still persists :-) I wanted to open a Jira but I did not know which topic to place it under. Regards, Flori On Thu, 09 Aug 2007 12:04:22 +0200, Dr. Florian Steinborn [EMAIL PROTECTED] wrote: Hi friends, I am sorry but we hit another error. When the server generates a webservice answer that contains special signs like this character is not converted to amp; as expected. Just imagine a company's name like Tools Co. - it would be transferred to the client exactly like this, as you can see in the tcpmon snippet: ns1:mndnameAK Co KG/ns1:mndname The parser on the client side fails as it interpretes as starter of a something; construct and does not expect the as next char after . The WS requests from the client to the server are formatted correctly , ns1:param1amp;amp;amp;/ns1:param1 Thanks for listening and greetings, Flori - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- F. Steinborn [EMAIL PROTECTED] Dr. Brunthaler Industrielle Informationstechnik GmbH Motzstr. 5, D-10777 Berlin Fon: +49.30.215081-0, Fax: +49.30.215081-88 http://www.brunthaler.de Geschäftsführer: Prof. Dr.-Ing. Stefan Brunthaler Sitz der Gesellschaft: Berlin Handelsregister: HRB 27 337 Amtsgericht Charlottenburg -- Wir sind Mitglied des inilog Netzwerks - www.inilog.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SOAP fault builder
Hi Subra, You can create a soap11 fault using following lines. int soap_version = AXIOM_SOAP11; soap_envelope = axiom_soap_envelope_create_default_soap_envelope (env, soap_version); soap_body = axiom_soap_envelope_get_body(soap_envelope, env); soap_fault = axiom_soap_fault_create_default_fault (env, soap_body, fault code , fault reason, soap_version); axis2_msg_ctx_set_fault_soap_envelope(msg_ctx, env, soap_envelope); You can set the fault to the msg_ctx and it will be returned to the client. Regards Nandika On 8/17/07, Subra A Narayanan [EMAIL PROTECTED] wrote: Hello folks, I am trying ti build a SOAP1.1 fault and return to the ws client. I am having some difficulty understanding how to go about this. I have tryng to dig through the source code but was wondering if you guys have some sample code. If you have it that would be very helpful in understanding the usage. In the meantime I will continue to dig through the source code to try to understand. Thanks as usual! Subra -- [EMAIL PROTECTED] WSO2 Inc: http://www.wso2.com
Re: SOAP fault builder
Thanks Nandika. I will give it a shot. Have a good weekend! On 8/17/07, Nandika Jayawardana [EMAIL PROTECTED] wrote: Hi Subra, You can create a soap11 fault using following lines. int soap_version = AXIOM_SOAP11; soap_envelope = axiom_soap_envelope_create_default_soap_envelope (env, soap_version); soap_body = axiom_soap_envelope_get_body(soap_envelope, env); soap_fault = axiom_soap_fault_create_default_fault (env, soap_body, fault code , fault reason , soap_version); axis2_msg_ctx_set_fault_soap_envelope(msg_ctx, env, soap_envelope); You can set the fault to the msg_ctx and it will be returned to the client. Regards Nandika On 8/17/07, Subra A Narayanan [EMAIL PROTECTED] wrote: Hello folks, I am trying ti build a SOAP1.1 fault and return to the ws client. I am having some difficulty understanding how to go about this. I have tryng to dig through the source code but was wondering if you guys have some sample code. If you have it that would be very helpful in understanding the usage. In the meantime I will continue to dig through the source code to try to understand. Thanks as usual! Subra -- [EMAIL PROTECTED] WSO2 Inc: http://www.wso2.com
Re: SOAP fault builder
Hey Nandika, So I tried your suggestion but I have a doubt. I am just modifying the 'math' webservice from the samples folder. The 'add' operation returns a axiom_node_t * on success, which is nothing but the soap message. But I want to return a soap fault from the 'add'operation if lets say one of the parameters was missing from the request or it was a decimal number. If I follow what you asked me to do, what do I return from the add function? I have to return a axiom_node_t *? But from your email I thought you meant that if I set the soap fault to the message context, the soap fault will automatically be returned to the client. I dont understand how do I stop further processing and return a soap fault to the client. So I did some further digging in to the axis code and found this function in axiom_soap_envelope.h: AXIS2_EXTERN axiom_node_t* AXIS2_CALL axiom_soap_envelope_get_base_node(axiom_soap_envelope_t *envelope, constaxutil_env_t *env); so this gives me access to the soap fault message as a axiom_node_t*. And upon error in the 'add' operation, I just return it to the client. Is this the right way to do it? I am missing something here. Now one more important thing. When I call axiom_soap_envelope_get_base_node, it seems to returning a soap1.2 fault message rather than a soap1.1 message even though I set * *soapVersion = AXIOM_SOAP11; Why is that? Is there a way to get soap1.1 fault message? I hope my questions are clear. Thanks so much for your help! Subra On 8/17/07, Subra A Narayanan [EMAIL PROTECTED] wrote: Thanks Nandika. I will give it a shot. Have a good weekend! On 8/17/07, Nandika Jayawardana [EMAIL PROTECTED] wrote: Hi Subra, You can create a soap11 fault using following lines. int soap_version = AXIOM_SOAP11; soap_envelope = axiom_soap_envelope_create_default_soap_envelope (env, soap_version); soap_body = axiom_soap_envelope_get_body(soap_envelope, env); soap_fault = axiom_soap_fault_create_default_fault (env, soap_body, fault code , fault reason , soap_version); axis2_msg_ctx_set_fault_soap_envelope(msg_ctx, env, soap_envelope); You can set the fault to the msg_ctx and it will be returned to the client. Regards Nandika On 8/17/07, Subra A Narayanan [EMAIL PROTECTED] wrote: Hello folks, I am trying ti build a SOAP1.1 fault and return to the ws client. I am having some difficulty understanding how to go about this. I have tryng to dig through the source code but was wondering if you guys have some sample code. If you have it that would be very helpful in understanding the usage. In the meantime I will continue to dig through the source code to try to understand. Thanks as usual! Subra -- [EMAIL PROTECTED] WSO2 Inc: http://www.wso2.com
Re: [Axis2] New to Axis, having problems
Charitha, Thank you very much for your kind help. I think I understand better now! Regards, Brian On 8/16/07, Charitha Kankanamge [EMAIL PROTECTED] wrote: Hello Brian, I was able to invoke your service with ADB(Axis data binding, which is the default code generation mechanism). The generated client and service sources are attached here with. If you are using Eclipse as JAVA IDE, please create a new project from ant build file and run the client through eclipse. You should get the response back. I did the service and client generation using ADB since I'm not much familiar with xmlbeans. Let me know if you face any issues with the attached code. Also, I would recommend you to follow the Axis2 Quick start guide [1] and user guide [2] before trying out axis2 advanced user guide. [1] http://ws.apache.org/axis2/1_3/quickstartguide.html [2]http://ws.apache.org/axis2/1_3/userguide.html regards Charitha Brian Hendrickson wrote: Hi Charitha, Thanks for offering to help. Here is my service. Brian On 8/16/07, *Charitha Kankanamge* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello Brian, Will you be able to send me your service archive? I'll deploy it and write a client to invoke the service. regards Charitha Brian Hendrickson wrote: Hello, I'm trying to create my first Axis2 application and I'm having a problems. I'm creating a simple service that takes a string and echoes it back to the client. I have generated service and client stubs from a wsdl and filled them in as directed in the User's Guide, and the service builds fine, but I can't build the client. I get the following error: compile.src: [javac] Compiling 1 source file to /home/brian/src/echo/build/classes [javac] /home/brian/src/echo/src/echo/Client.java:15: cannot find symbol [javac] symbol : method Echo(echo.Echo ) [javac] location: class echo.EchoServiceStub [javac] EchoResponse res = stub.Echo(req); [javac] ^ [javac] 1 error I am importing the stub that was generated for my client, but it still can't find the method. Can please someone help the problem? I am very new. Thanks Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reference to external schema in wsdl broken
Hello everybody. I'm facing a little problem with the codegen tool in Axis2 1.3 My wsdl file imports a schema, code snippet follows: xsd:schema xmlns=http://www.w3.org/2001/XMLSchema; targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=datatypes.xsd /xsd:include [..] Using the codegen tool provides me with a modified wsdl which looks like.. xsd:schema targetNamespace=http://gueter.evision.de/GueterGUI/; xmlns=http://www.w3.org/2001/XMLSchema; xsd:include schemaLocation=xsd0.xsd /xsd:include [..] The schema has been properly copied into xsd0.xsd. Everything right until I deploy the service.. When getting the wsdl from the running axis2 instance it looks like: xsd:schema attributeFormDefault=unqualified elementFormDefault=unqualified targetNamespace=http://gueter.evision.de/GueterGUI/; xsd:include schemaLocation=GueterGUI?xsd=xsd0/ [...] Using this wsdl one cannot generate code, because the schemaLocation is relative to the service location. (In the codegen process the schema cannot be found) Replacing the last line with an absolute url pointing to the schema fixes that problem. My Question is: What can I do to have the wsdl file sent by the running axis2 instance be able to compile out of the box? Thanks in advance! Jochen Rieß - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing url endpoint
Hello, I'm currently developing a webservice based on Axis. The service URL deployed is normally http://myserver.com/project/MyService. Is there a possibility to change this, so that the service is available at http://myserver.com/MyService. Need assistance. Thank you! Yours, Erwin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Implementing WS from SAP generated WSDL
Unfortunately, I can post you the wsdl. It looks like a standard WSDL that is separated into 3 files, as I mentioned before. I did try to validate the wsdl, there is no error. At least what I see in Eclipse on the bottom right, that eclipse does WSDL validation after that there is no message at all. Steve On 8/17/07, Lahiru Sandakith [EMAIL PROTECTED] wrote: would you be able to post the wsdl, so that we can verify it with the steps that you have followed. Did you tried validating the wsdl through WTP? Thanks Lahiru On 8/17/07, sjtirtha [EMAIL PROTECTED] wrote: Hi, I'm trying to implement WS from SAP generated WSDL. Actually I'm using Eclipse WTP, which is Axis integrated. Special structure of SAP WSDL is that it contains 3 files. One is the service definition, the second is the binding definition, the third is the porttype, datatype, and message definition. The first file imports the second file and the second file import the third file. Eclipse WTP can creates the java skeleton from this SAP WSDL. Than I implemented one of the operation. When I invoke this operation, I get this error: Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. I look into the java classes, all classes are created. So there is no missing classes. Does Axis able to use WSDL file that imports another file ? Steve -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F
Re: Implementing WS from SAP generated WSDL
Unfortunately, I can NOT post you the wsdl I forgot to put NOT in my sentence. Steve On 8/17/07, sjtirtha [EMAIL PROTECTED] wrote: Unfortunately, I can post you the wsdl. It looks like a standard WSDL that is separated into 3 files, as I mentioned before. I did try to validate the wsdl, there is no error. At least what I see in Eclipse on the bottom right, that eclipse does WSDL validation after that there is no message at all. Steve On 8/17/07, Lahiru Sandakith [EMAIL PROTECTED] wrote: would you be able to post the wsdl, so that we can verify it with the steps that you have followed. Did you tried validating the wsdl through WTP? Thanks Lahiru On 8/17/07, sjtirtha [EMAIL PROTECTED] wrote: Hi, I'm trying to implement WS from SAP generated WSDL. Actually I'm using Eclipse WTP, which is Axis integrated. Special structure of SAP WSDL is that it contains 3 files. One is the service definition, the second is the binding definition, the third is the porttype, datatype, and message definition. The first file imports the second file and the second file import the third file. Eclipse WTP can creates the java skeleton from this SAP WSDL. Than I implemented one of the operation. When I invoke this operation, I get this error: Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. I look into the java classes, all classes are created. So there is no missing classes. Does Axis able to use WSDL file that imports another file ? Steve -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F
Re: TypeMapping in Axis
I look into Eclipse plugin, I use Axis 1.3. And I use WST 1.5.4 and JST 1.5.4. I think the wsdlFile works in my case. I just assumed that the integration problem between my WS implementation and WS client was because the different between original WSDL and generated WSDL. That's why I asked how to use the original WSDL. But I found out that that is not the problem. Regards, Steve On 8/17/07, Lahiru Sandakith [EMAIL PROTECTED] wrote: Hi, Please tell us which version of the Axis/Axis2 runtime that you are using inside Eclipse WTP WS Framwork, plus what is the WTP verison that this issue raised. I believe you are using Axis as the runtime not Axis2 in side WTP. AFAIK in Axis you need to edit the deploy.wsdd. wsdlFileyour.wsdl/wsdlFile Then restarting the WS runtime should work. Thanks Lahiru On 8/16/07, sjtirtha [EMAIL PROTECTED] wrote: Hi, I use Eclipse WTP to generate a java skeleton for a Web Service implementation based on the existing WSDL. After creating the java skeleton, I realized that Axis generated a new WSDL that is possibly in run time by the servlet generated. But this generated WSDL is not the same one with the existing WSDL that I used to generate the java skeleton. For example, Axis changes the following datatype from a simpleType into complexType. And when I see into the deploy.wsdd, axis map char8 into a simple String without restriction. It should cause a incompatibility between the the WS Client that is built based on the existing WSDL and the WS implementation that uses the new generated WSDL. How can I set Axis to use always the existing WSDL and not using the generated WSDL. The problem is the WS client communicates with some other WS implementation that use this existing WSDL. xsd:simpleType name=char8 xsd:restriction base=xsd:string xsd:maxLength value= 8/ /xsd:restriction /xsd:simpleType to complexType name=char8 simpleContent extension/ /simpleContent /complexType Regards, Steve -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F
Re: Changing url endpoint
Hi, You can deploy the web application in the root context. How it is done depends on the used application server. For example in Tomcat, http://www.javafaq.nu/news/java-tools-and-performance-tips/deploy-tomcat-apllication-in-root.html For JBoss, http://wiki.jboss.org/wiki/Wiki.jsp?page=SetupARootContextApp Upul On 8/17/07, Erwin Liem [EMAIL PROTECTED] wrote: Hello, I'm currently developing a webservice based on Axis. The service URL deployed is normally http://myserver.com/project/MyService. Is there a possibility to change this, so that the service is available at http://myserver.com/MyService. Need assistance. Thank you! Yours, Erwin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: security processing failed
Thanks, Pavan Madiraju I made new keystores, and sample04 works. But it gave me a another problem. I used those keystores at sample05(only ecription). But it did not work. and then have same error message WSDoAllReceiver: security processing failed Need help again. Thanks. Following is the response from Ruchith Fernando [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Argh ... seems like the certs expired on July 21st :( Please create the client and service keystores as described here : http://wso2.org/library/174 To get around the issue. You can also change the system date and make the example to work. On 8/16/07, *seok* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi I have a problem with using signature item. client : axis2.xml ・ ・ itemsTimestamp Signature/items ・ ・ service : service.xml (tomcat5.5.23) ・ ・ itemsTimestamp Signature/items ・ ・ and I got a error message : WSDoAllReceiver: security processing failed I used sample04 in the rampart1.2. Please Let me know the way to solve this problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending images as Bytes flow
Hi, because I find no documentation to send attachments with AXIS 1.4, I have thought another possibilty, I think that To send image as bytes flow (firslty I convert jpeg in BYTES flow and then send to the other side this Bytes flow) is easiest than to use MIME (attachment), am I wrong??? Thank you in advance -- View this message in context: http://www.nabble.com/Axis-and-Mime-to-send-Images-with-Web-Services-tf4280688.html#a12196946 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.3: Classloading Issue with WEB-INF/lib jars in aar
Hi again, after couple of different packaging experiments and still not working solution, i stepped in a weird situation. My Service now has the following structure: myservice.aar -- META-INF service.xml -- lib lib1.jar lib2.jar lib3.jar lib4.jar -- com my classes here incl. the service impl class The weird situation now is, that if try to load a class included in com inside my service implementation class, with following code, i get still a ClassNotFoundException. ClassLoader loader = getClass().getClassLoader(); Class myclass = Class.forName('classname', true, loader); or even with MessageContext msgCtx = MessageContext.getCurrentMessageContext(); AxisService serviceHandler = msgCtx.getAxisService(); ClassLoader serviceLoader = serviceHandler.getClassLoader(); //Class serviceClass = serviceLoader.loadClass(service); Class serviceClass = Class.forName(service, true, serviceLoader); MyClass srv = (MyClass) serviceClass.newInstance(); still ClassNotFoundException. If i import the class and instatiate it, then everything works fine. The Class i am trying to load with the Classloader doesn't use any class from the jars included in the lib directory. I tried also all the workarounds above with an unpacked aar. Anybody an idea? Periklis Periklis Tsirakidis wrote: Hi, i am currently working on a service, that is deployed in a service archive, as described in the documentation. This service needs access on a library which is located under WEB-INF/lib, due to further usage of this library out of my service. I am using axis 1.3 deployed as a war on a Tomcat 5.5.12. The jar structure of mylib.jar is: mylib.jar -- META-INF MANIFEST.MF -- lib --- ...couple of libs here -- com ...classes in package hierarchy My service archive myservice.aar is located in the WEB-INF/services and i have hotupdate in my axis2.xml configuration enabled. The code i am trying to access classes from the jar file in my service implementation class is following: MessageContext msgCtx = MessageContext.getCurrentMessageContext(); AxisService serviceHandler = msgCtx.getAxisService(); ClassLoader serviceLoader = serviceHandler.getClassLoader(); //Class serviceClass = serviceLoader.loadClass(service); Class serviceClass = Class.forName(service, true, serviceLoader); MyClass srv = (MyClass) serviceClass.newInstance(); The deployment of the service is working fine, but when i call some function of my service implementation class that itselfs needs an instance of the mylib.jar i get a ClassNotFoundException. I have tried also the setOperationContext way, but as i read in the mailing list, this way is not thread safe. Has anybody an idea? Thanks in advance. Periklis - 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.3: Classloading Issue with WEB-INF/lib jars in aar
I noticed that my topic is referring to Axis 1.3, but i meant Axis2 1.3. Periklis Periklis Tsirakidis wrote: Hi again, after couple of different packaging experiments and still not working solution, i stepped in a weird situation. My Service now has the following structure: myservice.aar -- META-INF service.xml -- lib lib1.jar lib2.jar lib3.jar lib4.jar -- com my classes here incl. the service impl class The weird situation now is, that if try to load a class included in com inside my service implementation class, with following code, i get still a ClassNotFoundException. ClassLoader loader = getClass().getClassLoader(); Class myclass = Class.forName('classname', true, loader); or even with MessageContext msgCtx = MessageContext.getCurrentMessageContext(); AxisService serviceHandler = msgCtx.getAxisService(); ClassLoader serviceLoader = serviceHandler.getClassLoader(); //Class serviceClass = serviceLoader.loadClass(service); Class serviceClass = Class.forName(service, true, serviceLoader); MyClass srv = (MyClass) serviceClass.newInstance(); still ClassNotFoundException. If i import the class and instatiate it, then everything works fine. The Class i am trying to load with the Classloader doesn't use any class from the jars included in the lib directory. I tried also all the workarounds above with an unpacked aar. Anybody an idea? Periklis Periklis Tsirakidis wrote: Hi, i am currently working on a service, that is deployed in a service archive, as described in the documentation. This service needs access on a library which is located under WEB-INF/lib, due to further usage of this library out of my service. I am using axis 1.3 deployed as a war on a Tomcat 5.5.12. The jar structure of mylib.jar is: mylib.jar -- META-INF MANIFEST.MF -- lib --- ...couple of libs here -- com ...classes in package hierarchy My service archive myservice.aar is located in the WEB-INF/services and i have hotupdate in my axis2.xml configuration enabled. The code i am trying to access classes from the jar file in my service implementation class is following: MessageContext msgCtx = MessageContext.getCurrentMessageContext(); AxisService serviceHandler = msgCtx.getAxisService(); ClassLoader serviceLoader = serviceHandler.getClassLoader(); //Class serviceClass = serviceLoader.loadClass(service); Class serviceClass = Class.forName(service, true, serviceLoader); MyClass srv = (MyClass) serviceClass.newInstance(); The deployment of the service is working fine, but when i call some function of my service implementation class that itselfs needs an instance of the mylib.jar i get a ClassNotFoundException. I have tried also the setOperationContext way, but as i read in the mailing list, this way is not thread safe. Has anybody an idea? Thanks in advance. Periklis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need advice
I can only help you with Axis1, not Axis2. Also, my web services are more JAX-RPC oriented, not too much Axis oriented. Still, in your implementation class, implement the javax.xml.rpc.server.ServiceLifecycle interface. That's two new methods, init() and destroy(). The init() will be passed an Object, that is your uncasted context. Cast it to a javax.xml.rpc.server.ServletEndpointContext and store it in an instance variable for later use. Now, you essentially have a reference to the ServletContext. I hope the above also works in Axis2. -jeff _ From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 11:58 PM To: axis-user@ws.apache.org Subject: Re: Need advice On 8/16/07, mchmiel [EMAIL PROTECTED] wrote: I am affraid that i will need to access the Servet conext from Webservice and is not easy. I have maneged to looked through such combination (correct me if I am wrong) please see this http://wso2.org/library/480 first i cache my JDOM tree and load it into context (autostart servlet) then I establish a connection from .NET ASP page which communicates to my Axis (Axis2) webservice (7 methods) (complex objects in/out) The Axis Webservice calls a SOAP aware servet (which uses JAXM ) to decode the SOAP request calls the funkcjionality on stored in servet context model, get the response encode it to SOAP and send it back to Axis (Axis2) webservis which returns the output to ASP. NET. I can not understand why you need Axis2 call for another Soap aware servlet. What you should do is (as I understood) either. 1. call ASP directly to SOAP aware servlet 2. Axis2 web service directly calls to jdom structure stored in Servlet Context. What do You think is this possible ?? I think that Axis Should prepare itself to cooperate with Servlets and JSP ... this is the part of J2EE. :-) yes. In an axis2 web service you can directly access the servlet context as given in the above artical. Amila Suriarachchi pisze: can you access the ServletConfiguration using the http request object if so you can get the request object, When creating messageContext Axis2 store the request and response objects in message Context msgContext.setProperty (HTTPConstants.MC_HTTP_SERVLETREQUEST, request); msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, response); so Inyour web service you can access it through MessageContext.getCurrentMessageContext ().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); But I think the correct way is to store the ServletContext in AxisConfigurationContext. I'll send a mail to developer list regarding this. Amila. On 8/16/07, *mchmiel* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I need to integrate a .NET platform and Java and for this task I have choosen WebServices. First technology for the Java part was ofcourse Axis. But then I had to redesign the whole thing becouse of the caching problem . Here is the explanation: 1. I have a MemoryModel (a JDOM tree) which has to be loaded as the Tomcat AppServer is stertin 2. I need to implement a WS taht manages the resourse (MemoryModel) 3. Then the next WebService allows users to invoke read/write operations on the first Ws that manages the MemoryModel First of all cannot find how to preload webservice, and second issue how to share a complex Object between WebServices (inside the same WebApp) I started from teh beggining and using servlets I could managed to do so ... that is. 1. PreLoad the servlet 2. Write a caching servlet and register the MemeoryModel in ServeltContext 3. Write a Servlet that could (pretend to be a WS) 4, the last task is extreamly hard I looked throuh
How to turn on logging
Hi, all, I am trying to developing a client for jaxws-calculator example, I got an exception as following, it seems like the NullPointerException thrown from this code block in file JAXBWrapperToolImpl.java: so from this code, the propInfo object is null, which is not checked, I like to turn on the log to see the childName, so I can check my wsdl file, my question is how to turn on the log? Thanks David for (String childName : childNames) { PropertyDescriptorPlus propInfo = pdMap.get(childName); Object value = childObjects.get(childName); try { propInfo.set(jaxbObject, value); } catch (Throwable t) { if (log.isDebugEnabled()) { log.debug(An exception + t.getClass() + occurred while trying to call set() on + propInfo); log.debug(The corresponding xml child name is: + childName); String name = (value == null) ? null : value.getClass().getName(); log.debug(The corresponding value object is: + name); } throw new JAXBWrapperException(t); } } client: [java] Retrieving document at 'http://localhost:8080/axis2/services/CalculatorService?wsdl'. [java] Aug 17, 2007 10:23:33 AM org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl buildAxisServiceFromWSDL [java] INFO: Building AxisService from wsdl: http://localhost:8080/axis2/services/CalculatorService?wsdl [java] value1=[10] value2=[15] [java] Exception in thread main javax.xml.ws.WebServiceException: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: java.lang.NullPointerException [java]at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(Except ionFactory.java:172) [java]at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio nFactory.java:67) [java]at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio nFactory.java:125) [java]at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedPlusMethodMarsha ller.marshalRequest(DocLitWrappedPlusMethodMarshaller.java:671) [java]at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createRequest(JAXW SProxyHandler.java:328) [java]at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JA XWSProxyHandler.java:159) [java]at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyH andler.java:141) [java]at $Proxy9.add(Unknown Source) [java]at org.apache.axis2.jaxws.calculator.Client.main(Client.java:27) [java] Caused by: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: java.lang.NullPointerException [java]at org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl.wrap(JAXBWrapper ToolImpl.java:155) [java]at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedPlusMethodMarsha ller.marshalRequest(DocLitWrappedPlusMethodMarshaller.java:637) [java]... 5 more [java] Caused by: java.lang.NullPointerException [java]at org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl.wrap(JAXBWrapper ToolImpl.java:145) [java]... 6 more [java] Java Result: 1
Re: [Axis2]https server problem
Does it seem reasonable to believe that my certificate is installed correctly since no error occurs before reaching AxisServlet? If there was a certificate problem, I'd get an error related to that sooner, wouldn't I? Is there anything that Axis2 does differently between http and https? Andrew Andrew Martin wrote: When I invoke my service via https, a NullPointerException occurs in org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContext before my own service code is invoked. The line is: TransportListener listener = msgContext.getTransportIn().getReceiver(); getTransportIn() seems to be returning null. It works via http, though. I'm using Tomcat 4.1.30 and Axis2 1.2. Could this be caused by a mistake in one of my configuration files? Or is there something that I might be doing my initialization service that runs at startup which would cause problems for later service calls? Here's the complete stack trace: Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContext(InstanceDispatcher.java:123) at org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java:70) at org.apache.axis2.engine.Phase.invoke(Phase.java:383) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:131) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116) ... 33 more -- Andrew Martin Computer Programmer Regenstrief Institute, Inc. 410 West 10th Street, Suite
WSDL2Java is not creating the classes!
Hi, I'm following the documentation in http://ws.apache.org/wss4j/axis.html . And I'm successful in setting up Axis 1.2/. I have installed WSS4J and have created and deployed the service (stock-wss-01). In the step which talks about Creating the Client the doc says : Use WSDL2Java to generate the client service bindings: java org.apache.axis.wsdl.WSDL2Java -o . -Nhttp://fox:8080/axis/services/stock-wss-01 samples.stock.client http://fox:8080/axis/services/stock-wss-01?wsdl A bunch of java classes will be created under samples/stock/client, including the StockQuoteServiceServiceLocator. I guess the url should have localhost (instead of fox). When I execute this command, the class are not getting created. Though the java source files are created inside the samples/stock/client directory. Am I missing anything? My class path is this : CLASSPATH=.;C:\MyServlets;C:\Program Files\Apache Software Foundation\Tomcat 5.5 \common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5 .5\common\lib\jsp- api.jar;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;C:\Pro gram Files\Java\jre1.5.0_12\lib\ext\QTJava.zip;C:\axis\lib\axis.jar;C:\axis\lib\ commons-discovery-0.2.jar;C:\axis\lib\commons-logging-1.0.4.jar;C:\axis\lib\jaxr pc.jar;C:\axis\lib\saaj.jar;C:\axis\lib\log4j-1.2.8.jar;C:\axis\lib\xml-apis.jar ;C:\axis\lib\xerces.jar;C:\axis\lib\activation.jar;C:\axis\lib\wsdl4j-1.5.1.jar; C:\axis;C:\axis\lib\log4j.properties; Any pointers on this would be highly appreciated. -- View this message in context: http://www.nabble.com/WSDL2Java-is-not-creating-the-classes%21-tf4286366.html#a12201527 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about jaxws-calculator
Hi, all, In the jaxws-calculator example, the CalculatorService has a webservice method: int add(int value1, int value2), then we have class Add and class AddResponse, if this is the case, why do we need Add and AddResponse classes for the service? Should we change the webservice method to: AddResponse add( Add add); In this way we set value1 and value2 to Add object and set return value in AddResponse object, otherwise the Add and AddResponse do not make sense to have them in the webservice. Anybody can explain? Thanks in advance. David
Re: [Axis2]https server problem
I just noticed that an error is being written to a log file that I didn't know about whenever this error happens. I don't know what it means, though. Here it is: ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp] java.lang.IllegalStateException at org.apache.coyote.Response.reset(Response.java:340) at org.apache.coyote.tomcat4.CoyoteResponse.reset(CoyoteResponse.java:628) at org.apache.coyote.tomcat4.CoyoteResponse.reset(CoyoteResponse.java:824) at org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.java:413) at org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:327) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:181) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Andrew Andrew Martin wrote: I've tried disabling my initialization service, but I still have the same problem. So I think it must be a problem with my configuration. Does anyone know of something I could be doing in my configuration files that would cause this? Andrew Andrew Martin wrote: Does it seem reasonable to believe that my certificate is installed correctly since no error occurs before reaching AxisServlet? If there was a certificate problem, I'd get an error related to that sooner, wouldn't I? Is there anything that Axis2 does differently between http and https? Andrew Andrew Martin wrote: When I invoke my service via https, a NullPointerException occurs in org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContext before my own service code is invoked. The line is: TransportListener listener = msgContext.getTransportIn().getReceiver(); getTransportIn() seems to be returning null. It works via http, though. I'm using Tomcat 4.1.30 and Axis2 1.2. Could this be caused by a mistake in one of my configuration files? Or is there something that I might be doing my initialization service that runs at startup which would cause problems for later service calls? Here's the complete stack trace: Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
Re: [Axis2]https server problem
I've tried disabling my initialization service, but I still have the same problem. So I think it must be a problem with my configuration. Does anyone know of something I could be doing in my configuration files that would cause this? Andrew Andrew Martin wrote: Does it seem reasonable to believe that my certificate is installed correctly since no error occurs before reaching AxisServlet? If there was a certificate problem, I'd get an error related to that sooner, wouldn't I? Is there anything that Axis2 does differently between http and https? Andrew Andrew Martin wrote: When I invoke my service via https, a NullPointerException occurs in org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContext before my own service code is invoked. The line is: TransportListener listener = msgContext.getTransportIn().getReceiver(); getTransportIn() seems to be returning null. It works via http, though. I'm using Tomcat 4.1.30 and Axis2 1.2. Could this be caused by a mistake in one of my configuration files? Or is there something that I might be doing my initialization service that runs at startup which would cause problems for later service calls? Here's the complete stack trace: Exception: org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContext(InstanceDispatcher.java:123) at org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java:70) at org.apache.axis2.engine.Phase.invoke(Phase.java:383) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:131) at
RE: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3 Vs Axis 2 code generation
Hi Amila, I'm currently using Axis2 1.3 version, is this bug fixed in that or do I need to get nightly build for the fix. And what is the fix? If I define a parameter type as xsd:anyType in my WSDL, does WSDL2Java convert it as java.lang.Object in the generated sources or does it convert to org.apache.axiom.om.OMElement? Thanks Raghu From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 9:36 PM To: axis-user@ws.apache.org Subject: Re: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3 Vs Axis 2 code generation this is a bug in Axis2. It has fixed in the trunk. please have a look at with a nightly build. On 8/11/07, Raghu Upadhyayula [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, In my webservices, I have a method which has a parameter defined as type=xsd:anyType in the WSDL. In Axis 1.3, when I did WSDL2Java for my WSDL that parameter got converted to java.lang.Object. But in Axis2 1.2, when I did WSDL2Java for the same WSDL, that parameter got converted to org.apache.axiom.om.OMElement. My question is, if I need to pass a Java Object to my webservice method, how do I convert it to OMElement and pass it to the method from the client code how do I convert OMElement back to java.lang.Object in my server code? Thanks Raghu -- Amila Suriarachchi, WSO2 Inc.
RE: WSDL2Java is not creating the classes!
Hi Krithika, Your email is confusing to me. In your email subject you said that WSDL2Java is not creating the classes and below in your email body, you are also saying that Though the java source files are created inside the samples/stock/client directory. Am I missing anything? The java files are getting created right? So what is the issue here? Can you explain it in detail. Thanks Raghu -Original Message- From: Krithika [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 8:19 AM To: axis-user@ws.apache.org Subject: WSDL2Java is not creating the classes! Hi, I'm following the documentation in http://ws.apache.org/wss4j/axis.html . And I'm successful in setting up Axis 1.2/. I have installed WSS4J and have created and deployed the service (stock-wss-01). In the step which talks about Creating the Client the doc says : Use WSDL2Java to generate the client service bindings: java org.apache.axis.wsdl.WSDL2Java -o . -Nhttp://fox:8080/axis/services/stock-wss-01 samples.stock.client http://fox:8080/axis/services/stock-wss-01?wsdl A bunch of java classes will be created under samples/stock/client, including the StockQuoteServiceServiceLocator. I guess the url should have localhost (instead of fox). When I execute this command, the class are not getting created. Though the java source files are created inside the samples/stock/client directory. Am I missing anything? My class path is this : CLASSPATH=.;C:\MyServlets;C:\Program Files\Apache Software Foundation\Tomcat 5.5 \common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5 .5\common\lib\jsp- api.jar;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;C:\Pro gram Files\Java\jre1.5.0_12\lib\ext\QTJava.zip;C:\axis\lib\axis.jar;C:\axis\l ib\ commons-discovery-0.2.jar;C:\axis\lib\commons-logging-1.0.4.jar;C:\axis\ lib\jaxr pc.jar;C:\axis\lib\saaj.jar;C:\axis\lib\log4j-1.2.8.jar;C:\axis\lib\xml- apis.jar ;C:\axis\lib\xerces.jar;C:\axis\lib\activation.jar;C:\axis\lib\wsdl4j-1. 5.1.jar; C:\axis;C:\axis\lib\log4j.properties; Any pointers on this would be highly appreciated. -- View this message in context: http://www.nabble.com/WSDL2Java-is-not-creating-the-classes%21-tf4286366 .html#a12201527 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WSDL2Java is not creating the classes!
Hi Raghu, Thanks. I managed to get it working just after I sent this email. My issue was that the source files were getting created but they weren't complied automatically. I realised that the wsdl2java tool actually places both the .java and .class files in a different directory. (samples/samples/stock/client, instead of samples/stock/client). Thanks, Krithika Raghu Upadhyayula wrote: Hi Krithika, Your email is confusing to me. In your email subject you said that WSDL2Java is not creating the classes and below in your email body, you are also saying that Though the java source files are created inside the samples/stock/client directory. Am I missing anything? The java files are getting created right? So what is the issue here? Can you explain it in detail. Thanks Raghu -Original Message- From: Krithika [mailto:[EMAIL PROTECTED] Sent: Friday, August 17, 2007 8:19 AM To: axis-user@ws.apache.org Subject: WSDL2Java is not creating the classes! Hi, I'm following the documentation in http://ws.apache.org/wss4j/axis.html . And I'm successful in setting up Axis 1.2/. I have installed WSS4J and have created and deployed the service (stock-wss-01). In the step which talks about Creating the Client the doc says : Use WSDL2Java to generate the client service bindings: java org.apache.axis.wsdl.WSDL2Java -o . -Nhttp://fox:8080/axis/services/stock-wss-01 samples.stock.client http://fox:8080/axis/services/stock-wss-01?wsdl A bunch of java classes will be created under samples/stock/client, including the StockQuoteServiceServiceLocator. I guess the url should have localhost (instead of fox). When I execute this command, the class are not getting created. Though the java source files are created inside the samples/stock/client directory. Am I missing anything? My class path is this : CLASSPATH=.;C:\MyServlets;C:\Program Files\Apache Software Foundation\Tomcat 5.5 \common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5 .5\common\lib\jsp- api.jar;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;C:\Pro gram Files\Java\jre1.5.0_12\lib\ext\QTJava.zip;C:\axis\lib\axis.jar;C:\axis\l ib\ commons-discovery-0.2.jar;C:\axis\lib\commons-logging-1.0.4.jar;C:\axis\ lib\jaxr pc.jar;C:\axis\lib\saaj.jar;C:\axis\lib\log4j-1.2.8.jar;C:\axis\lib\xml- apis.jar ;C:\axis\lib\xerces.jar;C:\axis\lib\activation.jar;C:\axis\lib\wsdl4j-1. 5.1.jar; C:\axis;C:\axis\lib\log4j.properties; Any pointers on this would be highly appreciated. -- View this message in context: http://www.nabble.com/WSDL2Java-is-not-creating-the-classes%21-tf4286366 .html#a12201527 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/WSDL2Java-is-not-creating-the-classes%21-tf4286366.html#a12204418 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Originating IP Address
Hello, I have a multiple IP addresses on my deployment computer and bind Tomcat to one of the virtual IP addresses (server.xml file address attribute for Http Connector). This setting defines the inbound routing: only the virtual IP address destined traffic gets to Tomcat. However any traffic originating from my axis2 application deployed on Tomcat has the originating IP address of physical IP address of my deployment computer and not the virtual IP address. Does anyone know how to configure the originating IP address of the outbound traffic to be that of the virtual IP address? Thanks, Swavek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BeanUtil Potentials
Hi, i am trying to figure out how powerful the BeanUtil is and read couple of articles on the net, as well as the article on wso2.org. The BeanUtil class is as far as i understood the api from the java-docs able to create an OMElement from a bean and also deserialize an OMElement to Bean. Unfortunately i found only examples where the beans are quite simple with properties of the set of primitives datatypes. Is BeanUtil then also able to handle a nested object structure like this: Sheet (Sheet.java) --- name --- date --- List of Sections (Section.java) - Section 1 List of Positions (Position.java) . . . - Section n If not, what i assume, what is the best practice with axis to expose such a bean in a service? Let's say a fictive service exposes to functions that get Sheets as parameters and return again sheets back. It should work on an tomcat 5.5 with axis2 1.3. periklis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
web service libraries in C++
Hi All, I am searching for a AXIS-like library implemented in C++ (My application is in C++). Ideally, it will supports web services standards like SOAP/WSDL et cetera (just like AXIS), and is available in different platforms like windows, linux and unix. If anyone knows of such a library, would you please let me know? If you know of several, your opinions on them are also much appreciated. Thanks much in advance. Frank Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use Log4j in own axis2 service?
Hello everybody, I've deployed a simple web service that uses the log4j library for the logging. I want everything from this service written into a single logfile. My service .aar has the following structure: --service.aar log4j.properties de.evision. (class files are here) lib --log4j.jar --(other libs) The Service works fine, but no log output is written. My log4j properties file looks like: # log4j.rootLogger=DEBUG, file log4j.logger.de.evision=DEBUG, file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.datePattern='.'-MM-dd log4j.appender.file.file=/tmp/mylogfile.log log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n I've tried several file locations, using the exact same log4j configuration works for a servlet running inside the tomcat container which also holds axis2. I've tried it with and without the rootLogger set to Debug/file.. Any suggestions? Thanks for your time, Jochen Rieß - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jaxws-calculator client exception
Hi, all, I am trying to develop a client for the original jaxws-calculator example in axis2-1.2 release, the following is the client code, after I deployed the jaxws-calculator, I can see the service in the admin service list page and I can see the wsdl file when I clicked on the calculatorService, but when I ran my client, I got an exception, the client code and the exception are shown below: Any ideas? Thanks in advance David public static void main(String[] args) { Service svc; try { svc = Service.create(new URL(http://localhost:8080/axis2/services/CalculatorService?wsdl;), new QName(http://calculator.jaxws.axis2.apache.org;, CalculatorService)); Calculator proxy = svc.getPort(new QName( http://calculator.jaxws.axis2.apache.org;, Calculator), Calculator.class); int value1 = 10; int value2 = 20; System.out.println(value1=[+value1+] value2=[+value2+]); int b = proxy.add(value1, value2); System.out.println(Result: b==[+b+]); } catch (MalformedURLException e) { e.printStackTrace(); } } [java] Exception in thread main javax.xml.ws.WebServiceException: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope [java]at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(Except ionFactory.java:172) [java]at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio nFactory.java:67) [java]at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio nFactory.java:125) [java]at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute( AxisInvocationController.java:571) [java]at org.apache.axis2.jaxws.core.controller.AxisInvocationController.doInvoke (AxisInvocationController.java:109) [java]at org.apache.axis2.jaxws.core.controller.InvocationController.invoke(Invoc ationController.java:98) [java]at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JA XWSProxyHandler.java:278) [java]at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyH andler.java:141) [java]at $Proxy9.add(Unknown Source) [java]at org.apache.axis2.jaxws.calculator.Client.main(Client.java:25) [java] Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(St AXSOAPModelBuilder.java:221) [java]at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement( StAXSOAPModelBuilder.java:179) [java]at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1 35) [java]at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope( StAXSOAPModelBuilder.java:163) [java]at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.init(StAXSOAPM odelBuilder.java:111) [java]at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474 ) [java]at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti ls.java:142) [java]at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti ls.java:77) [java]at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:356) [java]at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:294) [java]at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute( AxisInvocationController.java:566) [java]... 6 more [java] Java Result: 1
Re: web service libraries in C++
We have used gsoap for a scientific C++ app. The documentation is very good. Our app runs on Solaris and Windows(using mingw). Our gsoap client talks to an Axis java web service. It was ahead of AxisCpp when we investigated packages. http://www.cs.fsu.edu/~engelen/soap.html On 8/17/07, Frank Zhou [EMAIL PROTECTED] wrote: Hi All, I am searching for a AXIS-like library implemented in C++ (My application is in C++). Ideally, it will supports web services standards like SOAP/WSDL et cetera (just like AXIS), and is available in different platforms like windows, linux and unix. If anyone knows of such a library, would you please let me know? If you know of several, your opinions on them are also much appreciated. Thanks much in advance. Frank Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]