尝试使用JAVA客户端连接到.Net SOAP服务

时间:2012-06-21 21:11:18

标签: java .net wcf soap self-hosting

我尝试连接到.Net SOAP服务,SOAP服务由另一个项目成员创建,并用C#编写。他告诉我他使用WCF Self Host Client。

我使用netbeans 7.1基于WSDL生成Java SOAP客户端。当我用java客户端尝试java服务器时,这个工作。但当我尝试使用.Net服务器时,我得到了:

    WARNING: SP0100: Policy assertion WARNING: SP0100: Policy assertion Assertion[com.sun.xml.ws.security.impl.policy.SpnegoContextToken] {
    assertion data {
        namespace = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy'
        prefix = 'sp'
        local name = 'SpnegoContextToken'
        value = 'null'
        optional = 'false'
        ignorable = 'false'
        attributes {
            name = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:IncludeToken', value = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient'
        }
    }
    no parameters
    nested policy {
        namespace version = 'v1_5'
        id = 'null'
        name = 'null'
        vocabulary {
            1. entry = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy:RequireDerivedKeys'
        }
        assertion set {
            Assertion[com.sun.xml.ws.policy.sourcemodel.DefaultPolicyAssertionCreator$DefaultPolicyAssertion] {
                assertion data {
                    namespace = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy'
                    prefix = 'sp'
                    local name = 'RequireDerivedKeys'
                    value = 'null'
                    optional = 'false'
                    ignorable = 'false'
                    no attributes
                }
                no parameters
                no nested policy
            }
        }
    }
} is not supported under Token assertion.

我在其他论坛上看到这个问题无法解决,有谁知道如何帮助我?

对于服务器端,我们设置了wsHttpBinding,但我们想要在没有任何安全设置的情况下运行SOAP服务。这就是为什么我们尝试在app.config

中使用这段xml修复它
<bindings>
  <basicHttpBinding>
    <binding name="basicHttpBindingConfig">
      <security mode="None">
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

它只是一个基本的自托管WCF应用程序。

2 个答案:

答案 0 :(得分:0)

我们正在使用wsHttpBinding,但我们希望在没有任何安全设置的情况下执行此操作。 这就是为什么我试图用我们的app.config

中的这个xml修复它
<bindings>
  <basicHttpBinding>
    <binding name="basicHttpBindingConfig">
      <security mode="None">
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

它只是一个基本的自托管WCF应用程序。

答案 1 :(得分:0)

<endpoint address ="" binding="basicHttpBinding" contract="ReparatieSysteem.WCFLibrary.IOrderListenerService">

我们仍然将端点绑定设置为wsHttpBinding,wsHttpBinding启用了几个安全功能,但不支持SpnegoToken(java客户端需要)。

我们已将其设置为basicHttpBinding,因为我们不需要这些安全功能。

相关问题