Fan, Jan-fon wrote:
Hi,
I created a simple “hello world” web services by using Microsoft .NET.
User specifies the first name and last name, this service just returns
“Hello World first_name last_name” to the user.
The soap request defined for this web services is:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<HelloWorld xmlns="http://scxpd9984.amr.corp.intel.com/webservices/">
<first_name>string</first_name>
<last_name>string</last_name>
</HelloWorld>
</soap:Body>
</soap:Envelope>
I use Axis2C client API trying to consume this web services, but the
service just returns me “Hello World”, the name part is missing.
I use a sniffer program to check what is the request that I send to
server and find out it is:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header></soapenv:Header>
<soapenv:Body>
<HelloWorld>
<first_name>Jan-fon</first_name>
<last_name>Fan</last_name>
</HelloWorld>
</soapenv:Body>
</soapenv:Envelope>
I am wonder if this problem is caused by the name space <HelloWorld>,
it does not contain
xmlns=http://scxpd9984.amr.corp.intel.com/webservices/.
Another thing is that the starting tag, they are different: soap vs
soapenv.
I think the problem is the nsamesapce, and not soapenv prefix. Are you
using OM to build the requrst with Axis2/C client? if Yes, you can
easily add the namespace to the HelloWorld node.
example:
axiom_node_t *echo_om_node = NULL;
axiom_element_t *echo_om_ele = NULL;
axiom_namespace_t *ns1 = NULL;
ns1 =
axiom_namespace_create(env,
"http://scxpd9984.amr.corp.intel.com/webservices/",
"ns1");
echo_om_ele =
axiom_element_create(env, NULL, "HelloWorld", ns1, &echo_om_node);
Thanks,
Samisa...
Can someone help me please.
Thanks,
Jan-fon
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.16/1434 - Release Date: 5/15/2008 7:24 AM
--
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]