Visual Studio의 C# 응용 프로그램에 웹 서비스 참조를 추가하려고합니다. 웹 서비스는 Sun의 GlassFish 서버에서 호스팅됩니다..NET에서 GlassFish 생성 WSDL을 사용할 수 없음
Custom tool warning: The following Policy Assertions were not Imported:
XPath://wsdl:definitions/wsdl:binding[@name='SecurityWebServicePortBinding']/wsdl:operation[@name='RegisterUser']
Assertions:
<wsat:ATAlwaysCapability xmlns:wsat='http://schemas.xmlsoap.org/ws/2004/10/wsat'>..</wsat:ATAlwaysCapability>
은 분명히 그것은 글래스 피쉬 서버에 의해 게시 된 WSDL의 정책 주장을 이해할 수 없다 : 나는 서비스 참조를 추가하려고하면 불행하게도 Visual Studio에서 다음과 같은 경고를 생성합니다.
<?xml version='1.0' encoding='UTF-8'?>
<definitions
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://test/securityservice.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://test/securityservice.wsdl"
name="SecurityService">
<wsp:Policy xmlns:wsat="http://schemas.xmlsoap.org/ws/2004/10/wsat" wsu:Id="SecurityWebServicePortBinding_AuthenticateUser_WSAT_Policy">
<wsat:ATAlwaysCapability />
<wsat:ATAssertion xmlns:ns1="http://schemas.xmlsoap.org/ws/2002/12/policy" wsp:Optional="true" ns1:Optional="true" />
</wsp:Policy>
<wsp:Policy xmlns:wsat="http://schemas.xmlsoap.org/ws/2004/10/wsat" wsu:Id="SecurityWebServicePortBinding_RegisterUser_WSAT_Policy">
<wsat:ATAlwaysCapability />
<wsat:ATAssertion xmlns:ns2="http://schemas.xmlsoap.org/ws/2002/12/policy" wsp:Optional="true" ns2:Optional="true" />
</wsp:Policy>
...
<binding name="SecurityWebServicePortBinding" type="tns:SecurityWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="RegisterUser">
<wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
<soap:operation soapAction="RegisterUser" />
<input>
<wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
<soap:body use="literal" />
</input>
<output>
<wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
<soap:body use="literal" />
</output>
<fault name="UsernameExistsException">
<soap:fault name="UsernameExistsException" use="literal" />
</fault>
</operation>
</binding>
...
</definitions>
나는 WSDL에서 모든 정책 요소를 제거하면, 비주얼 스튜디오 (사실 이전에 내가 손으로 결코 WSDL을 작성하는 데 아무 문제없이 서비스를 소비 할 수있는 다음은 WSDL에서 발췌입니다 정책 진술서를 작성하십시오). 따라서 내 질문은 다음과 같습니다.
- 왜 GlassFish는 정책 추가를 주장합니까? 그들을 억압하는 어떤 방법이 있습니까?
- Visual Studio가 정책을 사용하여 WSDL을 소비 할 수없는 이유는 무엇입니까?
WSDL을 어떻게 사용하고 있습니까? "서비스 참조 추가"? –
예 - "서비스 참조 추가"및 WSDL의 URL을 가리 킵니다. – Naresh