You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "Fan, Jan-fon" <ja...@intel.com> on 2008/05/15 20:13:26 UTC

Soap request to Microsoft .NET web services

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.

 

Can someone help me please.

 

Thanks,

Jan-fon


Re: Soap request to Microsoft .NET web services

Posted by Samisa Abeysinghe <sa...@wso2.com>.
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


RE: Soap request to Microsoft .NET web services

Posted by "Fan, Jan-fon" <ja...@intel.com>.
Thank you so much Kau!
Yes, you are right. After passing the namespace, it is working now.

Jan-fon

-----Original Message-----
From: Kaushalye Kapuruge [mailto:kaushalye@wso2.com] 
Sent: Thursday, May 15, 2008 12:46 PM
To: Apache AXIS C User List
Subject: Re: Soap request to Microsoft .NET web services

Fan, Jan-fon wrote:
>
> Hi Steven, Samisa,
>
> Per Samisa's suggest, I added:
>
> 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);
>
> but the return is still the same - the name part is missing. The soap 
> message becomes:
>
You need to pass the namespace for other element creations as well.
-Kau
>
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>
> <soapenv:Header></soapenv:Header>
>
> <soapenv:Body>
>
> <ns1:HelloWorld 
> xmlns:ns1="http://scxpd9984.amr.corp.intel.com/webservices/">
>
> <first_name>Jan-fon</first_name>
>
> <last_name>Fan</last_name>
>
> </ns1:HelloWorld>
>
> </soapenv:Body>
>
> </soapenv:Envelope>
>
> Steven, I need to specifically specify what is my soap action by
using:
>
> axutil_string_t *soap_action = NULL;
>
> soap_action = axutil_string_create(env, 
> "http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld");
>
> axis2_options_set_soap_action(options, env, soap_action);
>
> So the http header that I send out becomes:
>
> POST /webservices/mmd.asmx HTTP/1.1
>
> User-Agent: Axis2/C
>
> SOAPAction:
"http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld"
>
> Content-Length: 309
>
> Content-Type: text/xml;charset=UTF-8
>
> Host: scxpd9984.amr.corp.intel.com:80
>
> I can get the result from the server, when I print out the result of 
> axis2_svc_client_send_receive, it shows:
>
> <HelloWorldResponse 
>
xmlns="http://scxpd9984.amr.corp.intel.com/webservices/"><HelloWorldResu
lt>Hello 
> World </HelloWorldResult></HelloWorldResponse>
>
> I don't know how to make the HelloWorld name space matched.
>
> Thanks,
>
> Jan-fon
>
>
------------------------------------------------------------------------
>
> *From:* Steven Zhang [mailto:szhang@altigen.com]
> *Sent:* Thursday, May 15, 2008 11:29 AM
> *To:* Apache AXIS C User List
> *Subject:* Re: Soap request to Microsoft .NET web services
>
> 1. The namespace of HelloWorld must match, otherwise the service can't

> locate the method.
>
> 2. The "soap" and "soapenv" is not an issue when their namespace are 
> the same.
>
> 3. I wander you can get result. I always receive failure because 
> SoapAction is not specified in the HTTP header. I have to fix it in
Axis.
>
> You might use Ethereal to get the TCP data by IE and your client, 
> compare them to find what's different.
>
> Steven
>
>     ----- Original Message -----
>
>     *From:* Fan, Jan-fon <ma...@intel.com>
>
>     *To:* Apache AXIS C User List <ma...@ws.apache.org> ;
>     Apache AXIS C Developers List <ma...@ws.apache.org>
>
>     *Sent:* Thursday, May 15, 2008 11:13 AM
>
>     *Subject:* Soap request to Microsoft .NET web services
>
>     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.
>
>     Can someone help me please.
>
>     Thanks,
>
>     Jan-fon
>


-- 
http://blog.kaushalye.org/
http://wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Soap request to Microsoft .NET web services

