2011-08-26 12 views
3

보안을 위해 ASP.NET 멤버쉽을 사용하는 몇 가지 WCF 서비스를 호스팅하는 ASP.NET 응용 프로그램이 있습니다.WCF 인증 서비스 - Apache Axis를 사용하여 클라이언트를 생성하는 방법?

다음과
<%@ ServiceHost Language="C#" Debug="true" Service="System.Web.ApplicationServices.AuthenticationService" %> 

이 서비스에 대한 내 WCF 구성 될 때 :

<service name="System.Web.ApplicationServices.AuthenticationService" behaviorConfiguration="AuthenticationServiceBehaviors"> 
    <endpoint contract="System.Web.ApplicationServices.AuthenticationService" binding="basicHttpBinding"/> 
</service> 

... 

<behavior name="AuthenticationServiceBehaviors"> 
    <serviceMetadata httpGetEnabled="true"/> 
    <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/> 
</behavior> 

... 

<bindings> 
    <basicHttpBinding> 
    <binding allowCookies="true"></binding> 
    </basicHttpBinding> 
</bindings> 

I를 아래와 같이 나는 SVC 파일 (AuthenticationService.svc)를 통해 System.Web.ApplicationServices.AuthenticationService을 노출했습니다 다음과 같이 web.config에서 인증 서비스를 활성화했습니다.

<system.web.extensions> 
    <scripting> 
    <webServices> 
     <authenticationService enabled="true" requireSSL="false"/> 
    </webServices> 
    </scripting> 
</system.web.extensions> 

서비스를 테스트하기 위해 .NET 콘솔 응용 프로그램을 만들었습니다. Visual Studio에서 클라이언트를 생성하고 서비스가 예상대로 작동했습니다.

IWAB0399E Error in generating Java from WSDL: java.io.IOException: Emitter failure. 
There is an undefined portType (AuthenticationService) in the WSDL document 
http://localhost:17637/Services/AuthenticationService.svc?wsdl=wsdl0. 
Hint: make sure <binding type=".."> is fully qualified. 

제가 아파치에 아래로 추적 한 : 내 문제는 내가 자바 응용 프로그램에서이 서비스를 사용하기 위해 필요하지만, 제가 아파치 축, 나는 다음과 같은 오류가 사용하여 Eclipse에서 클라이언트를 생성 할 때이다 this post 덕분에 ServiceContract와 ServiceBehavior에서 다른 네임 스페이스와 이름을 필요로하는 축. 다른 WCF 서비스를 변경하여 해당 게시물을 보여 주며 잘 작동합니다. 문제는 System.Web.ApplicationServices.AuthenticationService이 (http://msdn.microsoft.com/en-us/library/system.web.applicationservices.authenticationservice.aspx에서)이 보이는 것입니다 :

[ServiceBehaviorAttribute(Namespace = "http://asp.net/ApplicationServices/v200", InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] 
[AspNetCompatibilityRequirementsAttribute(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] 
[ServiceContractAttribute(Namespace = "http://asp.net/ApplicationServices/v200")] 
public class AuthenticationService 

을 주목 ServiceBehaviorAttribute 네임 스페이스가 ServiceContractAttribute를 네임 스페이스와 동일합니다? 나는 그것들이 달라야 만 클라이언트를 생성하기 위해 Eclipse (Apache Axis)를 얻을 수있다. 어떤 아이디어?

답변

1

기본 제공 서비스의 이름을 변경할 수 없다고 생각합니다. 다른 서비스에서 기본 제공 서비스를 래핑하거나 사용자 정의 서비스 핸들 인증을 작성하려면 허용되어야합니다.

+0

나는이 문제에 대해 몇 년 전에 내 인증 서비스를 시작했다. 나는 대답을 기대하지 않을 정도로 오랫동안 답을 찾지 못했습니다. 감사! –

관련 문제