Re: Bug in axis2c xml parsing?
Please raise an issue in JIRA. Regs Lahiru On Thu, 2007-10-18 at 16:02 -0400, Subra A Narayanan wrote: > Hello folks, > > I use the following code to parse an incoming ws request. I am posting > only snippets of the code for sake of brevity > > **CODE > BEGIN*** > > axutil_qname_t *Qname = axutil_qname_create(env, "Price", > MY_NAMESPACE_URI, MY_NAMESPACE_PREFIX); > axiom_node_t *myNode = NULL; > axiom_element_t *myElement = NULL; > myElement = axiom_element_get_first_child_with_qname(rootElement, > env, Qname, rootNode, &myNode); > > if (myNode) > { > ... > ... > ... > return AXIS2_SUCCESS; > } > else > { > AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Error!!"); > return AXIS2_FAILURE; > } > > **CODE > END** > > If I have a node like this, it just works fine (here 'MyOperation' is > the root node from above) > > >250 > > > > but if I have a node like this > > > > > > the control goes in to the else condition and it returns AXIS2_FAILURE > > I would think this shouldn't be happening since we do have a 'Price' > node although it is empty. > > Is this by design or have I found a bug? > > > Thanks, > Subra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug in axis2c xml parsing?
Hello folks, I use the following code to parse an incoming ws request. I am posting only snippets of the code for sake of brevity **CODE BEGIN*** axutil_qname_t *Qname = axutil_qname_create(env, "Price", MY_NAMESPACE_URI, MY_NAMESPACE_PREFIX); axiom_node_t *myNode = NULL; axiom_element_t *myElement = NULL; myElement = axiom_element_get_first_child_with_qname(rootElement, env, Qname, rootNode, &myNode); if (myNode) { ... ... ... return AXIS2_SUCCESS; } else { AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Error!!"); return AXIS2_FAILURE; } **CODE END** If I have a node like this, it just works fine (here 'MyOperation' is the root node from above) 250 but if I have a node like this the control goes in to the else condition and it returns AXIS2_FAILURE I would think this shouldn't be happening since we do have a 'Price' node although it is empty. Is this by design or have I found a bug? Thanks, Subra
Re: Problem with invoking a https based service
Hi, If i commented user name from client_policy.xml . It is giving "username token notspcified" error in log. If uncommented than it asking for password. My aim is to just access services from server using ssl. Server required authentication username and passwd. I got cirtificate from server and resendig to the server for autharization. I am also attaching service.xml. Thanks Divakar Dumindu Pallewela wrote: divakar wrote: Hi, I commented user name from client_policy.xml . I is giving "user name token notspcified" error in log. That is an error logged from rampart. I have one doubt why it is accessing service.xml from /usr/local/axis2c/services/sec_echo/service.xml. should it need for client. I'm afraid I didn't get what you mean. If what you are asking is whether a service needs a service.xml, of course it does. HTH, Dumindu. sec_echo This is a testing service , to test Rampart/C [Security] functionalities. http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity http://schemas.xmlsoap.org/ws/2004/09/policy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://ws.apache.org/rampart/c/policy";> pbsgridworks\\administrator 360 b Digest /usr/local/axis2c/bin/samples/rampart/callback/libpwcb.so /home/divakar/Desktop/examples/murali.pem - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with invoking a https based service
divakar wrote: > Hi, > I commented user name from client_policy.xml . I is giving "user > name token notspcified" error in log. That is an error logged from rampart. > I have one doubt why it is > accessing service.xml from > /usr/local/axis2c/services/sec_echo/service.xml. should it need for client. I'm afraid I didn't get what you mean. If what you are asking is whether a service needs a service.xml, of course it does. HTH, Dumindu. -- Dumindu Pallewela http://blog.dumindu.com GPG ID: 0x9E131672 WSO2 | http://wso2.com | "Oxygenating the Web Service Platform" signature.asc Description: OpenPGP digital signature
Re: Problem with invoking a https based service
Hi, You don't need to engage Ramprat to provide transport level security. This is why you get above error. Please remove the line ref="rampart"/> from the axis2.xml. If you are not planning for a message level protection, you don't need to have security polices in the services.xml or in the client_policy.xml. -Kaushalye divakar wrote: Hi, I commented user name from client_policy.xml . I is giving "user name token notspcified" error in log. I have one doubt why it is accessing service.xml from /usr/local/axis2c/services/sec_echo/service.xml. should it need for client. Thanks Divakar Dumindu Pallewela wrote: Hi Divakar, You don't have to set a "userName" parameter for https transport to work. If you have encrypted the server key using a password it should be given in the SSL_PASSPHRASE parameter. In addition, AFAIK, "userName" and "password" parameters are not at all used in axis2/c. HTH -Dumindu. divakar wrote: Hi All, I am facing some problems with invoking a https based .Net webservice using the axis2c client. I am getting Error code 2. It is giving error "cannot find the password for user pbsgridworks\\administrator". How can i set the password to this. I am sending axis.xml ,my .c file and client_policy.xml file. Please check and give reply. Thanks Divakar - 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] -- http://kaushalye.blogspot.com/ http://wso2.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with invoking a https based service
Hi, I commented user name from client_policy.xml . I is giving "user name token notspcified" error in log. I have one doubt why it is accessing service.xml from /usr/local/axis2c/services/sec_echo/service.xml. should it need for client. Thanks Divakar Dumindu Pallewela wrote: Hi Divakar, You don't have to set a "userName" parameter for https transport to work. If you have encrypted the server key using a password it should be given in the SSL_PASSPHRASE parameter. In addition, AFAIK, "userName" and "password" parameters are not at all used in axis2/c. HTH -Dumindu. divakar wrote: Hi All, I am facing some problems with invoking a https based .Net webservice using the axis2c client. I am getting Error code 2. It is giving error "cannot find the password for user pbsgridworks\\administrator". How can i set the password to this. I am sending axis.xml ,my .c file and client_policy.xml file. Please check and give reply. Thanks Divakar - 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 invoking a https based service
Hi Divakar, You don't have to set a "userName" parameter for https transport to work. If you have encrypted the server key using a password it should be given in the SSL_PASSPHRASE parameter. In addition, AFAIK, "userName" and "password" parameters are not at all used in axis2/c. HTH -Dumindu. divakar wrote: > Hi All, > > I am facing some problems with invoking a https based .Net > webservice using the axis2c client. I am getting Error code 2. It is > giving error "cannot find the password for user > pbsgridworks\\administrator". How can i set the password to this. > I am sending axis.xml ,my .c file and client_policy.xml file. Please > check and give reply. > > Thanks > Divakar > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Dumindu Pallewela http://blog.dumindu.com GPG ID: 0x9E131672 WSO2 | http://wso2.com | "Oxygenating the Web Service Platform" signature.asc Description: OpenPGP digital signature
Problem with invoking a https based service
Hi All, I am facing some problems with invoking a https based .Net webservice using the axis2c client. I am getting Error code 2. It is giving error "cannot find the password for user pbsgridworks\\administrator". How can i set the password to this. I am sending axis.xml ,my .c file and client_policy.xml file. Please check and give reply. Thanks Divakar false false true pbsgridworks\\administrator [EMAIL PROTECTED] . 6060 HTTP/1.1 /home/divakar/cert.pem passphrase http://schemas.xmlsoap.org/ws/2004/09/policy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";> http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/> http://ws.apache.org/rampart/c/policy";> pbsgridworks\\administrator Digest /usr/local/axis2c/bin/samples/rampart/callback/libpwcb.so #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include axiom_node_t *getHeaderNode(const axutil_env_t *env) { /* Namespace element declarations */ axiom_namespace_t *wsa_ns= NULL; axiom_namespace_t *wsse_ns=NULL; axiom_namespace_t *wsu_ns=NULL; axiom_node_t *header_node=NULL,*to_node=NULL,*action_node=NULL; axiom_element_t *header_element=NULL,*to_element=NULL,*action_element=NULL; axiom_text_t *om_text=NULL; axiom_node_t *text_node=NULL; axiom_node_t *security_node=NULL,*usernametoken_node=NULL,*username_node=NULL,*password_node=NULL; axiom_element_t *security_element=NULL,*usernametoken_element=NULL,*username_element=NULL,*password_element=NULL; axiom_attribute_t *password_attribute=NULL,*body_attribute=NULL,*to_attribute=NULL; /* Creating all the namespace elements */ wsa_ns= axiom_namespace_create(env,"http://www.w3.org/2005/08/addressing","wsa";); wsse_ns=axiom_namespace_create(env,"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","wsse";); wsu_ns=axiom_namespace_create(env,"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd","wsu";); /* SOAP Header element */ header_element=axiom_element_create(env,NULL,"Header",NULL,&header_node); security_element=axiom_element_create(env,NULL,"Security",wsse_ns,&security_node); /* Usernametoken element to pass the username, password to HPCPwebservice */ usernametoken_element=axiom_element_create(env,NULL,"UsernameToken",wsse_ns,&usernametoken_node); axiom_element_set_namespace(usernametoken_element,env,wsse_ns,usernametoken_node); username_element=axiom_element_create(env,NULL,"Username",wsse_ns,&username_node); om_text=axiom_text_create(env,username_node,"PBSGRIDWORKS\\administrator",&text_node); password_element=axiom_element_create(env,NULL,"Password",wsse_ns,&password_node); password_attribute=axiom_attribute_create(env,"Type","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText",NULL); axiom_element_add_attribute(password_element,env,password_attribute,password_node); om_text=axiom_text_create(env,password_node,"[EMAIL PROTECTED]",&text_node); axiom_node_a
Re: Axis Core Dump while writing to log file
I have done a quick fix to the svn trunc to prevent the failure on the large file signal. Whoever, switching to another file in case of a large file is yet to be handled. Samisa... Samisa Abeysinghe wrote: Raghavendra SM wrote: Hi All, Please find below the GDB back trace of the core dump I found. Program terminated with signal 25, File size limit exceeded. #0 0xb79ac2f1 in write () from /lib/tls/libc.so.6 (gdb) bt #0 0xb79ac2f1 in write () from /lib/tls/libc.so.6 #1 0xb794ce4c in _IO_file_write () from /lib/tls/libc.so.6 #2 0xb794b869 in _IO_file_setbuf () from /lib/tls/libc.so.6 #3 0xb794b93f in _IO_do_write () from /lib/tls/libc.so.6 #4 0xb794c477 in _IO_file_sync () from /lib/tls/libc.so.6 #5 0xb79416e2 in fflush () from /lib/tls/libc.so.6 #6 0xb7af922b in axutil_log_impl_write_to_file () from /opt/aylus/lib/libaxutil.so.0 #7 0xb7af9320 in axutil_log_impl_log_debug () from /opt/aylus/lib/libaxutil.so.0 #8 0xb773a34d in axis2_http_worker_process_request (http_worker=0x81d4cc8, env=0x81d6348, svr_conn=0x81d6368, simple_request=0x81d6438) at http_worker.c:155 #9 0xb7aed01f in axis2_svr_thread_worker_func (thd=0x81c4180, data=0x81d4d00) at http_svr_thread.c:256 #10 0xb7b043af in dummy_worker () from /opt/aylus/lib/libaxutil.so.0 #11 0xb7f71ced in start_thread () from /lib/tls/libpthread.so.0 #12 0xb79bbdee in clone () from /lib/tls/libc.so.6 When: It was produced when the axis2.log file was very huge (like 3451222890 Bytes) and axis tried to write some logs. Doubts: 1) Does axis2 log utility support writing to a new log file when ever a file becomes huge? If yes, how can we enable it? No. You are the first to report this bug. So now we know we have to handle it. Please raise a Jira and we have to fix that. 2) Does axis2 log utility support wrapping of the log file instead of appending to it after certain file size limit? If yes, how can we enable it? No, again, and it is a good idea to have this feature as well. Please raise a Jira on this as well. 3) Does axis2 has a way to preserve all the logs yet not crash due to file size limit? Crashing is a bug. That needs fixing. 4) If the answers are NO for all of the above questions, is axutil_log_impl_write_to_file() (before the fprintf, line #250)is the right place to support either of the above? Yes, that is probably where the fixes should go. Samisa... Please reply. Regards, ~raghav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Samisa Abeysinghe : WSO2 WSF/PHP "http://wso2.org/projects/wsf/php?WSO2 Web Services Framework%2FPHP - Open source PHP extention for providing and consuming Web services in PHP"; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]