axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21930] New: - .Net not able to serialize data with doc/literal style.
Date Mon, 28 Jul 2003 10:59:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21930>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21930

.Net not able to serialize data  with doc/literal style.

           Summary: .Net not able to serialize data  with doc/literal style.
           Product: Axis
           Version: 1.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: angupta@informatica.com


.Net client was not able to properly reconstruct data from  XML
message passed by axis server. It wasn't able to reconstuct the string s below 
and passes null. this problem also occurs with complex types such as beans in 
place of string.
The service class is

public class stringtest
{
	public String sayhello(String message1,String message2)
	{
		return message1;
	}
}

The deploy.wsdd file is


<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="stringtest" style="wrapped" >
        <parameter name="className" value="stringtest"/>
         <parameter name="allowedMethods" value="*"/>
        <parameter name="scope" value="session"/>
         </service>
	</deployment>


I used .net’s wsdl.exe to generate the stub classes the client class code is 
also very simple

Client.cs

class client {

public static void Main(string[] args) {
CookieContainer cookieJar=new CookieContainer();

stringtestService service1=new stringtestService();
service1.CookieContainer = cookieJar;
string s="initial value";
Console.WriteLine("initially s has "+s);
s=service1.sayhello("hello","hi");
Console.WriteLine("serive returns: "+s);
if(s==null)Console.WriteLine("deserialization not proper");
}
}

Some interesting points about this issue are

If using tcpmon you see the actual soap message being passed back and forth. 
The response from the server indeed contains the correct return string which 
is “hello” in this case but somehow .net is not able to read it and return the 
string properly.

Ankit Gupta

Mime
View raw message