Posted by Kaushalye Kapuruge <ka...@wso2.com>.
Fan, Jan-fon wrote:
>
> Hi Steven, Samisa,
>
> Per Samisa’s suggest, I added:
>
> 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);
>
> but the return is still the same – the name part is missing. The soap 
> message becomes:
>
You need to pass the namespace for other element creations as well.
-Kau
>
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>
> <soapenv:Header></soapenv:Header>
>
> <soapenv:Body>
>
> <ns1:HelloWorld 
> xmlns:ns1="http://scxpd9984.amr.corp.intel.com/webservices/">
>
> <first_name>Jan-fon</first_name>
>
> <last_name>Fan</last_name>
>
> </ns1:HelloWorld>
>
> </soapenv:Body>
>
> </soapenv:Envelope>
>
> Steven, I need to specifically specify what is my soap action by using:
>
> axutil_string_t *soap_action = NULL;
>
> soap_action = axutil_string_create(env, 
> "http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld");
>
> axis2_options_set_soap_action(options, env, soap_action);
>
> So the http header that I send out becomes:
>
> POST /webservices/mmd.asmx HTTP/1.1
>
> User-Agent: Axis2/C
>
> SOAPAction: "http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld"
>
> Content-Length: 309
>
> Content-Type: text/xml;charset=UTF-8
>
> Host: scxpd9984.amr.corp.intel.com:80
>
> I can get the result from the server, when I print out the result of 
> axis2_svc_client_send_receive, it shows:
>
> <HelloWorldResponse 
> xmlns="http://scxpd9984.amr.corp.intel.com/webservices/"><HelloWorldResult>Hello 
> World </HelloWorldResult></HelloWorldResponse>
>
> I don’t know how to make the HelloWorld name space matched.
>
> Thanks,
>
> Jan-fon
>
> ------------------------------------------------------------------------
>
> *From:* Steven Zhang [mailto:szhang@altigen.com]
> *Sent:* Thursday, May 15, 2008 11:29 AM
> *To:* Apache AXIS C User List
> *Subject:* Re: Soap request to Microsoft .NET web services
>
> 1. The namespace of HelloWorld must match, otherwise the service can't 
> locate the method.
>
> 2. The "soap" and "soapenv" is not an issue when their namespace are 
> the same.
>
> 3. I wander you can get result. I always receive failure because 
> SoapAction is not specified in the HTTP header. I have to fix it in Axis.
>
> You might use Ethereal to get the TCP data by IE and your client, 
> compare them to find what's different.
>
> Steven
>
>     ----- Original Message -----
>
>     *From:* Fan, Jan-fon <ma...@intel.com>
>
>     *To:* Apache AXIS C User List <ma...@ws.apache.org> ;
>     Apache AXIS C Developers List <ma...@ws.apache.org>
>
>     *Sent:* Thursday, May 15, 2008 11:13 AM
>
>     *Subject:* Soap request to Microsoft .NET web services
>
>     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.
>
>     Can someone help me please.
>
>     Thanks,
>
>     Jan-fon
>


-- 
http://blog.kaushalye.org/
http://wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


RE: Soap request to Microsoft .NET web services

Posted by "Fan, Jan-fon" <ja...@intel.com>.
Hi Steven, Samisa,

Per Samisa's suggest, I added:

 

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);

 

but the return is still the same - the name part is missing. The soap
message becomes:

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Header></soapenv:Header>

<soapenv:Body>

<ns1:HelloWorld
xmlns:ns1="http://scxpd9984.amr.corp.intel.com/webservices/">

<first_name>Jan-fon</first_name>

<last_name>Fan</last_name>

</ns1:HelloWorld>

</soapenv:Body>

</soapenv:Envelope>

 

Steven, I need to specifically specify what is my soap action by using:

axutil_string_t *soap_action = NULL;

soap_action = axutil_string_create(env,
"http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld");

