wcf - Can't consume GlassFish generated WSDL from .NET -
i trying add web service reference c# application in visual studio. web service hosted on sun's glassfish server. unfortunately visual studio produces following warning when try add service reference:
custom tool warning: following policy assertions 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> apparently cannot understand policy assertions in wsdl published glassfish server. here's excerpt wsdl:
<?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> if remove policy elements wsdl, visual studio able consume service without problems (in fact earlier used write wsdl hand , never put policy statements). questions are:
- why glassfish insisting on adding policies? there way suppress them?
- why visual studio not able consume wsdl policies?
ws-at (atomic transactions) seems part of soap specification wcf not know about. there information here - http://schemas.xmlsoap.org/ws/2004/10/wsat/
update: wcf aware of ws-at spec, doesn't support (http://schemas.xmlsoap.org/ws/2004/10/wsat/). suppose because wcf has alternatives use oletransactions.
Comments
Post a Comment