Web services 无法使用Apache Axis2与web服务通信

Web services 无法使用Apache Axis2与web服务通信,web-services,soap,wsdl,axis2,Web Services,Soap,Wsdl,Axis2,我有一个托管在Windows服务器上的web服务,可以用.net代码连接到该服务器,我正在尝试使用ApacheAxis2获得访问权限。我一直在使用clj soap,它没有得到维护,但看起来相当稳定 连接到服务端点可以使用ie(soap/客户端fn服务地址),但每当我尝试调用函数时,Axis2都会出现以下异常: org.apache.axis2.transport.http.HTTPSender sendViaPost Unable to sendViaPost to url[MY-URL] or

我有一个托管在Windows服务器上的web服务,可以用.net代码连接到该服务器,我正在尝试使用ApacheAxis2获得访问权限。我一直在使用clj soap,它没有得到维护,但看起来相当稳定

连接到服务端点可以使用ie(soap/客户端fn服务地址),但每当我尝试调用函数时,Axis2都会出现以下异常:

org.apache.axis2.transport.http.HTTPSender sendViaPost
Unable to sendViaPost to url[MY-URL]
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
通过一些谷歌搜索,我遇到了这样的情况,这告诉我Windows需要一些身份验证或代理配置。我不确定服务器需要什么样的身份验证。net代码没有使用密码进行身份验证,因此我不知所措

我正在寻找一些帮助,以确定向Axis2传递哪些信息到服务器,从而使我的程序可以与web服务通信

下面提供了C#代码作为参考。它使用ServiceModel库

class Program {
    private static MyService CreateServiceChannel () {
        BasicHttpBinding binding = new BasicHttpBinding ( BasicHttpSecurityMode.Transport );
        binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
        binding.MaxReceivedMessageSize = 204003200;
        binding.ReaderQuotas.MaxArrayLength = 2147483647;
        binding.ReaderQuotas.MaxStringContentLength = 2147483647;
        EndpointAddress address = new EndpointAddress ( "https://...service.svc" );
        ChannelFactory<MyService> channelFactory = new ChannelFactory<MyService> ( binding, address );
        MyService channel = channelFactory.CreateChannel ();
        return channel;
    }

    static void Main ( string[] args ) {
        Console.WriteLine ( CreateMyChannel ().CallFunction ( 1 ) );
    }
}
类程序{
私有静态MyService CreateServiceChannel(){
BasicHttpBinding=新的BasicHttpBinding(BasicHttpSecurityMode.Transport);
binding.Security.Transport.ClientCredentialType=HttpClientCredentialType.None;
binding.MaxReceivedMessageSize=204003200;
binding.ReaderQuotas.MaxArrayLength=2147483647;
binding.ReaderQuotas.MaxStringContentLength=2147483647;
EndpointAddress地址=新的EndpointAddress(“https://...service.svc" );
ChannelFactory ChannelFactory=新的ChannelFactory(绑定,地址);
MyService channel=channelFactory.CreateChannel();
返回通道;
}
静态void Main(字符串[]参数){
Console.WriteLine(CreateMyChannel().CallFunction(1));
}
}

404错误:找不到
最简单的解释是您的URL不正确。这是有道理的。当我调用时,无效的URL是来自客户机对象还是来自xml负载,例如
client.sendRecieve(“CallFunction”,“…””)
?试图缩小我应该调查的范围。有效负载包含名称空间URL,但我很惊讶它没有包含完整的输入/输出操作URL。错误中可能出现的错误URL是
URL[MY-URL]
。我希望这也是您设置为端点地址的地址。名称空间URL不打算实际调用。谢谢。基于这一描述,我相信该计划并没有做一切必要的消费WCF服务。