axis2_options_set_soap_action(options, env, soap_action);

 

So the http header that I send out becomes:

POST /webservices/mmd.asmx HTTP/1.1

User-Agent: Axis2/C

SOAPAction: "http://scxpd9984.amr.corp.intel.com/webservices/HelloWorld"

Content-Length: 309

Content-Type: text/xml;charset=UTF-8

Host: scxpd9984.amr.corp.intel.com:80

 

I can get the result from the server, when I print out the result of
axis2_svc_client_send_receive, it shows:

<HelloWorldResponse
xmlns="http://scxpd9984.amr.corp.intel.com/webservices/"><HelloWorldResu
lt>Hello World  </HelloWorldResult></HelloWorldResponse>

 

 

I don't know how to make the HelloWorld name space matched.

 

Thanks,

Jan-fon

 

________________________________

From: Steven Zhang [mailto:szhang@altigen.com] 
Sent: Thursday, May 15, 2008 11:29 AM
To: Apache AXIS C User List
Subject: Re: Soap request to Microsoft .NET web services

 

1. The namespace of HelloWorld must match, otherwise the service can't
locate the method.

2. The "soap" and "soapenv" is not an issue when their namespace are the
same.

3. I wander you can get result. I always receive failure because
SoapAction is not specified in the HTTP header. I have to fix it in
Axis.

 

You might use Ethereal to get the TCP data by IE and your client,
compare them to find what's different.

 

Steven

 

	----- Original Message ----- 

	From: Fan, Jan-fon <ma...@intel.com>  

	To: Apache AXIS C User List <ma...@ws.apache.org>
; Apache AXIS C Developers List <ma...@ws.apache.org>  

	Sent: Thursday, May 15, 2008 11:13 AM

	Subject: Soap request to Microsoft .NET web services

	 

	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.

	 

	Can someone help me please.

	 

	Thanks,

	Jan-fon


Re: Soap request to Microsoft .NET web services

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Steven Zhang wrote:
> 1. The namespace of HelloWorld must match, otherwise the service can't 
> locate the method.
> 2. The "soap" and "soapenv" is not an issue when their namespace are 
> the same.
> 3. I wander you can get result. I always receive failure because 
> SoapAction is not specified in the HTTP header. I have to fix it in Axis.
>  
> You might use Ethereal to get the TCP data by IE and your client, 
> compare them to find what's different.

You can also use tcpmon to capture messages with ease: 
http://ws.apache.org/commons/tcpmon/download.cgi
You need Java for this though.

Samisa...

>  
> Steven
>  
>
>     ----- Original Message -----
>     *From:* Fan, Jan-fon <ma...@intel.com>
>     *To:* Apache AXIS C User List <ma...@ws.apache.org> ;
>     Apache AXIS C Developers List <ma...@ws.apache.org>
>     *Sent:* Thursday, May 15, 2008 11:13 AM
>     *Subject:* Soap request to Microsoft .NET web services
>
>     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.
>
>      
>
>     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: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Soap request to Microsoft .NET web services

Posted by Steven Zhang <sz...@altigen.com>.
1. The namespace of HelloWorld must match, otherwise the service can't locate the method.
2. The "soap" and "soapenv" is not an issue when their namespace are the same.
3. I wander you can get result. I always receive failure because SoapAction is not specified in the HTTP header. I have to fix it in Axis.

You might use Ethereal to get the TCP data by IE and your client, compare them to find what's different.

Steven

  ----- Original Message ----- 
  From: Fan, Jan-fon 
  To: Apache AXIS C User List ; Apache AXIS C Developers List 
  Sent: Thursday, May 15, 2008 11:13 AM
  Subject: Soap request to Microsoft .NET web services


  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.

   

  Can someone help me please.

   

  Thanks,

  Jan-fon

Re: Soap request to Microsoft .NET web services

Posted by Samisa Abeysinghe <sa...@wso2.com>.
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: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org