You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Roelof Naude <ro...@epiuse.com> on 2004/01/21 15:01:35 UTC

xsd:string trouble

hi

i have a fairly simple webservice:

string method(int, string)

i can invoke the method successfully. the string result however does not 
get returned to the client. the client just receives an empty string.

to make things more interesting: the input string also goes empty after 
the method call.

i've traced that the string result do get assigned and that the result 
is still valid in the *Wrapper::method.

any ideas?

on another point: to what extend will the c++ environment (specifically 
the stl) be supported? an example of middleware that do support the stl 
very well is ice from zeroc (www.zeroc.com).

regards
roelof.


Re: xsd:string trouble

Posted by Roelof Naude <ro...@epiuse.com>.
Roelof Naude wrote:
> hi
> 
> i have a fairly simple webservice:

nevermind its working now. sniffed the network and saw that all packets 
looked ok. my client did a printf("%s\n", resultStr.c_str()), which 
printed an empty string. changed the printf to a cout and it worked. not 
sure why that is. IMHO the printf should have worked as well.

i still would like to know whether stl vectors for arrays will be supported.

regards
roelof.


Re: xsd:string trouble

Posted by su...@opensource.lk.
hi roelof,

> hi
>
> i have a fairly simple webservice:
>
> string method(int, string)
>
> i can invoke the method successfully. the string result however does not
>  get returned to the client. the client just receives an empty string.

Do you use both Axis C++ client and server ?. If you use the client only
please use the tcpmon and check you get the correct SOAP message from the
server.

> to make things more interesting: the input string also goes empty after
> the method call.

All this cannot happen. Please look at the provided InteropBase sample
client and server. There we send strings / string arrays and receives back
correctly. See lines,

	InteropTestPortType ws;
	printf("invoking echoString...\n");
	//testing echoString
	if (ws.echoString("hello world") == "hello world")
		printf("successful\n");
	else
		printf("failed\n");

> i've traced that the string result do get assigned and that the result
> is still valid in the *Wrapper::method.
>
> any ideas?

This is server side right ?.
Please check the parameters passed to pIWSSZ->AddOutputParam(..) method.
Does it have the correct string value ?

>
> on another point: to what extend will the c++ environment (specifically
> the stl) be supported? an example of middleware that do support the stl
> very well is ice from zeroc (www.zeroc.com).

The WSDL2WS code generator does not use stl (next Axis version will not
use std::string even). So the deserializer do not use stl and you cannot
pass a stl object to be serialized. But you can use ANYTHING inside your
code (STL, COM etc).

We hope to support stl *some day* but I cannot say when :)

Thanks,

Susantha.