Re: Urgent: Specifying scope in Axis2c
Subra A Narayanan wrote: thanks samisa. where would i store such a flag? service group context like in the add.c example from sg_math service? Nop, if you do that, I think you will get the same problem again. I think you may have to use a database to do that. Savan module, the WS-Eventing module, came across such a problem and used sqlite. Can someone please explain how it was done in Savan? In the mean time, the matter is discussed on dev list, and would have a solution for this. Thanks, Samisa... On 10/11/07, *Samisa Abeysinghe* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Subra A Narayanan wrote: Hello everyone, I have run in to an issue which I can't seem to figure out. In my init method in the service skeleton I call the initialization routine of one of the libraries that my web service uses. I notice in my logs that the library initialization function is being called 8 times. This corresponds to the number of apache processes that are running. This is a problem yet to be solved in Axis2/C. See http://damithakumarage.wordpress.com/2007/09/23/an-axis2-c-design-issue/. This is a pending issue that needs to be fixed. The workaround for the time being would be to use some persistent storage to keep a flag and call the init routine based on the flag value. Samisa... This is causing a lot of issues because I was under the impression that my web service init function is called only once when the first request comes in. My library sets up some resources which I want to share among all processes. Can this be done? In Axis2/Java there is a way to specify scope for the webservice (request, session, application) in the services.xml file? can something similar be done in Axis2/c? I took a look at the axis2c code and saw that there is an enum called axis2_scope defined. Is it used for the same purpose as in Axis2/Java? Thanks for any help. Subra -- Samisa Abeysinghe : WSO2 WSF/PHP http://wso2.org/projects/wsf/php?WSO2nbsp;Webnbsp;Servicesnbsp;Framework%2FPHPnbsp;-nbsp;Opennbsp;sourcenbsp;PHPnbsp;extentionnbsp;fornbsp;providingnbsp;andnbsp;consumingnbsp;Webnbsp;servicesnbsp;innbsp;PHP http://wso2.org/projects/wsf/php?WSO2nbsp;Webnbsp;Servicesnbsp;Framework%2FPHPnbsp;-nbsp;Opennbsp;sourcenbsp;PHPnbsp;extentionnbsp;fornbsp;providingnbsp;andnbsp;consumingnbsp;Webnbsp;servicesnbsp;innbsp;PHP - To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Samisa Abeysinghe : WSO2 WSF/PHP http://wso2.org/projects/wsf/php?WSO2nbsp;Webnbsp;Servicesnbsp;Framework%2FPHPnbsp;-nbsp;Opennbsp;sourcenbsp;PHPnbsp;extentionnbsp;fornbsp;providingnbsp;andnbsp;consumingnbsp;Webnbsp;servicesnbsp;innbsp;PHP; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: re[4]: the problem of enabling MTOM in web service client in AXIS2/C
Hi Yong, I thought your service is generated from WSDL2Java for the soap1.1 port. If that is what actually happened you may need to regenerate the service with the desired port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Dimuthu, Currently the web service client is written using AXIS2/C 1.0 while the web service is written using AXIS2/JAVA 1.2. I didn't use the generated code from the wsdl. What I have done is to change the soap version from 1.2 to 1.1. Then it works. But I set the soap version to 1.2, it doesn't work even if the wsdl shows that it supports SOAP 1.2. best regards yong Hi, It seems you have are working on the generated code from the wsdl. In WSDL2Java you can provide the port name with -pn option. So regenerate the code with the port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Sahan, Thank you very much for your reply. When I set the soap version to 1.1, it works fine. Currently I wrote the web service using AXIS2/JAVA 1.2 and the generated wsdl has three ports, HTTP PORT, SOAP1.1, SOAP1.2. That means the web service server also supports SOAP1.2. The question is that it also should work if I set the soap version to 1.2 in client size. Is my understanding right? How can enable the server support SOAP 1.2? best regards yong Hi yong, In [1] the start-info is application/soap+xml (not application/xop+xml) and in [3] it is text/xml. If the request from Axis2/Java 1.2 works, then my guess is the server requires SOAP 1.1 and Axis2/C sends SOAP 1.2 by default. Try setting soap version to 1.1 by adding axis2_options_set_soap_version(options, env, AXIOM_SOAP11); to your client code (have a look at samples/user_guide/clients/echo_blocking_soap11.c) Thanks -sahan On 10/11/07, Yong Yang [EMAIL PROTECTED] wrote: Hi everyone, I wrote a web service client test case using AXIS2/C 1.0 to access a simple web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact. I got one exception(see [1] and [2]). Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Is there any API to set the start-info? if not, how can I solve this issue? Many thanks in advance. best regards yong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yong Yang Contact Details: Querix (UK) - 50, The Avenue, SO17 1XQ, Southampton, UK, Tel+44 2380 232345 Fax: +44 2380 399 685 Querix(US) - 8174 S. Holly Street, #225, Centennial, CO 80122-4004, USA, Tel: +1 1-866-732-0389 _ QUERIX (UK) Ltd. with registered offices at 5 St. Denys, Portswood Southampton SO2 16N UK Registration Number: 2984439 _ Contact: Company: ContactID: 2817 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays
Kumar, Can you please try the latest code in SVN and see what you get? If the problem persists with latest code, open a JIRA and attach WSDL (as simplified as possible). Without my able to recreate the problem there will be no fix, so do not open a JIRA if you cannot attach WSDL. Nadir K. Amra Kumar.Rajeev [EMAIL PROTECTED] wrote on 10/12/2007 11:54:00 AM: I get following error while using axis C++ for generating C++ stubs. Any help on this will be highly appreciated. C:\axisC++\lib\axisjava org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -lc++ -sserver -oserver http://nydebl1:8097/wsdl/629/2007/adm/adm.wsdl java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils. getClassNameFromParamInfoConsideringArrays(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.literal.WrapWriter. writeMethodInWrapper(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.WrapWriter.writeMethods(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter.writeSource(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.Generator.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WebServiceGeneratorImpl.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source) Code generation failed. Please see errors above. -- View this message in context: http://www.nabble.com/java.lang. NullPointerException-at-org.apache.axis.wsdl.wsdl2ws.WrapperUtils. getClassNameFromParamInfoConsideringArrays-tf4614192.html#a13177046 Sent from the Axis - C++ - User mailing list archive at Nabble.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: re[4]: the problem of enabling MTOM in web service client in AXIS2/C
Hi Dimuthu, Thanks for your reply. The web services that I wrote are POJO web services. Then I deploy them into TOMCAT+AXIS2/JAVA 1.2. best regards yong On 10/12/07, Dimuthu Gamage [EMAIL PROTECTED] wrote: Hi Yong, I thought your service is generated from WSDL2Java for the soap1.1 port. If that is what actually happened you may need to regenerate the service with the desired port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Dimuthu, Currently the web service client is written using AXIS2/C 1.0 while the web service is written using AXIS2/JAVA 1.2. I didn't use the generated code from the wsdl. What I have done is to change the soap version from 1.2 to 1.1. Then it works. But I set the soap version to 1.2, it doesn't work even if the wsdl shows that it supports SOAP 1.2. best regards yong Hi, It seems you have are working on the generated code from the wsdl. In WSDL2Java you can provide the port name with -pn option. So regenerate the code with the port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Sahan, Thank you very much for your reply. When I set the soap version to 1.1, it works fine. Currently I wrote the web service using AXIS2/JAVA 1.2 and the generated wsdl has three ports, HTTP PORT, SOAP1.1, SOAP1.2. That means the web service server also supports SOAP1.2. The question is that it also should work if I set the soap version to 1.2 in client size. Is my understanding right? How can enable the server support SOAP 1.2? best regards yong Hi yong, In [1] the start-info is application/soap+xml (not application/xop+xml) and in [3] it is text/xml. If the request from Axis2/Java 1.2 works, then my guess is the server requires SOAP 1.1 and Axis2/C sends SOAP 1.2 by default. Try setting soap version to 1.1 by adding axis2_options_set_soap_version(options, env, AXIOM_SOAP11); to your client code (have a look at samples/user_guide/clients/echo_blocking_soap11.c) Thanks -sahan On 10/11/07, Yong Yang [EMAIL PROTECTED] wrote: Hi everyone, I wrote a web service client test case using AXIS2/C 1.0 to access a simple web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact. I got one exception(see [1] and [2]). Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Is there any API to set the start-info? if not, how can I solve this issue? Many thanks in advance. best regards yong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yong Yang Contact Details: Querix (UK) - 50, The Avenue, SO17 1XQ, Southampton, UK, Tel+44 2380 232345 Fax: +44 2380 399 685 Querix(US) - 8174 S. Holly Street, #225, Centennial, CO 80122-4004, USA, Tel: +1 1-866-732-0389 _ QUERIX (UK) Ltd. with registered offices at 5 St. Denys, Portswood Southampton SO2 16N UK Registration Number: 2984439 _ Contact: Company: ContactID: 2817 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re[4]: the problem of enabling MTOM in web service client in AXIS2/C
Hi Dimuthu, Currently the web service client is written using AXIS2/C 1.0 while the web service is written using AXIS2/JAVA 1.2. I didn't use the generated code from the wsdl. What I have done is to change the soap version from 1.2 to 1.1. Then it works. But I set the soap version to 1.2, it doesn't work even if the wsdl shows that it supports SOAP 1.2. best regards yong Hi, It seems you have are working on the generated code from the wsdl. In WSDL2Java you can provide the port name with -pn option. So regenerate the code with the port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Sahan, Thank you very much for your reply. When I set the soap version to 1.1, it works fine. Currently I wrote the web service using AXIS2/JAVA 1.2 and the generated wsdl has three ports, HTTP PORT, SOAP1.1, SOAP1.2. That means the web service server also supports SOAP1.2. The question is that it also should work if I set the soap version to 1.2 in client size. Is my understanding right? How can enable the server support SOAP 1.2? best regards yong Hi yong, In [1] the start-info is application/soap+xml (not application/xop+xml) and in [3] it is text/xml. If the request from Axis2/Java 1.2 works, then my guess is the server requires SOAP 1.1 and Axis2/C sends SOAP 1.2 by default. Try setting soap version to 1.1 by adding axis2_options_set_soap_version(options, env, AXIOM_SOAP11); to your client code (have a look at samples/user_guide/clients/echo_blocking_soap11.c) Thanks -sahan On 10/11/07, Yong Yang [EMAIL PROTECTED] wrote: Hi everyone, I wrote a web service client test case using AXIS2/C 1.0 to access a simple web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact. I got one exception(see [1] and [2]). Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Is there any API to set the start-info? if not, how can I solve this issue? Many thanks in advance. best regards yong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yong Yang Contact Details: Querix (UK) - 50, The Avenue, SO17 1XQ, Southampton, UK, Tel+44 2380 232345 Fax: +44 2380 399 685 Querix(US) - 8174 S. Holly Street, #225, Centennial, CO 80122-4004, USA, Tel: +1 1-866-732-0389 _ QUERIX (UK) Ltd. with registered offices at 5 St. Denys, Portswood Southampton SO2 16N UK Registration Number: 2984439 _ Contact: Company: ContactID: 2817 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays
I get following error while using axis C++ for generating C++ stubs. Any help on this will be highly appreciated. C:\axisC++\lib\axisjava org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -lc++ -sserver -oserver http://nydebl1:8097/wsdl/629/2007/adm/adm.wsdl java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.literal.WrapWriter.writeMethodInWrapper(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.WrapWriter.writeMethods(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter.writeSource(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.Generator.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WebServiceGeneratorImpl.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source) Code generation failed. Please see errors above. -- View this message in context: http://www.nabble.com/java.lang.NullPointerException-at-org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays-tf4614192.html#a13177046 Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: re[2]: the problem of enabling MTOM in web service client in AXIS2/C
Hi, It seems you have are working on the generated code from the wsdl. In WSDL2Java you can provide the port name with -pn option. So regenerate the code with the port name. Thanks Dimuthu On 10/12/07, Yong Yang [EMAIL PROTECTED] wrote: Hi Sahan, Thank you very much for your reply. When I set the soap version to 1.1, it works fine. Currently I wrote the web service using AXIS2/JAVA 1.2 and the generated wsdl has three ports, HTTP PORT, SOAP1.1, SOAP1.2. That means the web service server also supports SOAP1.2. The question is that it also should work if I set the soap version to 1.2 in client size. Is my understanding right? How can enable the server support SOAP 1.2? best regards yong Hi yong, In [1] the start-info is application/soap+xml (not application/xop+xml) and in [3] it is text/xml. If the request from Axis2/Java 1.2 works, then my guess is the server requires SOAP 1.1 and Axis2/C sends SOAP 1.2 by default. Try setting soap version to 1.1 by adding axis2_options_set_soap_version(options, env, AXIOM_SOAP11); to your client code (have a look at samples/user_guide/clients/echo_blocking_soap11.c) Thanks -sahan On 10/11/07, Yong Yang [EMAIL PROTECTED] wrote: Hi everyone, I wrote a web service client test case using AXIS2/C 1.0 to access a simple web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact. I got one exception(see [1] and [2]). Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Is there any API to set the start-info? if not, how can I solve this issue? Many thanks in advance. best regards yong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays
Thanks a lot Nadir for your quick reply Following is the link I am using for axisC++ binary. http://www.apache.org/dist/ws/axis-c/axis-c-win32-current-bin.zip Are you referring to a different link for latest binaries? I also tried to use java org.apache.axis.wsdl.WSDL2Java http://nydebl1:8097/wsdl/629/2007/adm/adm.wsdl Which generated stubs in java without any problem, but with axisC++ no luck :( Please let me know if I am using the latest binary. Thank again for help. Kumar, Rajeev Nadir Amra wrote: Kumar, Can you please try the latest code in SVN and see what you get? If the problem persists with latest code, open a JIRA and attach WSDL (as simplified as possible). Without my able to recreate the problem there will be no fix, so do not open a JIRA if you cannot attach WSDL. Nadir K. Amra Kumar.Rajeev [EMAIL PROTECTED] wrote on 10/12/2007 11:54:00 AM: I get following error while using axis C++ for generating C++ stubs. Any help on this will be highly appreciated. C:\axisC++\lib\axisjava org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -lc++ -sserver -oserver http://nydebl1:8097/wsdl/629/2007/adm/adm.wsdl java.lang.NullPointerException at org.apache.axis.wsdl.wsdl2ws.WrapperUtils. getClassNameFromParamInfoConsideringArrays(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.literal.WrapWriter. writeMethodInWrapper(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.WrapWriter.writeMethods(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter.writeSource(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.Generator.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WebServiceGeneratorImpl.generate(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source) Code generation failed. Please see errors above. -- View this message in context: http://www.nabble.com/java.lang. NullPointerException-at-org.apache.axis.wsdl.wsdl2ws.WrapperUtils. getClassNameFromParamInfoConsideringArrays-tf4614192.html#a13177046 Sent from the Axis - C++ - User mailing list archive at Nabble.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] -- View this message in context: http://www.nabble.com/java.lang.NullPointerException-at-org.apache.axis.wsdl.wsdl2ws.WrapperUtils.getClassNameFromParamInfoConsideringArrays-tf4614192.html#a13181729 Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2/ADB] How to check whether optional parts of a SOAP message are specified
On 10/10/07, Rainer Menzner [EMAIL PROTECTED] wrote: Hi, suppose I have optional parts in an XML element used by a WSDL, e.g.: xs:complexType name=CandidateType xs:sequence ... ... xs:element name=IsHit type=xs:boolean minOccurs=0/ /xs:sequence /xs:complexType After the stub classes have been generated by wsdl2java, how can I check whether IsHit was specified based on a stub class? I know there are tracker variables in the stub class, but I cannot use these because they (1) are not accessible and they (2) are not evaluated by the retrieval methods. So for the above example, IsHit can have three states: 1) true 2) false 3) not specified you can not do this. if you do not set it explicitly the tracker will not be on. and hence it won't serialize. but on the other side you can not get it. Amila. Using getIsHit() on the corresponding stub I can detect 1 and 2. But how can I extract the state 3 from the stub class? Thanks for any hints, -Rainer -- __ *Dr. Rainer Menzner* Principal Engineer, RD *L-1 Identity Solutions AG* /Protecting and Securing Personal Identities and Assets/ Universitätsstr. 160 44801 Bochum, Germany Telephone: +49-234-9787-41 Facsimile: +49-234-9787-77 Mobile: 0160 / 700 99 07 email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.L1ID.com http://www.l1id.com/ This message is only for the use of the intended recipient and may contain information that is CONFIDENTIAL and PROPRIETARY to L-1 Identity Solutions. If you are not the intended recipient, please erase all copies of the message and its attachments and notify the sender immediately. VORSTAND / EXECUTIVE BOARD Hartmuth von Maltzahn (Vors. / Chairman), Dr. Stefan Gehlen | AUFSICHTSRAT / SUPERVISORY BOARD James H. Moar (Vors. / Chairman) | GERICHTSSTAND / REGISTER COURT Amtsgericht Bochum, HRB 69 54 | UST-ID / VAT-REG.-NO. DE 813124378 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: How to send WS-Addressing headers in AXIOM based client
if you want to engage the addressing you have to set a configuration context to the service client ConfigurationContext configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_REPOSITORY, AXIS2_CONF); this.serviceClient = new ServiceClient(configurationContext, null); here axis2 repository should have the addressing.mar Amila. On 10/12/07, Ralph Fernandes [EMAIL PROTECTED] wrote: I have Axis2-1.3 and am trying to send WS-Addressing headers in the request using the code snippet below. The only header that gets set is the SOAPAction (HTTP) header, but none of the SOAP envelope headers, viz. To, From, Action, MessageID. If I try to explicitly engage the module, I get a runtime error unable to engage module. I understood that to enable the addressing module, the axis2.xml file needs to have the module entry un-commented, which it is by default. What should I be doing to get the To, Action, From, Msg. ID sent in the SOAP header? Besides the default module configuration in axis2.xml, is there any other configuration? (I am not using the wsdl2java ADB code generation since it does not work for our WSDLs.) Thanks - // TestAXIOMClient.java ... public static void main(String[] args) { // TODO Auto-generated method stub OMElement req = createRequestDocument(); Options options = new Options(); options.setTo (targetEPR); options.setAction(wsaAction); options.setFrom(wsaFrom); options.setMessageId(ab838db4-c0e5-11da-90b6-7be9a196b6d2); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.engageModule(addressing); // throws runtime exception below sender.setTargetEPR (targetEPR); sender.setOptions(options); sender.sendReceive(req); } catch (java.lang.Exception e) { e.printStackTrace(); } } --- org.apache.axis2.AxisFault: Unable to engage module : addressing at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java :339) at com.frk.corp.noam.sharedservices.TestAXIOMClient.main( TestAXIOMClient.java :53) -- Amila Suriarachchi, WSO2 Inc.
Re: [Axis2] 2 Instances of Axis2 running by default in Axis2 WAR?
Lawrence, This isn't my area of expertise, but looking at AxisAdminServlet and AxisServlet, it looks like the init(ServletConfig) methods store/retrieve the first created configuration context from an attribute on the ServletContext, so only one should be created: Extract: this.configContext = (ConfigurationContext) servletContext.getAttribute(CONFIGURATION_CONTEXT); if(configContext == null){ configContext = initConfigContext(config); config.getServletContext().setAttribute(CONFIGURATION_CONTEXT, configContext); } Does that make sense? David On 11/10/2007, Lawrence Mandel [EMAIL PROTECTED] wrote: I'm trying to understand how Axis2 is initialized. When deploying Axis2 in a Servlet container (like Tomcat) there are two Servlets that get invoked: AxisServlet and AxisAdminServlet. Both of these Servlets seem to go through the same initialization routine setting up Axis2 configurations. In this way it appears that both Servlets contain their own instance of Axis2 and therefore their own copies of the running services and modules and both will probe for new services and modules. It seems to me that Axis2 should only be configured once and this configuration should be shared between AxisServlet and AxisAdminServlet. Am I correct in my assessment above and if so are two instances of Axis2 created intentionally? Thanks, Lawrence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Illsley - IBM Web Services Development - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] hot deployment
Hi If I simply copy a .aar file to the axis2/WEB-INF/services directory under a running Tomcat, then my webservice is immediately available. But if I make changes to my webservice, and copy the new .aar file (with the same name as the old .aar file) to the services directory, then the changes do not take affect until I restart Tomcat. Is this normal behaviour? And is it possible to deploy an updated (but same name) webservice .aar and have the changes immediately take affect without having to restart Tomcat? Thanks, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to send WS-Addressing headers in AXIOM based client
I have Axis2-1.3 and am trying to send WS-Addressing headers in the request using the code snippet below. The only header that gets set is the SOAPAction (HTTP) header, but none of the SOAP envelope headers, viz. To, From, Action, MessageID. If I try to explicitly engage the module, I get a runtime error unable to engage module. I understood that to enable the addressing module, the axis2.xml file needs to have the module entry un-commented, which it is by default. What should I be doing to get the To, Action, From, Msg. ID sent in the SOAP header? Besides the default module configuration in axis2.xml, is there any other configuration? Well drop addressing.mar into classpath and call serviceClient.engageModule(addressing); Thanks Deepal (I am not using the wsdl2java ADB code generation since it does not work for our WSDLs.) Thanks - // TestAXIOMClient.java ... public static void main(String[] args) { // TODO Auto-generated method stub OMElement req = createRequestDocument(); Options options = new Options(); options.setTo (targetEPR); options.setAction(wsaAction); options.setFrom(wsaFrom); options.setMessageId(ab838db4-c0e5-11da-90b6-7be9a196b6d2); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.engageModule(addressing); // throws runtime exception below sender.setTargetEPR (targetEPR); sender.setOptions(options); sender.sendReceive(req); } catch (java.lang.Exception e) { e.printStackTrace(); } } --- org.apache.axis2.AxisFault: Unable to engage module : addressing at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:339) at com.frk.corp.noam.sharedservices.TestAXIOMClient.main(TestAXIOMClient.java :53) -- Thanks, Deepal The highest tower is built one brick at a time - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxisCallback stuck the application
Hi Huitang , Definitely a bug in codegen , please create a JRIA. Thanks Deepal All these codes are auto-generated by Axis2 1.3 wsdl2java command. I do not know whether it is an old callback or not. But it does says: _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { // all the codes that I pasted in my previous email. } In the generated code, the onComplete() method looks like this: public void onComplete() { // Do nothing by default } Maybe there is something incorrectly generated by wsdl2java? Rajith Attapattu wrote: What do you mean by the application is stuck ? How does your application figure out if a response is received? Can you please cut paste the code that uses the AxisCallback. Does the onMessage, onError or onFault methods get called? If so why do u say it is stuck? Looks like the onMessage and onError methods get called, bcos u seem to have put the old callback there and you mentioned that it works. public void onComplete() { //nothing here } I also see that the onComplete method is empty. -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Deepal The highest tower is built one brick at a time - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] hot deployment
This is the behaviour of hotDeployment. What you are asking is hotUpdate and is set to false by default. Change this property in your axis2.xml to true. parameter name=hotupdatefalse/parameter Thanks, Keith. On 10/12/07, Peter A. Kirk [EMAIL PROTECTED] wrote: Hi If I simply copy a .aar file to the axis2/WEB-INF/services directory under a running Tomcat, then my webservice is immediately available. But if I make changes to my webservice, and copy the new .aar file (with the same name as the old .aar file) to the services directory, then the changes do not take affect until I restart Tomcat. Is this normal behaviour? And is it possible to deploy an updated (but same name) webservice .aar and have the changes immediately take affect without having to restart Tomcat? Thanks, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
Re: [Axis2] hot deployment
Peter, from http://www-128.ibm.com/developerworks/webservices/library/ws-axis2soap/ Hot deployment and hot update Availability is a big concern when it comes to enterprise-level applications. Even a short amount of downtime can be highly detrimental, so restarting a server is not a good option. You need to update your system without shutting it down. This is where hot deployment and hot update come in. Hot deployment and hot update are new features to the Apache Web services stack (such as Axis and Axis2). Here's what these features are: * Hot deployment is the capability of deploying new services while the system is up and running. As an example, let's say that you have two services -- service1 and service2 -- up and running, and you deploy a new service called service3 without shutting down the system. Deploying service3 is a hot deployment scenario. As a system administrator, if you don't like the hot deployment of service, then you can turn that off easily by changing the Axis2 global configuration file called axis2.xml and changing the global configuration parameter like this: parameter name=hotdeploymentfalse/parameter. * Hot update is the ability to make changes to an existing Web service without shutting down the system. This is an important feature and required in a testing environment. However, it's not advisable to use hot update in a real-time system, because it could result in the system leading into an unknown state. Additionally, there's the possibility of loosening the existing service data of that service. To prevent this, Axis2 comes with the hot update parameter set to FALSE by default. If you want to have this feature, you can do this by changing the configuration parameter like this: parameter name=hotupdatetrue/parameter. Cheers, Chris Peter A. Kirk wrote: Hi If I simply copy a .aar file to the axis2/WEB-INF/services directory under a running Tomcat, then my webservice is immediately available. But if I make changes to my webservice, and copy the new .aar file (with the same name as the old .aar file) to the services directory, then the changes do not take affect until I restart Tomcat. Is this normal behaviour? And is it possible to deploy an updated (but same name) webservice .aar and have the changes immediately take affect without having to restart Tomcat? Thanks, Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Chris Bowman Director, Phoros Limited mobile: +44(0)7766 881 564 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 client
Hi rajnishe , In your client code do you have configurationContext.terminate() method ? Thanks Deepal Hello All I am using axis2 for webservice development. When i run client first time it gives me error below . But second time and later many times it runs successfully. I am using jboss 4.0.2 server . Now i restart server and try to run it again gives me this error. So this error occured only one time when server is up . Thanks in advance for your kind sugestion to solve this problem. org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method createEvent at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at st.ict.qs.ws.client1.EventServiceStub.createEvent(EventServiceStub.java:205) at test_case.test.main(test.java:47) Best Regards Rajnish Chauhan -- Thanks, Deepal The highest tower is built one brick at a time - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question on doc/lit wrapped wsdl with one-way operations
If you want doc/lit wrapped, then you must have an output message with an empty wrapper element. Other options for a void return: If you have an empty output message (message defined but containing no parts), then it will be treated doc/lit unwrapped with a request/response MEP -- it will return faults if you define them. If you have no output message (no message defined), then it will be treated like doc/lit unwrapped with a one-way MEP -- it provides no means to return a fault. Anne On 10/8/07, Shantanu Sen [EMAIL PROTECTED] wrote: What is the right way of developing a WSDL (with doc/lit wrapped binding) that describes operations that have void returns? One approach is to have no output message as shown below === complexType name=allvoid sequence / /complexType complexType name=returnvoid sequence element name=int_1 type=int / /sequence /complexType element name=allvoid type=tns:allvoid / element name=returnvoid type=tns:returnvoid / /schema /types part element=tns:allvoid name=allvoid / /message message name=Testvoid_returnvoid part element=tns:returnvoid name=returnvoid / /message portType name=Testvoid operation name=allvoid input message=tns:Testvoid_allvoid / /operation operation name=returnvoid input message=tns:Testvoid_returnvoid / /operation /portType === The other one is to have an output message with an empty wrapper element. complexType name=allvoid sequence/ /complexType complexType name=allvoidResponse sequence/ /complexType complexType name=returnvoid sequence element name=int_1 type=int/ /sequence /complexType complexType name=returnvoidResponse sequence/ /complexType element name=allvoid type=tns:allvoid/ element name=allvoidResponse type=tns:allvoidResponse/ element name=returnvoid type=tns:returnvoid/ element name=returnvoidResponse type=tns:returnvoidResponse/ /schema /types message name=Testvoid_allvoidResponse part element=tns:allvoidResponse name=allvoidResponse/ /message message name=Testvoid_returnvoidResponse part element=tns:returnvoidResponse name=returnvoidResponse/ /message message name=Testvoid_allvoid part element=tns:allvoid name=allvoid/ /message message name=Testvoid_returnvoid part element=tns:returnvoid name=returnvoid/ /message portType name=Testvoid operation name=allvoid input message=tns:Testvoid_allvoid/ output message=tns:Testvoid_allvoidResponse/ /operation operation name=returnvoid input message=tns:Testvoid_returnvoid/ output message=tns:Testvoid_returnvoidResponse/ /operation /portType === Is there any 'standard' for describing this type of operation using doc/lit (wrapped) mode? Note the example is just for test purposes - it should have multiple parameters for warranting a doc/lit wrapped style. Thanks, Shantanu Sen - 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]
Cannot obtain token identifier
Hi, I have implemented the STS token issuer, to issue custom saml token. I just copied the SAMLTokenIssuer.java from the SVN of rampart. But the client doesn't find the token reference: [java] Got trustexception + Cannot obtain token identifier [java] org.apache.rahas.TrustException: Cannot obtain token identifier [java] at org.apache.rahas.client.STSClient.processIssueResponse(STSClient.java:224) I think I've to add something like this, System.err.println(TrustUtil.createSecurityTokenReference(doc, assertion.getID(), aa)); But what is the third field? And how I can add it to the envelope in the WSSE: Header? Thanks, This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wsdl2java generates java code with errors
On 10/12/07, Masahiro Nakamura [EMAIL PROTECTED] wrote: Hello I installed axis 1.3 and converted a WSDL file to java (ADB) code. WSDL2Java command exited without errors, however I cannot build the result files. there was a problem with union type processing. I have fixed it now and please try with a nighly build. Severity and Description Path Resource Location Creation Time Id The method fromString(XMLStreamReader, String, String) in the type Lang_type0.Factory is not applicable for the arguments (String, String) RNSClient2/src/org/oasis_open/docs/wsrf/bf_2 Description_type0.java line 468 1192180011932 38527 Severity and Description Path Resource Location Creation Time Id The method fromString(XMLStreamReader, String, String) in the type Lang_type0.Factory is not applicable for the arguments (String, String) RNSClient2/src/org/oasis_open/docs/wsrf/bf_2 Description_type0.java line 473 1192180011932 38528 The WSDL ( and schema ) file is here: http://yorozuya.ddo.jp/~yuryu/rns.wsdl http://yorozuya.ddo.jp/~yuryu/rns.xsd Is this a bug with wsdl2java or my WSDL file wrong? I have another question. The generated code use org.w3.www._2005._08.addressing.EndpointReferenceType instead of org.apache.axis2.addressing.EndpointReference. I could not find how to fix this issue. use ns2p option . you can set the package name you want to use for any name space. Amila. code -- if (tempAttribLang!=null){ java.lang.String content = tempAttribLang; if (tempAttribLang.indexOf(:) 0) { // this seems to be a Qname so find the namespace and send prefix = tempAttribLang.substring(0, tempAttribLang.indexOf(:)); namespaceuri = reader.getNamespaceURI(prefix); object.setLang( org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString (tempAttribLang,namespaceuri)); } else { // this seems to be not a qname send and empty namespace incase of it is // check is done in fromString method object.setLang( org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString (tempAttribLang,)); } } else { --- Thanks --- Masahiro Nakamura - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
RE: Peculiar Issue while testing a service
Hi Amila, Both the ways have been tested. With product Id and with test elements. We have built a test harness which reads all data from an excel sheet, forms a custom domain object set. There is a mapper class which individually maps the object elements from this domain onto axis generated class, finally passing the top level object to the stub. This way too, every thing works fine before including the new simple types. Once these come into picture it starts giving errors. if you had noted by code below, the same piece of parsing mechanism going fine at client side, but the same parsing at server side is throwing the un expected element. -Original Message- From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: 12 October 2007 10:20 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service with out generating the xml from anther IDE. generated it with the generated client code. try to remove those test elements and add productionID and see. Amila. On 10/11/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Anything on this? Cheers Natraj. -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 10 October 2007 11:27 To: ' axis-user@ws.apache.org' Subject: RE: Peculiar Issue while testing a service Yes i do. and i run the wsdl2java on the wsdl which refers to this xsd. I have just been doing some debuggin and see how the reader.getName() differs on the client side and the server side. The class GEM_Ln_LoanRequestDetails which was generated by axis, returns as test ( test is the simple element i added for testing ). The same code at server side returns a {GEMoney:XMLI}test, GEMoney:XMLI is the name space in which the complext type having test is defined. Why is this difference in reading the name of the reader from the same piece of code at client and server. Further i understand the condition below fails at server and not in client call. if (reader.isStartElement() new javax.xml.namespace.QName(, test) .equals(reader.getName())) { The QName conditions is false at server side and hence it jumps to the excpetion loop to create the error. Does this give some clue? Thanks Natraj. [Gudta, Natraj (GE Money, consultant)] -Original Message- From: Antonio Manuel Muñiz Martín [mailto: [EMAIL PROTECTED] Sent: 10 October 2007 11:18 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service Do you modify the xsd in the correct place? Perhaps you are modifying the xsd and on deploy time the xsd used is other. 2007/10/10, Gudla, Natraj (GE Money, consultant) mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]: First i generate a sample xml file using the Eclipse IDE, using the xsd, then use the parse method of axis generated wrapper class for my request, passing it the XMLStreamReader created from the sample xml. This worked fine end to end earlier. Sample class, calling stub passing the request object, server responding properly with expected response. Only after i include a simple type element into one of the existing complex types within the xsd, it fails saying unexpected element. Just another peice of information, when i place this new simple type into its own complex type, it works fine again. Seems like only when i add it as a simple type it refuses to parse at the server side. In the intial case, i had debugged the axis client side parsing the tags, and the new simple type tag conditions pass through properly and it recognizes it. Why is it only at the server i get this error. I lieterally need some help on this. I can give the full file set if you need more information. -Original Message- From: Amila Suriarachchi [mailto: [EMAIL PROTECTED] Sent: 10 October 2007 10:39 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service On 10/10/07, Gudla, Natraj (GE Money, consultant) mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Any ideas on this? how do you generate this request? some problem there. Cheers Natraj -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 09 October 2007 10:01 To: ' axis-user@ws.apache.org mailto:axis-user@ws.apache.org ' Subject: Peculiar Issue while testing a service Hi, I am reporting a peculiar issue which i am facing since yesterday working with AXIS2 1.2. Addition of an extra simple element to an existing complex type of an xsd throws an Un Expected Element error. Following is the brief. The current set up : Working Fine. The complext type part of my xsd xsd:complexType name=GEM_Ln_LoanRequestDetails xsd:sequence xsd:element name=LoanPreference type=GEM_Ln_LoanPreference/ xsd:element name=CustomerDetails type=GEM_Ln_CustomerDetails/ xsd:element name=CustomerAddr type=GEM_Ln_CustomerAddr/
wsdl2java generates java code with errors
Hello I installed axis 1.3 and converted a WSDL file to java (ADB) code. WSDL2Java command exited without errors, however I cannot build the result files. Severity and Description Path Resource Location Creation Time Id The method fromString(XMLStreamReader, String, String) in the type Lang_type0.Factory is not applicable for the arguments (String, String) RNSClient2/src/org/oasis_open/docs/wsrf/bf_2 Description_type0.java line 468 1192180011932 38527 Severity and Description Path Resource Location Creation Time Id The method fromString(XMLStreamReader, String, String) in the type Lang_type0.Factory is not applicable for the arguments (String, String) RNSClient2/src/org/oasis_open/docs/wsrf/bf_2 Description_type0.java line 473 1192180011932 38528 The WSDL ( and schema ) file is here: http://yorozuya.ddo.jp/~yuryu/rns.wsdl http://yorozuya.ddo.jp/~yuryu/rns.xsd Is this a bug with wsdl2java or my WSDL file wrong? I have another question. The generated code use org.w3.www._2005._08.addressing.EndpointReferenceType instead of org.apache.axis2.addressing.EndpointReference. I could not find how to fix this issue. code -- if (tempAttribLang!=null){ java.lang.String content = tempAttribLang; if (tempAttribLang.indexOf(:) 0) { // this seems to be a Qname so find the namespace and send prefix = tempAttribLang.substring(0, tempAttribLang.indexOf(:)); namespaceuri = reader.getNamespaceURI(prefix); object.setLang( org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(tempAttribLang,namespaceuri)); } else { // this seems to be not a qname send and empty namespace incase of it is // check is done in fromString method object.setLang( org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(tempAttribLang,)); } } else { --- Thanks --- Masahiro Nakamura - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] JAX-WS working at xml level on the client side
Nick. thanks, but I can't get it working. Here is the service (it's like SOAP12Provider, but without dependencies): package service.jaxws; import javax.xml.ws.BindingType; import javax.xml.ws.Provider; import javax.xml.ws.WebServiceProvider; import javax.xml.ws.soap.SOAPBinding; /** * A Providerlt;Stringgt; implementation used to test sending and * receiving SOAP 1.2 messages. */ @WebServiceProvider() @BindingType(SOAPBinding.SOAP12HTTP_BINDING) public class SOAP12Provider implements ProviderString { private static final String sampleResponse = test:echoStringResponse xmlns:test= \http://org/apache/axis2/jaxws/test/SOAP12\; + test:outputSAMPLE REQUEST MESSAGE/test:output + /test:echoStringResponse; /* * @see javax.xml.ws.Provider#invoke(java.lang.Object) */ public String invoke(String obj) { System.out.printf(Received %s\n, obj); return sampleResponse; } } which runs into an embedded axis2 instance: import java.util.HashMap; import java.util.Map; import org.apache.axis2.AxisFault; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.ConfigurationContextFactory; import org.apache.axis2.description.AxisService; import org.apache.axis2.transport.http.SimpleHTTPServer; import org.apache.log4j.BasicConfigurator; import service.jaxws.SOAP12Provider; /** * a href=http://wso2.org/library/83;How do I Embed SimpleHTTPServer in My * Application and Deploy a POJO?/a * */ public class EmbeddedAxis2Server { static { BasicConfigurator.configure(); } /** * @param args */ public static void main(String[] args) throws AxisFault { ConfigurationContext context = ConfigurationContextFactory .createConfigurationContextFromFileSystem(null, null); MapString, String map = new HashMapString, String(1); map.put(http://www.w3.org/2004/08/wsdl/in-out;, org.apache.axis2.jaxws.server.JAXWSMessageReceiver); AxisService echoJaxWs = AxisService.createService(SOAP12Provider.class.getName(), context.getAxisConfiguration(), map, http://org/apache/axis2/jaxws/test/SOAP12;, http://org/apache/axis2/jaxws/test/SOAP12;, Thread.currentThread().getContextClassLoader()); context.getAxisConfiguration().addService(echoJaxWs); SimpleHTTPServer server = new SimpleHTTPServer(context, 8080); server.start(); } } The client is SOAP12Dispatch + the main method import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import javax.xml.ws.Service.Mode; import javax.xml.namespace.QName; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import javax.xml.ws.Dispatch; import javax.xml.ws.Service; import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.soap.SOAPFaultException; import org.apache.log4j.BasicConfigurator; public class SOAP12Dispatch { private static final QName QNAME_SERVICE = new QName( http://org/apache/axis2/jaxws/test/SOAP12;, SOAP12Service); private static final QName QNAME_PORT = new QName( http://org/apache/axis2/jaxws/test/SOAP12;, SOAP12Port); private static final String URL_ENDPOINT = http://localhost:8080/axis2/services/SOAP12Provider;; private static final String sampleRequest = test:echoString xmlns:test=\http://org/apache/axis2/jaxws/test/SOAP12\; + test:inputSAMPLE REQUEST MESSAGE/test:input + /test:echoString; private static final String sampleEnvelopeHead = soapenv:Envelope xmlns:soapenv=\http://www.w3.org/2003/05/soap-envelope\; + soapenv:Header /soapenv:Body; private static final String sampleEnvelopeHead_MustUnderstand = soapenv:Envelope xmlns:soapenv= \http://www.w3.org/2003/05/soap-envelope\; + soapenv:Header + soapenv:codeHeaderSOAP12 soapenv:mustUnderstand=\true \ + codedefault/code + /soapenv:codeHeaderSOAP12 + /soapenv:Header + soapenv:Body; private static final String sampleEnvelopeTail = /soapenv:Body/soapenv:Envelope; private static final String sampleEnvelope = sampleEnvelopeHead + sampleRequest + sampleEnvelopeTail; private static final String sampleEnvelope_MustUnderstand = sampleEnvelopeHead_MustUnderstand + sampleRequest + sampleEnvelopeTail; /** * Test sending a SOAP 1.2 request in PAYLOAD mode */ public void testSOAP12DispatchPayloadMode() throws Exception { // Create the JAX-WS client needed to send the request Service service = Service.create(QNAME_SERVICE); service.addPort(QNAME_PORT, SOAPBinding.SOAP12HTTP_BINDING, URL_ENDPOINT); DispatchSource dispatch = service.createDispatch( QNAME_PORT, Source.class, Mode.PAYLOAD);
getting java.lang.NoClassDefFoundError while invocation
Hi, I'm using axis2 1.3 for developing a web service (3 methods) along with spring and hibernate. I was successful in deploying the web service and also invoking one of the methods. But on invocation of the other two methods, I'm getting an exception as follows: [ERROR] sample/sampleList/_2007/_01/_01/Account12$Factory java.lang.NoClassDefFoundError] sample/sampleList/Account12$Factory at ] sample.sampleList._2007._01._01.GetValue$Factory.parse(.GetValue.java:905) at ] sample.sampleList._2007._01._01.GetRequest$Factory.parse(GetRequest.java:446) ] sample.sampleList._2007._01._01.SampleWebServiceMessageReceiverInOut.fromOM (SampleWebServiceMessageReceiverInOut.java:250) at ] sample.sampleList._2007._01._01.SampleWebServiceMessageReceiverInOut..invokeBusinessLogic(SampleWebServiceMessageReceiverInOut.java:43 ) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBus inessLogic(AbstractInOutSyncMessageReceiver.java:42) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe ssageReceiver.java:96) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq uest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1 20) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p rocessConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo int.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol lowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:684) at java.lang.Thread.run(Thread.java:595) My concern is that for the method that was invoked successfully, the transfer objects used as input and output are entirely different. But in the other two cases, where I got the exception, both the input and output transfer objects share the same transfer object (Account12 in the above mentioned exception) as an inner TO. Is the issue because of this? My doubt was stemmed from reading the following link. https://issues.apache.org/jira/browse/AXIS2-1986 I'm pretty stuck on this part.. Please help me as this is something that is needed urgently. Thanks in advance, Regards, Anumodh K.S. CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: using log4j.properties
Hi, One solution, in each aar, you have to call a log4j PropertyConfigurator.configure(...) or DOMConfigurator.configure(...) at start up or when you want to reload the log properties. This is one way of doing it. Here the service class implements public void init(ServiceContext sc) which will be called by Axis2 when instantiating the service class. The samplelog4j.properties is inside the aar file. public class Sample { public void init(ServiceContext sc) { try { InputStream inStream = this.getClass ().getClassLoader().getResourceAsStream(samplelog4j.properties); Properties props = new Properties(); props.load(inStream); PropertyConfigurator.configure(props); } catch (Exception e) { e.printStackTrace(); } } // service methods etc. } Hope this helps Upul On 10/11/07, Kahler, Jason J (US SSA) [EMAIL PROTECTED] wrote: Is the a way to use separate log4j.properties files for different services ? If so how do I add the property file to my aar file ? I am using the maven2 plugin.
Re: Peculiar Issue while testing a service
with out generating the xml from anther IDE. generated it with the generated client code. try to remove those test elements and add productionID and see. Amila. On 10/11/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Anything on this? Cheers Natraj. -Original Message- *From:* Gudla, Natraj (GE Money, consultant) *Sent:* 10 October 2007 11:27 *To:* 'axis-user@ws.apache.org' *Subject:* RE: Peculiar Issue while testing a service Yes i do. and i run the wsdl2java on the wsdl which refers to this xsd. I have just been doing some debuggin and see how the reader.getName() differs on the client side and the server side. The class GEM_Ln_LoanRequestDetails which was generated by axis, returns as test ( test is the simple element i added for testing ). The same code at server side returns a {GEMoney:XMLI}test, GEMoney:XMLI is the name space in which the complext type having test is defined. Why is this difference in reading the name of the reader from the same piece of code at client and server. Further i understand the condition below fails at server and not in client call. *if* (reader.isStartElement() *new* javax.xml.namespace.QName(, test) .equals(reader.getName())) { The QName conditions is false at server side and hence it jumps to the excpetion loop to create the error. Does this give some clue? Thanks Natraj. [Gudta, Natraj (GE Money, consultant)] -Original Message- *From:* Antonio Manuel Muñiz Martín [mailto:[EMAIL PROTECTED] *Sent:* 10 October 2007 11:18 *To:* axis-user@ws.apache.org *Subject:* Re: Peculiar Issue while testing a service Do you modify the xsd in the correct place? Perhaps you are modifying the xsd and on deploy time the xsd used is other. 2007/10/10, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED]: First i generate a sample xml file using the Eclipse IDE, using the xsd, then use the parse method of axis generated wrapper class for my request, passing it the XMLStreamReader created from the sample xml. This worked fine end to end earlier. Sample class, calling stub passing the request object, server responding properly with expected response. Only after i include a simple type element into one of the existing complex types within the xsd, it fails saying unexpected element. Just another peice of information, when i place this new simple type into its own complex type, it works fine again. Seems like only when i add it as a simple type it refuses to parse at the server side. In the intial case, i had debugged the axis client side parsing the tags, and the new simple type tag conditions pass through properly and it recognizes it. Why is it only at the server i get this error. I lieterally need some help on this. I can give the full file set if you need more information. -Original Message- *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED] *Sent:* 10 October 2007 10:39 *To:* axis-user@ws.apache.org *Subject:* Re: Peculiar Issue while testing a service On 10/10/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi, Any ideas on this? how do you generate this request? some problem there. Cheers Natraj -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 09 October 2007 10:01 To: 'axis-user@ws.apache.org ' Subject: Peculiar Issue while testing a service Hi, I am reporting a peculiar issue which i am facing since yesterday working with AXIS2 1.2. Addition of an extra simple element to an existing complex type of an xsd throws an Un Expected Element error. Following is the brief. The current set up : Working Fine. The complext type part of my xsd xsd:complexType name=GEM_Ln_LoanRequestDetails xsd:sequence xsd:element name=LoanPreference type=GEM_Ln_LoanPreference/ xsd:element name=CustomerDetails type=GEM_Ln_CustomerDetails/ xsd:element name=CustomerAddr type=GEM_Ln_CustomerAddr/ xsd:element name=EmployerDetails type=GEM_Ln_EmployerDetails/ xsd:element name=CustomerFinances type=GEM_Ln_CustomerFinances/ xsd:element name=CardDetails type=GEM_Ln_CardDetails minOccurs=0/ xsd:element name=LoanDetails type=GEM_Ln_LoanDetails minOccurs=0/ /xsd:sequence /xsd:complexType I used a wsdl, generated binding ( ADB ) classes using WSDL to Java tool on Axis2 1.2. Using the build.xml, running the jar.server task i created the services.aar and deployed on tomcat. Created a sample java class, which reads a sample loan request xml ( formed using IDE based on the xsd ) and submits a request to the service. Every
Re: Peculiar Issue while testing a service
ok can you send me your code. (please send only the relavent things to reproduce the bug). and tell me the steps to produce your error. Amila. On 10/12/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Both the ways have been tested. With product Id and with test elements. We have built a test harness which reads all data from an excel sheet, forms a custom domain object set. There is a mapper class which individually maps the object elements from this domain onto axis generated class, finally passing the top level object to the stub. This way too, every thing works fine before including the new simple types. Once these come into picture it starts giving errors. if you had noted by code below, the same piece of parsing mechanism going fine at client side, but the same parsing at server side is throwing the un expected element. -Original Message- *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED] *Sent:* 12 October 2007 10:20 *To:* axis-user@ws.apache.org *Subject:* Re: Peculiar Issue while testing a service with out generating the xml from anther IDE. generated it with the generated client code. try to remove those test elements and add productionID and see. Amila. On 10/11/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Anything on this? Cheers Natraj. -Original Message- *From:* Gudla, Natraj (GE Money, consultant) *Sent:* 10 October 2007 11:27 *To:* 'axis-user@ws.apache.org' *Subject:* RE: Peculiar Issue while testing a service Yes i do. and i run the wsdl2java on the wsdl which refers to this xsd. I have just been doing some debuggin and see how the reader.getName() differs on the client side and the server side. The class GEM_Ln_LoanRequestDetails which was generated by axis, returns as test ( test is the simple element i added for testing ). The same code at server side returns a {GEMoney:XMLI}test, GEMoney:XMLI is the name space in which the complext type having test is defined. Why is this difference in reading the name of the reader from the same piece of code at client and server. Further i understand the condition below fails at server and not in client call. *if* (reader.isStartElement() *new* javax.xml.namespace.QName(, test) .equals(reader.getName())) { The QName conditions is false at server side and hence it jumps to the excpetion loop to create the error. Does this give some clue? Thanks Natraj. [Gudta, Natraj (GE Money, consultant)] -Original Message- *From:* Antonio Manuel Muñiz Martín [mailto:[EMAIL PROTECTED] ] *Sent:* 10 October 2007 11:18 *To:* axis-user@ws.apache.org *Subject:* Re: Peculiar Issue while testing a service Do you modify the xsd in the correct place? Perhaps you are modifying the xsd and on deploy time the xsd used is other. 2007/10/10, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED]: First i generate a sample xml file using the Eclipse IDE, using the xsd, then use the parse method of axis generated wrapper class for my request, passing it the XMLStreamReader created from the sample xml. This worked fine end to end earlier. Sample class, calling stub passing the request object, server responding properly with expected response. Only after i include a simple type element into one of the existing complex types within the xsd, it fails saying unexpected element. Just another peice of information, when i place this new simple type into its own complex type, it works fine again. Seems like only when i add it as a simple type it refuses to parse at the server side. In the intial case, i had debugged the axis client side parsing the tags, and the new simple type tag conditions pass through properly and it recognizes it. Why is it only at the server i get this error. I lieterally need some help on this. I can give the full file set if you need more information. -Original Message- *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED] *Sent:* 10 October 2007 10:39 *To:* axis-user@ws.apache.org *Subject:* Re: Peculiar Issue while testing a service On 10/10/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi, Any ideas on this? how do you generate this request? some problem there. Cheers Natraj -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 09 October 2007 10:01 To: 'axis-user@ws.apache.org ' Subject: Peculiar Issue while testing a service Hi, I am reporting a peculiar issue which i am facing since yesterday working with AXIS2 1.2. Addition of an extra simple element to an existing complex type of an xsd throws an Un Expected Element error. Following is the brief. The current set up :
Re: WSDL2Java, Address already in use: connect
A question like yours - with related reply - was sent to this mailing list 2 days ago. Michele On Fri, 2007-10-12 at 16:05 +0200, Pär Malmqvist wrote: Hi! I am using Axis2 1.3 and have generated a client of type xmlbeans with WSDL2Java. I am using the constructor: stub = new MyServiceStub(endPoint); Then I create my request and execute the service and it works fine. But when I have done a couple of thousands requests I get the exception: Address already in use: connect. Is there something wrong in the generated client or am I using it wrong? /Pär Malmqvist __ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem when axessing a method
ok I guess I got fast in my conclusion !! because it's not working really well neither si as I know I did everything with the 1.2 I got back with this version !!! so I deployed an exemple: the quickstart exemple from my browser everyything is still working fine ... but from my java code: Exception in thread main org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method getPrice at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at EssaiMbari1.main(Quickstart.java:35) so I don't get anything !! my client is: import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; public class EssaiMbari1 { public static OMElement createPayLoad() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://ws.apache.org/axis2/xsd;, ns1); OMElement method = fac.createOMElement(echo, omNs); OMElement value = fac.createOMElement(value, omNs); value.setText(Hello , my first service utilization); method.addChild(value); return method; } public static void main(String[] args) throws Exception { ServiceClient client = new ServiceClient(); // create option object Options opts = new Options(); //setting target EPR opts.setTo(new EndpointReference(http://mbari1.neptune.uvic.ca:8080/axis2/services/StockQuoteService/getPrice?symbol=IBM;)); //Setting action ,and which can be found from the wsdl of the service opts.setAction(urn:getPrice); client.setOptions(opts); OMElement res = client.sendReceive(createPayLoad()); System.out.println(res); } } - Can someone try it so I can see I'm not crazy ? I'm working under eclipse and imported the .jar from the axis2_1.2/lib folder (the one defined by my AXIS2_HOME so the one used to compile my file!) thx for your help jerome.mariette wrote: allright, just change of version of axis2.war to the 1.3 and everything is working ;) jerome.mariette wrote: Hi everybody, I wrote a basic web service: public String test (String t) { return (t); } when deployed, I have access to it easily throught my broser: http://localhost:8080/axis2/services/Test/test?t=I love axis But when writing a java client: public static void main(String[] args) throws Exception { ServiceClient client = new ServiceClient(); // create option object Options opts = new Options(); //setting target EPR opts.setTo(new EndpointReference(http://localhost:8080/axis2/services/Test/test;)); //Setting action ,and which can be found from the wsdl of the service opts.setAction(urn:test); client.setOptions(opts); OMElement res = client.sendReceive(createPayLoad()); System.out.println(res); } public static OMElement createPayLoad() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://axis.org;, ns1); OMElement method = fac.createOMElement(test, omNs); OMElement value = fac.createOMElement(t, omNs); value.setText(I Love Axis); method.addChild(value); return method; } This is not working !!! and I get the following error: Exception in thread main org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method test at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at TestClient.main(TestClient.java:20) But if I implement a webService without any parameter (what I don't want): public String test () { return (I love axis); } This is working fine I know I got
Re: securing webservice in axis2
following the JavaDoc available at http://ws.apache.org/axis2/modules/rampart/1_2/security-module.html axis2.saml.properties contains this vital information: axis2.crypto.properties contain these vital entries: org.apache.ws.security.saml.issuer.key.password=security org.apache.ws.security.saml.subjectNameId.name=uid=joe,ou=people,ou=saml-dem o,o=example.com org.apache.ws.security.saml.issuer.cryptoProp.file=axis2.crypto.properties where axis2.crypto.properties contains org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cry pto.Merlin org.apache.ws.security.crypto.merlin.keystore.type=pkcs12 org.apache.ws.security.crypto.merlin.keystore.password=security org.apache.ws.security.crypto.merlin.keystore.alias=16c73ab6-b892-458f-abf5- 2f875f74882e org.apache.ws.security.crypto.merlin.alias.password=security org.apache.ws.security.crypto.merlin.file=x509.PFX.MSFT identification of rampart-wide paramaeters of user, encryptionUser defined here in rampart-policy-1.xml where user is users name passwordCallbackClass is the method used to provide the password encryptionUser is the username used in the original encryption M-- - Original Message - From: rajnishe [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, October 12, 2007 1:20 AM Subject: securing webservice in axis2 Hello All I am using axis2 and jboss 4.x.x. and have created webservice . Currently anyone who know url can invole webservice. My need is that only defined users/pwd should be able to call webservice. User will be defined at server side and webservice method can be invoke only if user is defined . How we can achiev this. Thanks in advance for help. Best Regards Rajnish Chauhan -- View this message in context: http://www.nabble.com/securing-webservice-in-axis2-tf4611494.html#a13169319 Sent from the Axis - User mailing list archive at Nabble.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]
Axis2 1.3 and Servlet Spec
Hello All,Axis2 1.3 can be installed in any Servlet Container, but is there any minimum Servlet specification(2.1 or 2.3) that is needed for Axis2 1.3 ?Any help is greatly appreciated.Thanks,Kiran _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
NoClassDefFoundErrors ins AXIS2 aar
I am building my aar using the maven2 pluggin. Everything builds but when I deploy I get NoClassDefFound ERRORS all over. This was working as a war in tomcat using axis 1. All the required jars are in myArr.arr/lib what could be wrong ? Jay
Nullpointer exception during wsdl fetch
Hi, I'm seeing Nullpointer exception during wsdl fetch. This eventually leads to stack over flow. This is mainly due to conncurrent access. Does any one have any idea on this? From google search the reason for this seems to be This is because the WSDL handling system reuses javax.wsdl.Definition objects across threads, which are not thread safe, because they internally use DOM elements. References http://jira.jboss.com/jira/browse/JBWS-419;jsessionid=AA4270C1E4896751CF 2440D7C6696706 http://www.mail-archive.com/[EMAIL PROTECTED]/msg01292.html Any idea on this bug? BTW I'm seeing this in Axis2 1.2 java.lang.NullPointerException at org.apache.xerces.dom.ParentNode.nodeListItem(Unknown Source) at org.apache.xerces.dom.ParentNode.item(Unknown Source) at com.ibm.wsdl.util.xml.DOM2Writer.print(Unknown Source) at com.ibm.wsdl.util.xml.DOM2Writer.print(Unknown Source) at com.ibm.wsdl.util.xml.DOM2Writer.serializeAsXML(Unknown Source) at com.ibm.wsdl.extensions.schema.SchemaSerializer.marshall(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source) at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:848) at org.apache.axis2.transport.http.ListingAgent.processListService(ListingA gent.java:221) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(St ubSecurityHelper.java:223) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityH elper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2 83) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:1 75) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java:3245) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu bject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121 ) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServ letContext.java:2003) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletCont ext.java:1909) Thanks, Haneef - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] 2 Instances of Axis2 running by default in Axis2 WAR?
Hi David, I just confirmed your comment with HEAD. I've been working off the latest release (1.3) and it looks like this was fixed 9 days after that release. Thanks, Lawrence David Illsley [EMAIL PROTECTED] 10/12/2007 03:54 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: [Axis2] 2 Instances of Axis2 running by default in Axis2 WAR? Lawrence, This isn't my area of expertise, but looking at AxisAdminServlet and AxisServlet, it looks like the init(ServletConfig) methods store/retrieve the first created configuration context from an attribute on the ServletContext, so only one should be created: Extract: this.configContext = (ConfigurationContext) servletContext.getAttribute(CONFIGURATION_CONTEXT); if(configContext == null){ configContext = initConfigContext(config); config.getServletContext().setAttribute(CONFIGURATION_CONTEXT, configContext); } Does that make sense? David On 11/10/2007, Lawrence Mandel [EMAIL PROTECTED] wrote: I'm trying to understand how Axis2 is initialized. When deploying Axis2 in a Servlet container (like Tomcat) there are two Servlets that get invoked: AxisServlet and AxisAdminServlet. Both of these Servlets seem to go through the same initialization routine setting up Axis2 configurations. In this way it appears that both Servlets contain their own instance of Axis2 and therefore their own copies of the running services and modules and both will probe for new services and modules. It seems to me that Axis2 should only be configured once and this configuration should be shared between AxisServlet and AxisAdminServlet. Am I correct in my assessment above and if so are two instances of Axis2 created intentionally? Thanks, Lawrence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Illsley - IBM Web Services Development - 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: Problem with UserGuides example AddressBook
I solve the problem now. But I have another problem, that is: how can I test this service? I try start the Main.class with -lhttp://localhost:8080/axis/services/AddressBook;. But I got exception: log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). log4j:WARN Please initialize the log4j system properly. Using proxy without session maintenance. (queries without session should say: ADDRESS NOT FOUND!) Storing address for 'Purdue Boilermaker' Querying address for 'Purdue Boilermaker' Exception in thread main AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: Premature end of file. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at AddressFetcher2.AddressBookSOAPBindingStub.getAddressFromName(AddressBookSOAPBindingStub.java:204) at samples.addr.Main.doit(Main.java:77) at samples.addr.Main.main(Main.java:108) {http://xml.apache.org/axis/}hostname:dkv1085 org.xml.sax.SAXParseException: Premature end of file. at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at AddressFetcher2.AddressBookSOAPBindingStub.getAddressFromName(AddressBookSOAPBindingStub.java:204) at samples.addr.Main.doit(Main.java:77) at samples.addr.Main.main(Main.java:108) Caused by: org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) ... 15 more Thomas Chang [EMAIL PROTECTED] schrieb: Dear all, I downloaded and installed the AXIS 1.4. I try the eamples according the UserGuide. By the scetion Server-side bindings I created the deploy.wsdd with java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true AddressBook.wsdl and the deploy.wsdd is created. Then I deploy it with AdminClient. There is no error. But as I want to look for this deployed service with http://localhost:8080/axis/services; I can't find it. Why? The deploy.wsdd looks as follow: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from AddressBookService WSDL service -- service name=AddressBook provider=java:RPC style=rpc use=encoded parameter name=wsdlTargetNamespace value=urn:AddressFetcher2/ parameter name=wsdlServiceElement value=AddressBookService/ parameter name=schemaUnqualified value=urn:AddressFetcher2/ parameter name=wsdlServicePort value=AddressBook/ parameter name=className value=AddressFetcher2.AddressBookSOAPBindingSkeleton/ parameter name=wsdlPortType value=AddressBook/ parameter
Re: problem of soap version in axis2/java 1.2
Hi, If possible post the full message traces from Axis2/C... Seems like there is a bug in either one of them, causing them not to interoperate on SOAP1.2+MTOM... thanks, Thilina On 10/12/07, donald yang [EMAIL PROTECTED] wrote: Hi everyone, First I wrote a simple web service using AXIS2/JAVA 1.2. Then I wrote a web service client test case using AXIS2/C 1.0 to access the web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact and set the SOAP version to SOAP 1.2. I got one exception Invalid Content Type Field in the Mime Message Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2/JAVA 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Then I resetting the SOAP vesion to SOAP 1.1 in the web service client wrote using AXIS2/C 1.0. It works fine. But when I looked at the wsdl generated by AXIS2/JAVA 1.2, it has three ports, HTTP PORT, SOAP 1.1 PORT, SOAP1.2 PORT. That means it should support the SOAP request with version 1.2. Is there anyone can tell me how to enable the server support SOAP 1.2 in AXIS2/JAVA 1.2? many thanks in advnace. best regards yong -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem of soap version in axis2/java 1.2
Hi everyone, First I wrote a simple web service using AXIS2/JAVA 1.2. Then I wrote a web service client test case using AXIS2/C 1.0 to access the web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact and set the SOAP version to SOAP 1.2. I got one exception Invalid Content Type Field in the Mime Message Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2/JAVA 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Then I resetting the SOAP vesion to SOAP 1.1 in the web service client wrote using AXIS2/C 1.0. It works fine. But when I looked at the wsdl generated by AXIS2/JAVA 1.2, it has three ports, HTTP PORT, SOAP 1.1 PORT, SOAP1.2 PORT. That means it should support the SOAP request with version 1.2. Is there anyone can tell me how to enable the server support SOAP 1.2 in AXIS2/JAVA 1.2? many thanks in advnace. best regards yong
RE: Peculiar Issue while testing a service
Hi Amila, The message has bounced saying your mail box is full. I am just sending you the text, pl let me know if i can send you the attachements as well. The attachment is of size 109KB. Cheers Natraj. -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 12 October 2007 11:09 To: 'axis-user@ws.apache.org' Subject: RE: Peculiar Issue while testing a service Hi Amila, I have broken up the files into different zips for better understanding. I am using AXIS2 1.2 version. The xsds and wsdl.zip - has the complete set of my xsds and the LnReq.wsdl which was used in wsdltojava to generate classes. The GEM_Ln_XMLInterface.xsd contains a complex structure GEM_Ln_LoanRequestDetails where i am trying to add extra simple type elements. This folder also has the sample xml LnReq.xml which was used for submission using the first approach. Testharness.zip : This has classes which read the excel and then put them into the axis mapping classes. Pl refer to the XMLTests.java, then HSSF_BindingStubs.java, and MaptoAxisClasses.java. Map to axis classes inserts the data into the axis classes, then calls the stub. This is the second approach of testing which i spoke about. stubs_skeleons.zip : I have given you the skeleton, stub and the LoanReqClient classes in this. The LoanReqClient class is the one which read the LnReq.xml for submission by the first approach. Following is the wsdl to java i used -uri C:\workspaces\XFactorValidation\GEM_XMLI_ServiceProj\gexmlixsd\LnReq.wsdl -ss -sd -s -p com.gemoney.xml.javabinding -o C:\workspaces\XFactorValidation\GEM_XMLI_ServiceProj -g. You may have to generate the binding classes yourself ( as they are huge i did not attach ) and replace my skeleton class just for verification purposes. Let me know if you are looking for any more information. Thanks for your help. Cheers Natraj. -Original Message- From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: 12 October 2007 10:36 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service ok can you send me your code. (please send only the relavent things to reproduce the bug). and tell me the steps to produce your error. Amila. On 10/12/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Both the ways have been tested. With product Id and with test elements. We have built a test harness which reads all data from an excel sheet, forms a custom domain object set. There is a mapper class which individually maps the object elements from this domain onto axis generated class, finally passing the top level object to the stub. This way too, every thing works fine before including the new simple types. Once these come into picture it starts giving errors. if you had noted by code below, the same piece of parsing mechanism going fine at client side, but the same parsing at server side is throwing the un expected element. -Original Message- From: Amila Suriarachchi [mailto: [EMAIL PROTECTED] Sent: 12 October 2007 10:20 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service with out generating the xml from anther IDE. generated it with the generated client code. try to remove those test elements and add productionID and see. Amila. On 10/11/07, Gudla, Natraj (GE Money, consultant) [EMAIL PROTECTED] wrote: Hi Amila, Anything on this? Cheers Natraj. -Original Message- From: Gudla, Natraj (GE Money, consultant) Sent: 10 October 2007 11:27 To: ' axis-user@ws.apache.org' Subject: RE: Peculiar Issue while testing a service Yes i do. and i run the wsdl2java on the wsdl which refers to this xsd. I have just been doing some debuggin and see how the reader.getName() differs on the client side and the server side. The class GEM_Ln_LoanRequestDetails which was generated by axis, returns as test ( test is the simple element i added for testing ). The same code at server side returns a {GEMoney:XMLI}test, GEMoney:XMLI is the name space in which the complext type having test is defined. Why is this difference in reading the name of the reader from the same piece of code at client and server. Further i understand the condition below fails at server and not in client call. if (reader.isStartElement() new javax.xml.namespace.QName(, test) .equals(reader.getName())) { The QName conditions is false at server side and hence it jumps to the excpetion loop to create the error. Does this give some clue? Thanks Natraj. [Gudta, Natraj (GE Money, consultant)] -Original Message- From: Antonio Manuel Muñiz Martín [mailto: [EMAIL PROTECTED] ] Sent: 10 October 2007 11:18 To: axis-user@ws.apache.org Subject: Re: Peculiar Issue while testing a service Do you modify the xsd in the correct place? Perhaps you are modifying the xsd and on deploy time the xsd used is other. 2007/10/10, Gudla, Natraj (GE Money, consultant)
Re: problem of soap version in axis2/java 1.2
This can be due to the action= parameter of the content type of the MIME message generated by Axis2/c (Notice the unnecessary quotes)... Modify your Axis2.xml of the server to send the full stack trace with faults and post the full stack trace.. Also log a JIRA with Axis2/C. ~Thilina On 10/12/07, donald yang [EMAIL PROTECTED] wrote: Hi Keith, Thanks for your reply. The problem I currently have is that I will reveive an exception Invalid Content Type Field in the Mime Message as a SOAP reply when I set the soap version to 1.2 in the web service client written using AXIS2/C 1.0. But when I set the soap version to 1.1 in the web service client, it works as what I expect. The environment for this test case is as follows: Web service Client: use AXIS2/C 1.0 Web Service: POJO web serice and AXIS2/JAVA 1.2 WSDL : automatically generated by AXIS2/JAVA 1.2 which has three port: HTTP, SOAP1.2, SOAP1.1 The soap messages for this test case can be found in the attachment. best regards donald On 10/12/07, keith chapman [EMAIL PROTECTED] wrote: No need to change anything. If the request is SOAP 1.1 the response will be SOAP 1.1. if it is SOAP 1.2 the response will be SOAP 1.2. Thanks, Keith. On 10/12/07, donald yang [EMAIL PROTECTED] wrote: Hi everyone, First I wrote a simple web service using AXIS2/JAVA 1.2. Then I wrote a web service client test case using AXIS2/C 1.0 to access the web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact and set the SOAP version to SOAP 1.2. I got one exception Invalid Content Type Field in the Mime Message Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2/JAVA 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Then I resetting the SOAP vesion to SOAP 1.1 in the web service client wrote using AXIS2/C 1.0. It works fine. But when I looked at the wsdl generated by AXIS2/JAVA 1.2, it has three ports, HTTP PORT, SOAP 1.1PORT, SOAP1.2 PORT. That means it should support the SOAP request with version 1.2. Is there anyone can tell me how to enable the server support SOAP 1.2 in AXIS2/JAVA 1.2? many thanks in advnace. best regards yong -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/ -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] Stopping display of WSDL
Thank you for the reply. The suggestion worked but not quite as I was hoping. We received the following message when we followed your suggestion: Unable to generate WSDL 1.1 for this serviceIf you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml I am hoping that there might be a way to either return nothing or even better yet, return a 404 message. Any suggestions? Thank you for your time. Date: Fri, 12 Oct 2007 08:30:23 +0530 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Re: [Axis2] Stopping display of WSDL Hi, One way of doing this is to add useOriginalwsdl parameter true to the service definition in services.xml and not giving a wsdl file in META-INF. test.Test true Hope this helps. Upul On 10/11/07, Nathan Hook [EMAIL PROTECTED] wrote: Is there a way to stop Axis2 from displaying a WSDL when a request is made to a service with the ?wsdl ending? E.g.: http:///xxx.com/services/buysomething?wsdl I've looked for a way to do this, but I'm afraid that I'm looking in the wrong places. Any friendly push in the right direction is appreciated. Thank you for your time. _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxisCallback stuck the application
With further debugging, I found something interesting: when the onMessage() method is done in AxisCallback, the application proceeds on the method public void run() in class OutInAxisOperationClient, and then somehow the application seems hanging for ever. I have not downloaded the axis2 source code to debug, but I believe that something is not right after the AxisCallback finishes onMessage() and then returns the control to the run() method in OutInAxisOperationClient. Thanks. Rajith Attapattu wrote: Put you notification logic in the public void onComplete() { //nothing here } So when it completes (either fault/error or sucess) , this method will be called. Here is a faily elementry example (not the most elegant) Modify the generated class as follows. public void onComplete() { _complete = true; } and add a isComplete Method boolean isComplete() { return _complete; } you can now use it like the old Callback class. while ( !_axisCallBack.isComplete()) { Thread.sleep(1000); } Hope this helps. On 10/12/07, *Huitang Li* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thanks, Deepal. I will be happy to create a JRIA. But can you show me a good example using this new API in the client code? I am working on a project, and I cannot wait for the next Axis2 release. Thanks. Huitang Deepal jayasinghe wrote: Hi Huitang , Definitely a bug in codegen , please create a JRIA. Thanks Deepal All these codes are auto-generated by Axis2 1.3 wsdl2java command. I do not know whether it is an old callback or not. But it does says: _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { // all the codes that I pasted in my previous email. } In the generated code, the onComplete() method looks like this: public void onComplete() { // Do nothing by default } Maybe there is something incorrectly generated by wsdl2java? Rajith Attapattu wrote: What do you mean by the application is stuck ? How does your application figure out if a response is received? Can you please cut paste the code that uses the AxisCallback. Does the onMessage, onError or onFault methods get called? If so why do u say it is stuck? Looks like the onMessage and onError methods get called, bcos u seem to have put the old callback there and you mentioned that it works. public void onComplete() { //nothing here } I also see that the onComplete method is empty. -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.com/ - 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] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Handshake call back for soap client
Hi, I am developing an axis based soap client to talk to a soap server (gsoap based) using ssl mutual authentication. As some of you experts had suggested, I simply added some system properties on the client side for keystore, truststore etc and it all worked fine i.e. ssl handshake and web service call. However the thing is that I need to kind of interrupt the ssl handshake process and verify some specific fields in the certificate presented by the server. Something like ssl handshake callback (HandshakeCompletedListener) either during the handshake or after the handshake is done and if the verification fails then I need to raise an error. Any ideas how can I achieve this. Any any help will be highly appreciated. thanks, Deep
Re: problem of soap version in axis2/java 1.2
No need to change anything. If the request is SOAP 1.1 the response will be SOAP 1.1. if it is SOAP 1.2 the response will be SOAP 1.2. Thanks, Keith. On 10/12/07, donald yang [EMAIL PROTECTED] wrote: Hi everyone, First I wrote a simple web service using AXIS2/JAVA 1.2. Then I wrote a web service client test case using AXIS2/C 1.0 to access the web service. In the client, I have enabled MTOM even if there is no binaary attachment to send in fact and set the SOAP version to SOAP 1.2. I got one exception Invalid Content Type Field in the Mime Message Then I compared the soap request created by AXIS2/C 1.0 with the soap request created by AXIS2/JAVA 1.2. I found the major difference is that the value of start-info is application/xop+xml not text/xml in the soap request created by AXIS2/C. Then I resetting the SOAP vesion to SOAP 1.1 in the web service client wrote using AXIS2/C 1.0. It works fine. But when I looked at the wsdl generated by AXIS2/JAVA 1.2, it has three ports, HTTP PORT, SOAP 1.1 PORT, SOAP1.2 PORT. That means it should support the SOAP request with version 1.2. Is there anyone can tell me how to enable the server support SOAP 1.2 in AXIS2/JAVA 1.2? many thanks in advnace. best regards yong -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
Re: AxisCallback stuck the application
Put you notification logic in the public void onComplete() { //nothing here } So when it completes (either fault/error or sucess) , this method will be called. Here is a faily elementry example (not the most elegant) Modify the generated class as follows. public void onComplete() { _complete = true; } and add a isComplete Method boolean isComplete() { return _complete; } you can now use it like the old Callback class. while ( !_axisCallBack.isComplete()) { Thread.sleep(1000); } Hope this helps. On 10/12/07, Huitang Li [EMAIL PROTECTED] wrote: Thanks, Deepal. I will be happy to create a JRIA. But can you show me a good example using this new API in the client code? I am working on a project, and I cannot wait for the next Axis2 release. Thanks. Huitang Deepal jayasinghe wrote: Hi Huitang , Definitely a bug in codegen , please create a JRIA. Thanks Deepal All these codes are auto-generated by Axis2 1.3 wsdl2java command. I do not know whether it is an old callback or not. But it does says: _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { // all the codes that I pasted in my previous email. } In the generated code, the onComplete() method looks like this: public void onComplete() { // Do nothing by default } Maybe there is something incorrectly generated by wsdl2java? Rajith Attapattu wrote: What do you mean by the application is stuck ? How does your application figure out if a response is received? Can you please cut paste the code that uses the AxisCallback. Does the onMessage, onError or onFault methods get called? If so why do u say it is stuck? Looks like the onMessage and onError methods get called, bcos u seem to have put the old callback there and you mentioned that it works. public void onComplete() { //nothing here } I also see that the onComplete method is empty. -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.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] -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.com/
Re: AxisCallback stuck the application
Thanks, Deepal. I will be happy to create a JRIA. But can you show me a good example using this new API in the client code? I am working on a project, and I cannot wait for the next Axis2 release. Thanks. Huitang Deepal jayasinghe wrote: Hi Huitang , Definitely a bug in codegen , please create a JRIA. Thanks Deepal All these codes are auto-generated by Axis2 1.3 wsdl2java command. I do not know whether it is an old callback or not. But it does says: _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { // all the codes that I pasted in my previous email. } In the generated code, the onComplete() method looks like this: public void onComplete() { // Do nothing by default } Maybe there is something incorrectly generated by wsdl2java? Rajith Attapattu wrote: What do you mean by the application is stuck ? How does your application figure out if a response is received? Can you please cut paste the code that uses the AxisCallback. Does the onMessage, onError or onFault methods get called? If so why do u say it is stuck? Looks like the onMessage and onError methods get called, bcos u seem to have put the old callback there and you mentioned that it works. public void onComplete() { //nothing here } I also see that the onComplete method is empty. -- Rajith Attapattu Red Hat Blog http://mutlix.blogspot.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]
Soap Faults and Exception
I am using Axis2 1.3 I have defined a custom Fault in my WSDL. It worked fine using axis 1. But now when I run WSDL2code via the maven2 pluggin I get errors when I try to compile my classes such as: java:[63,17] incompatible types found : wfnp.ServiceException required: java.lang.Throwable the wfnp.ServiceException class doesn't even extend any kind of throwable, so how can my classes actually throw it ? I am very frustrated and confused. Jay
RE: Axis n00b needs help with an axis fault (internal to axis)
Are you trying to input that number into an int or Integer? The largest value allowed for an int or Integer is 2147483647. If you are using an int or Integer you might want to consider moving to either a long or Long. Best of luck. Subject: Axis n00b needs help with an axis fault (internal to axis) Date: Fri, 12 Oct 2007 12:10:36 -0700 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org On the surface, this looks like something simple. The problem here is that it’s occurring inside the axis call where I have no ablility to debug. TCPMon’s been no help, and neither has my debugger. Does anyone have enough knowledge about Axis and the way it works to have idea how I can track this error down or what it means? [#|2007-10-12T11:57:16.113-0700|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=42;_ThreadName=httpWorkerThread-8080-1;_RequestID=7ff360c2-4738-4031-a97a-49d48b1a5aed;|StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NumberFormatException: For input string: 1192215294017 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:D1234 java.lang.NumberFormatException: For input string: 1192215294017 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.test.stub.TestServiceBindingStub.getJobStatus(Unknown Source) at org.apache.jsp.default_jsp._jspService(default_jsp.java:365) |#] _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with UserGuides example AddressBook
Dear all, I downloaded and installed the AXIS 1.4. I try the eamples according the UserGuide. By the scetion Server-side bindings I created the deploy.wsdd with java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true AddressBook.wsdl and the deploy.wsdd is created. Then I deploy it with AdminClient. There is no error. But as I want to look for this deployed service with http://localhost:8080/axis/services; I can't find it. Why? The deploy.wsdd looks as follow: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from AddressBookService WSDL service -- service name=AddressBook provider=java:RPC style=rpc use=encoded parameter name=wsdlTargetNamespace value=urn:AddressFetcher2/ parameter name=wsdlServiceElement value=AddressBookService/ parameter name=schemaUnqualified value=urn:AddressFetcher2/ parameter name=wsdlServicePort value=AddressBook/ parameter name=className value=AddressFetcher2.AddressBookSOAPBindingSkeleton/ parameter name=wsdlPortType value=AddressBook/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value=*/ typeMapping xmlns:ns=urn:AddressFetcher2 qname=ns:phone type=java:AddressFetcher2.Phone serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; / typeMapping xmlns:ns=urn:AddressFetcher2 qname=ns:address type=java:AddressFetcher2.Address serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; / typeMapping xmlns:ns=urn:AddressFetcher2 qname=ns:stateType type=java:AddressFetcher2.StateType serializer=org.apache.axis.encoding.ser.EnumSerializerFactory deserializer=org.apache.axis.encoding.ser.EnumDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; / /service /deployment - Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen.
Axis n00b needs help with an axis fault (internal to axis)
On the surface, this looks like something simple. The problem here is that it's occurring inside the axis call where I have no ablility to debug. TCPMon's been no help, and neither has my debugger. Does anyone have enough knowledge about Axis and the way it works to have idea how I can track this error down or what it means? [#|2007-10-12T11:57:16.113-0700|SEVERE|sun-appserver-pe9.0|javax.enterpr ise.system.container.web|_ThreadID=42;_ThreadName=httpWorkerThread-8080- 1;_RequestID=7ff360c2-4738-4031-a97a-49d48b1a5aed;|StandardWrapperValve[ jsp]: Servlet.service() for servlet jsp threw exception AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NumberFormatException: For input string: quot;1192215294017quot; faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:D1234 java.lang.NumberFormatException: For input string: 1192215294017 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja va:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav a:129) at org.apache.axis.encoding.DeserializationContext.endElement(Deserializati onContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon text.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan dChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.test.stub.TestServiceBindingStub.getJobStatus(Unknown Source) at org.apache.jsp.default_jsp._jspService(default_jsp.java:365) |#]
Re: Axis2 1.3 and Servlet Spec
depends on the container that axis wil be implement on e.g. Apache Tomcat version 5.5 implements the Servlet 2.4 Apache Tomcat version 6.0 implements the Servlet 2.5 Are you using a different container? Martin-- - Original Message - From: Kiran Kumar Sriram To: axis-user@ws.apache.org Sent: Friday, October 12, 2007 2:15 PM Subject: Axis2 1.3 and Servlet Spec Hello All, Axis2 1.3 can be installed in any Servlet Container, but is there any minimum Servlet specification(2.1 or 2.3) that is needed for Axis2 1.3 ? Any help is greatly appreciated. Thanks, Kiran -- Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now!
wsdl2java generate abstract class rather than skeleton
Axis2 crew, I use wsdl2java to generate java code and then modify the skeleton.java file to meet my needs. This is a bit awkward because if I change my .wsdl file and then regenerate, my hand modified skeleton with be wiped out (or out of date). What I think would be better is if wsdl2java were to generate an abstract class. I could code my own class that would extend the abstract class. I would get a compile error if my class did not match the abstract class after a fresh run of wsdl2java. I am new to axis2 so I am hoping someone thinks this is a good idea and has already done it, or someone thinks this is a bad idea because they have a better technique to deal with regenerating the java code with wsdl2java. Thank you, -- Michael Potter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem when axessing a method
Looks like you are calling the StockQuoteService for an Echo service payload. Better follow the Axis2 Quick Start Guide examples exactly first. All the source code and build scripts are given in the samples directory. In the Axis2 Quick Start Guide check, Building the service using AXIOM Creating a client using AXIOM Also check the server side console log messages. On 10/12/07, jerome.mariette [EMAIL PROTECTED] wrote: ok I guess I got fast in my conclusion !! because it's not working really well neither si as I know I did everything with the 1.2 I got back with this version !!! so I deployed an exemple: the quickstart exemple from my browser everyything is still working fine ... but from my java code: Exception in thread main org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method getPrice at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java :434) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:373) at org.apache.axis2.description.OutInAxisOperationClient.execute ( OutInAxisOperation.java:294) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500) at EssaiMbari1.main(Quickstart.java:35) so I don't get anything !! my client is: import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options ; import org.apache.axis2.client.ServiceClient; public class EssaiMbari1 { public static OMElement createPayLoad() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://ws.apache.org/axis2/xsd;, ns1); OMElement method = fac.createOMElement(echo, omNs); OMElement value = fac.createOMElement(value, omNs); value.setText(Hello , my first service utilization); method.addChild(value); return method; } public static void main(String[] args) throws Exception { ServiceClient client = new ServiceClient(); // create option object Options opts = new Options(); //setting target EPR opts.setTo(new EndpointReference( http://mbari1.neptune.uvic.ca:8080/axis2/services/StockQuoteService/getPrice?symbol=IBM )); //Setting action ,and which can be found from the wsdl of the service opts.setAction(urn:getPrice); client.setOptions(opts); OMElement res = client.sendReceive(createPayLoad()); System.out.println(res); } } - Can someone try it so I can see I'm not crazy ? I'm working under eclipse and imported the .jar from the axis2_1.2/lib folder (the one defined by my AXIS2_HOME so the one used to compile my file!) thx for your help jerome.mariette wrote: allright, just change of version of axis2.war to the 1.3 and everything is working ;) jerome.mariette wrote: Hi everybody, I wrote a basic web service: public String test (String t) { return (t); } when deployed, I have access to it easily throught my broser: http://localhost:8080/axis2/services/Test/test?t=I love axis But when writing a java client: public static void main(String[] args) throws Exception { ServiceClient client = new ServiceClient(); // create option object Options opts = new Options(); //setting target EPR opts.setTo(new EndpointReference(http://localhost:8080/axis2/services/Test/test )); //Setting action ,and which can be found from the wsdl of the service opts.setAction(urn:test); client.setOptions(opts); OMElement res = client.sendReceive(createPayLoad()); System.out.println(res); } public static OMElement createPayLoad() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://axis.org;, ns1); OMElement method = fac.createOMElement(test, omNs); OMElement value = fac.createOMElement(t, omNs); value.setText(I Love Axis); method.addChild(value); return method; } This is not working !!! and I get the following error: Exception in thread main org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method test at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext( Utils.java:434) at org.apache.axis2.description.OutInAxisOperationClient.send
RE: [Axis2] Stopping display of WSDL
I would suggest you open a JIRA for an enhancement. I think we should be returning an error without the message, too. Nadir K. Amra Nathan Hook [EMAIL PROTECTED] wrote on 10/12/2007 12:22:43 PM: Thank you for the reply. The suggestion worked but not quite as I was hoping. We received the following message when we followed your suggestion: Unable to generate WSDL 1.1 for this serviceIf you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml I am hoping that there might be a way to either return nothing or even better yet, return a 404 message. Any suggestions? Thank you for your time. Date: Fri, 12 Oct 2007 08:30:23 +0530 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Re: [Axis2] Stopping display of WSDL Hi, One way of doing this is to add useOriginalwsdl parameter true to the service definition in services.xml and not giving a wsdl file in META-INF. test.Test true Hope this helps. Upul On 10/11/07, Nathan Hook [EMAIL PROTECTED] wrote: Is there a way to stop Axis2 from displaying a WSDL when a request is made to a service with the ?wsdl ending? E.g.: http:///xxx.com/services/buysomething?wsdl I've looked for a way to do this, but I'm afraid that I'm looking in the wrong places. Any friendly push in the right direction is appreciated. Thank you for your time. _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx? s_cid=wl_hotmailnews - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Windows Live Hotmail and Microsoft Office Outlook ? together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx? pid=CL100626971033 - 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]