I was testing a very simple web services written in Axis (1.2RC2) with just a single method, returning a string "test". The method doesn't need any parameters. when I tested it using .Net client, it returns null. Could anyone please tell me what could ne wrong? I've beening fighting this problem for days now, but still no luck..
Could anyone tell me what could be wrong? Where can I find sample code for Axis/.Net combination?
With the little information that u provided, i can only suggest that u use document/literal or rpc/literal as your Style/Use in the Wsdl, as, as far as i know, .NET doesn't support rpc/encoded, and axis uses rpc/encoded by default. Ashutosh
.Net client proxy (InterOpTest.cs): //--------------------------------------------------------------------------// <autogenerated> // This code was generated by a tool. // Runtime Version: 1.1.4322.2032 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> //------------------------------------------------------------------------
// // This source code was auto-generated by wsdl, Version=1.1.4322.2032. // using System.Diagnostics; using System.Xml.Serialization; using System; using System.Web.Services.Protocols; using System.ComponentModel; using System.Web.Services;
/// <remarks/> [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="InterOpTestSoapBinding", Namespace="http://localhost:8080/axis/services/InterOpTest")] public class InterOpTest : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/> public InterOpTest() { this.Url = "http://localhost:8080/axis/services/InterOpTest"; }
/// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] [return: System.Xml.Serialization.XmlElementAttribute("getStringReturn")] public string getString() { object[] results = this.Invoke("getString", new object[0]); return ((string)(results[0])); }
/// <remarks/> public System.IAsyncResult BegingetString(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("getString", new object[0], callback, asyncState); }
My understanding of your problem is that you have checked the response is sent back (TCPMon) but the .Net client seems to ignore it and display NULL.
Is that right ?
I have no .Net knowledge, but could you double check it supports HTTP 100 - continue and chunked messages ??
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Lilly Wiesie
Greenhorn
Joined: Jan 20, 2005
Posts: 26
posted
0
Hi Jean-Louis,
Thanks for you reply.
That's exactly what happened - the web services is set up using Axis 1.2 in doc/literal, and the client is c# in .net. There is no problem for .net client to send the request to the server, and there is no problem for the server sending out the response (I can see both in tcpmon). The problem is that the response doesn't show up in the client program (the return string is null). .Net doesn't show any exception. It just silently shows nothing (on the return string).
I did set up accepting "chunk" in iis, but it doesn't solve the problem.
I am going to use .net XMLSerilizer to test the return SOAP message to see if it can give me any hint.
Did you ever figure this out? I'm having the same problem. My .NET client successfully calls my Java web service and the logs show that the SOAP response contains the correct information but when the .NET client gets the result, it is either null, 0, true, etc. depending on the return type.
I have developed a webservice using Axis1.1 and a java Client. Webservice is a simple file mangement system where it receives file from client and sends requested files as Attachment.
Problem is function in webservice return a string with success or failure code. When i am sending a file as an attachment from the webservice, client receives a null value. Service return a null when there is Attachment to be sent is there is no attachment client receives what evermessage service return.
String str = VET_GetFile(ID, Filename); the above function return a string and also a file as an attachment. but the str value is received as null.
Lili, take a close look at your reply, you will spot a number before and after the soap-reply envelope. We have that problem too:
When we access our AXIS-Service by Excel the returned soap message have a number between http header and soap message. This number together with the Transfer-encoding: chunked makes the Soap Mapper unable to interprete the result. If we call by a java servlet, everyting is fine.
It seems to be an issue about this attribute chunked that is from the HTTP protokol 1.1, at the end of the header follows the size of the content. this is exactly the number that cause all the trouble. But somehow .net/VB is unable to interprete this.
just read the whole message above... My suggestion is....Download the latest axis that axis1.3 and then the things will start working for both rpc and document/literal. And Yes! you can even exchange complex array objects from axis to .net and vice versa.