You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Takashi Saruhashi <TS...@valueprice.eu> on 2008/08/13 16:52:01 UTC

Trying to access .NET based Web Service from Java based Web Service client failed.

Hello all, My name is Takashi

I faced some problem with communication between .NET based Web Service
and Java based Web Service Client.
My current environment is

====
OS: Windows XP Pro
Web Server: IIS v5.1
(Also ASP.NET server is working on Port 2526)
Java: jdk1.5.0_15
Axis2: axis2-1.14
====

I created simple Web Service like this in Visual Studio.

---
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace WebService2
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET
AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld(string input)
        {
            
            return "Hello World " + input;
        }
    }
}
---

Then I tried to create Web Service Stub using axis2 toolkil wsdl2java.
After creating the stub, then I tried to access the service above, Then
I got this error.

---
Exception in thread "main" org.apache.axis2.AxisFault: The input stream
for an incoming message is null.
---

I also did SOAP monitoring. That shows

--- input ---
POST /Service1.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8;
action="http://tempuri.org/HelloWorld"
User-Agent: Axis2
Host: 127.0.0.1:8888
Transfer-Encoding: chunked

ff
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><n
s1:HelloWorld
xmlns:ns1="http://tempuri.org/"><ns1:input>takashi</ns1:input></ns1:Hell
oWorld></soapenv:Body></soapenv:Envelope>

0
-------------

--- output ---
HTTP/1.1 400 Bad Request
Server: ASP.NET Development Server/9.0.0.0
Date: Wed, 13 Aug 2008 14:36:04 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
Connection: Close
--------------

The output says it is bad request. 
Could anyone tell me how to handle this problem??


Best regards.
Takashi

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