Re: simple response parsing question
This will help you. http://ws.apache.org/axis2/c/docs/om_tutorial.html Supun. On Tue, Oct 21, 2008 at 8:56 PM, Mark Webb [EMAIL PROTECTED] wrote: I have a web service client written in Axis2C and am getting the response back properly. The response is just a long value. Here is the XML I receive back: ns2:initResponse xmlns:ns2=http://service.web.blah/ return1234/return/ns2:initResponse I am using the method axiom_node_get_first_child(node, env) to get the value node. I print out the node and get: return1234/return Problem is that I cannot figure out how to parse out the '1234'. I have looked at the examples but cannot get my code to work. Here is where I am at: printf(NODE = %s\n, axiom_node_to_string( return_val_node, env )); This prints out return1234/return firstNodeText = (axiom_text_t *)axiom_node_get_data_element(return_val_node, env); firstNodeString = axiom_text_get_value(firstNodeText, env); printf(Return Value = %s\n, firstNodeString); Return value is always printed as (null). --- Thanks Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Software Engineer, WSO2 Inc http://wso2.org
Re: simple response parsing question
Perfect! Thank you. On Tue, Oct 21, 2008 at 1:46 PM, Supun Kamburugamuva [EMAIL PROTECTED] wrote: This will help you. http://ws.apache.org/axis2/c/docs/om_tutorial.html Supun. On Tue, Oct 21, 2008 at 8:56 PM, Mark Webb [EMAIL PROTECTED] wrote: I have a web service client written in Axis2C and am getting the response back properly. The response is just a long value. Here is the XML I receive back: ns2:initResponse xmlns:ns2=http://service.web.blah/;return1234/return/ns2:initResponse I am using the method axiom_node_get_first_child(node, env) to get the value node. I print out the node and get: return1234/return Problem is that I cannot figure out how to parse out the '1234'. I have looked at the examples but cannot get my code to work. Here is where I am at: printf(NODE = %s\n, axiom_node_to_string( return_val_node, env )); This prints out return1234/return firstNodeText = (axiom_text_t *)axiom_node_get_data_element(return_val_node, env); firstNodeString = axiom_text_get_value(firstNodeText, env); printf(Return Value = %s\n, firstNodeString); Return value is always printed as (null). --- Thanks Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Software Engineer, WSO2 Inc http://wso2.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple response parsing question
I glanced at that tutorial myself, and I notice a few things. It seems to me the tutorial is out of date and in some cases, the sample code is missing language. Code Listing 10 is missing several of the C operations, if and return. I seem to recall that some of the code listings used depreciated function calls, but I 'll have to scan the examples more to find them. All in all, has anyone generated an updated tutorial for using Axiom? Opportunities multiply as they are seized. - Sun Tzu --- On Tue, 10/21/08, Supun Kamburugamuva [EMAIL PROTECTED] wrote: From: Supun Kamburugamuva [EMAIL PROTECTED] Subject: Re: simple response parsing question To: Apache AXIS C User List axis-c-user@ws.apache.org Date: Tuesday, October 21, 2008, 1:46 PM This will help you. http://ws.apache.org/axis2/c/docs/om_tutorial.html Supun. On Tue, Oct 21, 2008 at 8:56 PM, Mark Webb [EMAIL PROTECTED] wrote: I have a web service client written in Axis2C and am getting the response back properly. The response is just a long value. Here is the XML I receive back: ns2:initResponse xmlns:ns2=http://service.web.blah/ return1234/return/ns2:initResponse I am using the method axiom_node_get_first_child(node, env) to get the value node. I print out the node and get: return1234/return Problem is that I cannot figure out how to parse out the '1234'. I have looked at the examples but cannot get my code to work. Here is where I am at: printf(NODE = %s\n, axiom_node_to_string( return_val_node, env )); This prints out return1234/return firstNodeText = (axiom_text_t *)axiom_node_get_data_element(return_val_node, env); firstNodeString = axiom_text_get_value(firstNodeText, env); printf(Return Value = %s\n, firstNodeString); Return value is always printed as (null). --- Thanks Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Software Engineer, WSO2 Inc http://wso2.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set the content type of SOAP request to TEXT/XML
Hi Supun, Thank you very much for your reply. I have explicitly disbaled the MTOM by calling axis2_options_set_enable_mtom(option, env, AXIS2_FALSE) I don't know why the axis2c1.4 still create the SOAP request with the content type of multipart/related. Could you please advise me what are other possibilities I should look at? cheers yong On Tue, Oct 21, 2008 at 6:49 PM, Supun Kamburugamuva [EMAIL PROTECTED]wrote: From your message it seems that you are trying to send a MTOM attachment. Supun. On Tue, Oct 21, 2008 at 9:21 PM, donald yang [EMAIL PROTECTED]wrote: Hi All, Currently I have a problem to call a .NET web service from a web service client written using AXIS2C-1.4. I received an error that the .NET web service expect that the content type of SOAP request should be TEXT/XML. But the content type of the soap request created by AXIS2C-1.4 is multipart/related [1]. I have searched the internet for a solution. Someone suggest to set the soap version to 1.1. I tried that, but I still get the same problem. I also try to disable MTOM. It is also not helpful. If someone knows the solution, could you please give me a hand? Many thanks in advance. [1] SOAP request POST /length.asmx HTTP/1.1 User-Agent: Axis2C/1.4.0 SOAPAction: http://www.webserviceX.NET/ChangeLengthUnit; Content-Length: 622 Content-Type: multipart/related; boundary=MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d; type=application/xop+xml; start= [EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Host: www.webservicex.net:9000 --MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d content-transfer-encoding: binary content-id: [EMAIL PROTECTED]content-type: application/xop+xml;charset=UTF-8;type=text/xml; soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header/ soapenv:Body ns1:ChangeLengthUnitSoapIn xmlns:ns1= http://www.webserviceX.NET/; LengthValue20.0/LengthValue fromLengthUnitMeters/fromLengthUnit toLengthUnitMillimeters/toLengthUnit /ns1:ChangeLengthUnitSoapIn /soapenv:Body /soapenv:Envelope--MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d-- -- Software Engineer, WSO2 Inc http://wso2.org
How to Set Submission Addressing?
I have read that AXIS2/C supports both version 1.0 and the pre-1.0 submission version of WS-Addressing. However, I can't find instructions or an example of how to configure a client to use submission addressing. I would appreciate any help you can give me. Thanks, -David K. Taylor
Re: How to set the content type of SOAP request to TEXT/XML
Check if you have set this in axis2.xml Also use SOAP 1.1 for text/xml content type. Samisa... donald yang wrote: Hi Supun, Thank you very much for your reply. I have explicitly disbaled the MTOM by calling axis2_options_set_enable_mtom(option, env, AXIS2_FALSE) I don't know why the axis2c1.4 still create the SOAP request with the content type of multipart/related. Could you please advise me what are other possibilities I should look at? cheers yong On Tue, Oct 21, 2008 at 6:49 PM, Supun Kamburugamuva [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: From your message it seems that you are trying to send a MTOM attachment. Supun. On Tue, Oct 21, 2008 at 9:21 PM, donald yang [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi All, Currently I have a problem to call a .NET web service from a web service client written using AXIS2C-1.4. I received an error that the .NET web service expect that the content type of SOAP request should be TEXT/XML. But the content type of the soap request created by AXIS2C-1.4 is multipart/related [1]. I have searched the internet for a solution. Someone suggest to set the soap version to 1.1. I tried that, but I still get the same problem. I also try to disable MTOM. It is also not helpful. If someone knows the solution, could you please give me a hand? Many thanks in advance. [1] SOAP request POST /length.asmx HTTP/1.1 User-Agent: Axis2C/1.4.0 SOAPAction: http://www.webserviceX.NET/ChangeLengthUnit; Content-Length: 622 Content-Type: multipart/related; boundary=MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d; type=application/xop+xml; start=[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]; start-info=text/xml; charset=UTF-8 Host: www.webservicex.net:9000 http://www.webservicex.net:9000 --MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d content-transfer-encoding: binary content-id: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]content-type: application/xop+xml;charset=UTF-8;type=text/xml; soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header/ soapenv:Body ns1:ChangeLengthUnitSoapIn xmlns:ns1=http://www.webserviceX.NET/; LengthValue20.0/LengthValue fromLengthUnitMeters/fromLengthUnit toLengthUnitMillimeters/toLengthUnit /ns1:ChangeLengthUnitSoapIn /soapenv:Body /soapenv:Envelope--MIMEBoundary7ba08b56-9d06-4203-b239-558681ae2d6d-- -- Software Engineer, WSO2 Inc http://wso2.org No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.173 / Virus Database: 270.8.2/1735 - Release Date: 10/20/2008 2:52 PM -- Samisa Abeysinghe Director, Engineering; WSO2 Inc. http://www.wso2.com/ - The Open Source SOA Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Set Submission Addressing?
On Tue, 2008-10-21 at 18:03 -0400, David Taylor (Lowell) wrote: I have read that AXIS2/C supports both version 1.0 and the pre-1.0 “submission” version of WS-Addressing. However, I can’t find instructions or an example of how to configure a client to use submission addressing. I would appreciate any help you can give me. Add the following code segment to your client code. axutil_property_t *property = NULL; property = axutil_property_create(env); axutil_property_set_scope(property, env, AXIS2_SCOPE_APPLICATION); axutil_property_set_value(property, env, AXIS2_WSA_NAMESPACE_SUBMISSION); axis2_options_set_property(options, env, AXIS2_WSA_VERSION, property); -Manjula Thanks, -David K. Taylor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]