Re: Axis2c Questions
I try the following approach. I connect to the database in the function init and I use a global variable for the connection information, but when a try to make any operation in the database I receive a core dump in the service. This problem only occur when I use the axis2c module for the apache server, when I use the simple http server from axis2, the approach work like a charm, so I think that the problems is something about threads. If anybody has other idea about my questions, I thank in advance. Regards, On Oct 12, 2009, at 10:18 AM, Sam Carleton wrote: I am no Axis2/C pro, and I don't have an answer to your first Q, but I believe the answer to the second question is: Do the initial connection to the database in the service's axis2_get_instance() function and then cleanup in axis2_remove_instance(). I am using SQLite and this is where I call sqlite3_initialize() and sqlite3_shutdown(), respectfully. It works for me;) Sam On Sun, Oct 11, 2009 at 12:29 PM, Jose M Medina V jose_med...@wesamconsulting.com wrote: I am using Axis2/C for a few weeks and I think this is an incredible tool, but I’m still a newbie in web services world and an axis environment. So I have a couple of questions and I appreciate any help that anyone could give to me. There are some of the questions: 1. It is possible use simple XML as a message in axis2c? If it possible could send me an example? 2. If I need run some operation in a PostgreSQL database from the web service, I have to connect and disconnect to the database every time that the web service is called? Thanks in advance and apologize for my bad English. José M. Medina V. Wesam Consulting jose_med...@wesamconsulting.com Mobile: +58(416)613-3302 +58(414)019-0580 Ofc: +58(212)959-4155 Ext. 204 BB pin: 31E562BF Caracas - Venezuela José M. Medina V. Wesam Consulting jose_med...@wesamconsulting.com Mobile: +58(416)613-3302 +58(414)019-0580 Ofc: +58(212)959-4155 Ext. 204 BB pin: 31E562BF Caracas - Venezuela
Problems using Axis2/c in Windows
I am attempting to use Axis2/c 1.6.0 to generate C client stubs in Windows with the -d adb option for use with the Microsoft C compiler and am facing three problems. First I had trouble actually generating the stubs using the WSDL2C.bat file supplied in the package. I got past this obstacle by changing the line that read: java -classpath %AXIS2_CLASSPATH% org.apache.axis2.wsdl.WSDL2C %* to: java -classpath %AXIS2_CLASSPATH% org.apache.axis2.wsdl.WSDL2C %* Since I can see no downside to it, may I suggest that this change be made to the distribution package. It could save a bit of puzzlement and frustration. The other problems cause the generated code to get compilation errors. The second is that declarations are generated that are not at the top of their blocks. I see code like this: { axiom_node_t *text_node = NULL; text_node = axiom_node_get_first_child(parent, env); axiom_text_t *text_element = NULL; ... This is fine in C++ but not in plain C. The third problem is one that I have yet to fully analyze and I will post about it later. By the way, I previously posted a version of this message to the axis-user mailing list having not realized at the time that there is an axis-c-user list. My thanks for any assistance, Pete Maclean
Signature verification fails when signing the Body
I am trying to write a client to consume a set of about 15 Web services secured by an implementation of the WS-Security 1.0 standard. These Web services require a usernametoken, that the content of the body be signed and encrypted, and that the entire usernametoken element be encrypted as well. Normally we use Axis2 and Rampart for Java, but in this case we are constrained to using C, and because other tools like gSoap don't support XML encryption, we decided on using Axis2/C and Rampart/C. The problem is that something isn't quite working right on the signing of the content. When I perform the operation with the policy.xml file set to do these tasks, the Web service complains and fails with the following message: An error occured while processing the message security header: Signature verification failed. This has perplexed me for a while, because the other tools I've been using seem to work properly. I've written clients in Systinet Server for Java using their WS-Security implementation, Axis2/Rampart for Java, and Axis/WSS4J implementation, all of which work properly. I took a look at the fault message that was returned to the Axis2/C client, as it included a Java exception stack, and I see that the Web services are using an implementation of security by Amberpoint along with Entrust security libraries. So I decided to make sure this was not an implementation issue with those tools. I created a fake service from one of the services' WSDL files using a testing tool I have which uses WSS4J as its WS-Security implementation. The fake service returns a similar error: org.apache.wss4j11.security.WSSecurityException: The signature verification failed. Since I can't change the security policies of the real Web services, I decided to see what would happen if I made the signature and encryption optional in my faked out service and then played around with the options in my Axis2/C and Rampart/C based client's policy.xml file. It turns out that everything works fine except when I try to sign the body. It is when I sign the body that the signature fails. Ironically, if I sign other content in the header, such as the UsernameToken, the signature checking passes validation on my faked out service, while the real services complain that the Body isn't signed when it is required to be. Is this a known issue? I am using the 1.3.0 release. Is there any way to work around it that won't require me to change security policies on the services I am trying to consume?
Axis2 Error | Unable to determine object id
Can anyone please help in resolving the error which I get when I send a WS request. Caused by: org.apache.axis2.AxisFault: Unable to determine object id from call: is the method element namespaced? at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:517) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:188) Thanks, Appu
Axis2- creating Axis24567.att files under /var/tmp folder on unix
HiDoes anyone know why Axis2 creates these Axis2XXX.att files under /var/tmp folder, i have some web services developed using Axis 2 deployed on weblogic which is installed on unix server? How do i stop them or redirect them to a different folder -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
Possible to get more information from an AxisFault?
Hi, We''ve written a web service and a client that connects to it, both in Java (client generated using the code below) ... project xmlns:j=jelly:core xmlns:ant=jelly:ant preGoal name=java:compile ant:property name=downloadedWSDL value=target/MatchingService.wsdl / ant:get src=http://localhost:8080//apps/dor/dmv/myapp/myfn//services/MatchingService?wsdl; dest=${downloadedWSDL} username=username password=password / ant:mkdir dir=${maven.build.dir}/src / java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=maven.dependency.classpath arg line=-uri ${downloadedWSDL} / arg line=-or / arg line=-d adb / arg line=-o target/ / /java ant:javac debug=true debuglevel=vars,lines,source destdir=${maven.build.dest} excludes=**/package.html srcdir=${basedir}/target/src ant:classpath ant:path refid=maven.dependency.classpath / /ant:classpath /ant:javac /preGoal /project I wanted to know how to get axis faults to send back more information than simply what we are seeing below. Regardless of the exception generated by the web service, the exception thrown in the client is the same. Is there a way to add a message into the client so at least we know greater detail about what caused the error? org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method verifyAge 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 myco.dor.dmv.driver.matching.soap.MatchingServiceStub.verifyAge(MatchingServiceStub.java:522) at myco.dor.dmv.driver.matching.test.AgeVerifyTests.testVerifyAgeWithNullIdentityParams(AgeVerifyTests.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1072) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:682) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1434) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:632) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) Thanks, - Dave -- View this message in context: http://www.nabble.com/Possible-to-get-more-information-from-an-AxisFault--tp25873509p25873509.html Sent from the Axis - User mailing list archive at Nabble.com.
RE: Possible to get more information from an AxisFault?
That would be a nice thing to have indeed!! When Axis2 WS client code decides to classify an error situation as an AxisFault, the client application seems to have no chance to find out what has happened behind the scenes. It's just like saying failed. and nothing more. This can be very odd when the used Axis2 configuration is just idiosyncratic about what happens on the wire, and you simply do not know about that. But it is possible to force the HTTP base implementation usually used by Axis2 (which is commons-httpclient) to log the HTTP traffic, regardless of using https on the actual connection: commons-httpclient internally uses commons-logging, and there you can enable the category / filter org.apache.commons.httpclient.wire to get the http traffic logged. Usually this helps a lot in dev/test environments, but is not accessible by the application for self examination. Christian -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Tuesday, October 13, 2009 4:04 PM To: axis-user@ws.apache.org Subject: Possible to get more information from an AxisFault? Hi, We''ve written a web service and a client that connects to it, both in Java (client generated using the code below) ... project xmlns:j=jelly:core xmlns:ant=jelly:ant preGoal name=java:compile ant:property name=downloadedWSDL value=target/MatchingService.wsdl / ant:get src=http://localhost:8080//apps/dor/dmv/myapp/myfn//services/MatchingSe rv ice?wsdl dest=${downloadedWSDL} username=username password=password / ant:mkdir dir=${maven.build.dir}/src / java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=maven.dependency.classpath arg line=-uri ${downloadedWSDL} / arg line=-or / arg line=-d adb / arg line=-o target/ / /java ant:javac debug=true debuglevel=vars,lines,source destdir=${maven.build.dest} excludes=**/package.html srcdir=${basedir}/target/src ant:classpath ant:path refid=maven.dependency.classpath / /ant:classpath /ant:javac /preGoal /project I wanted to know how to get axis faults to send back more information than simply what we are seeing below. Regardless of the exception generated by the web service, the exception thrown in the client is the same. Is there a way to add a message into the client so at least we know greater detail about what caused the error? org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method verifyAge at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java :4 86) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out In AxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper at ion.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xi sOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at myco.dor.dmv.driver.matching.soap.MatchingServiceStub.verifyAge(Matching Se rviceStub.java:522) at myco.dor.dmv.driver.matching.test.AgeVerifyTests.testVerifyAgeWithNullId en tityParams(AgeVerifyTests.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Im pl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe st Runner.java:297) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnit Ta sk.java:1072) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask .j ava:682) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JU ni tTask.java:1434) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask .j ava:632) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250) at
RE: Possible to get more information from an AxisFault?
Thanks for this feedback. Although it is good to know I can put more information in the logs, my JUnit tests are not smart enough to read and parse through the logs. So is there no way I can generate different types of exceptions for the clients or include other messages? Are there other types of clients other than Axis2 that I should consider using if I want to create something to meet my goal? - Dave Christian Gosch-2 wrote: That would be a nice thing to have indeed!! When Axis2 WS client code decides to classify an error situation as an AxisFault, the client application seems to have no chance to find out what has happened behind the scenes. It's just like saying failed. and nothing more. This can be very odd when the used Axis2 configuration is just idiosyncratic about what happens on the wire, and you simply do not know about that. But it is possible to force the HTTP base implementation usually used by Axis2 (which is commons-httpclient) to log the HTTP traffic, regardless of using https on the actual connection: commons-httpclient internally uses commons-logging, and there you can enable the category / filter org.apache.commons.httpclient.wire to get the http traffic logged. Usually this helps a lot in dev/test environments, but is not accessible by the application for self examination. Christian -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Tuesday, October 13, 2009 4:04 PM To: axis-user@ws.apache.org Subject: Possible to get more information from an AxisFault? Hi, We''ve written a web service and a client that connects to it, both in Java (client generated using the code below) ... project xmlns:j=jelly:core xmlns:ant=jelly:ant preGoal name=java:compile ant:property name=downloadedWSDL value=target/MatchingService.wsdl / ant:get src=http://localhost:8080//apps/dor/dmv/myapp/myfn//services/MatchingSe rv ice?wsdl dest=${downloadedWSDL} username=username password=password / ant:mkdir dir=${maven.build.dir}/src / java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=maven.dependency.classpath arg line=-uri ${downloadedWSDL} / arg line=-or / arg line=-d adb / arg line=-o target/ / /java ant:javac debug=true debuglevel=vars,lines,source destdir=${maven.build.dest} excludes=**/package.html srcdir=${basedir}/target/src ant:classpath ant:path refid=maven.dependency.classpath / /ant:classpath /ant:javac /preGoal /project I wanted to know how to get axis faults to send back more information than simply what we are seeing below. Regardless of the exception generated by the web service, the exception thrown in the client is the same. Is there a way to add a message into the client so at least we know greater detail about what caused the error? org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method verifyAge at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java :4 86) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out In AxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper at ion.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xi sOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at myco.dor.dmv.driver.matching.soap.MatchingServiceStub.verifyAge(Matching Se rviceStub.java:522) at myco.dor.dmv.driver.matching.test.AgeVerifyTests.testVerifyAgeWithNullId en tityParams(AgeVerifyTests.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Im pl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe st Runner.java:297) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnit Ta sk.java:1072) at
Axis2 1.6 Release Date??
Hi, Can anyone tell me, when is the Axis2 2.1.6 release scheduled ? I would greatly appreciate a response.. Regards, Nirav
Using Axis2 with Log4J
Hi guys, I have developed a ws and its working pretty fine. But Im not able to log my application using log4j. Can someone tell me what exactly is necessary for me to use it? What Ive already done is: I created a log4j.xml and put it into the properties folder of my application. Running from Eclipse, it works fine. But it seems that when deployed, the web service cannot use the .xml file to log into the application. Does anyone knows what is happening?? Thanks in advance, Guilherme