Can't consume GlassFish generated WSDL from .NET

I am trying to add a web service reference to my C# application in Visual Studio. The web service is hosted on Sun's GlassFish server. Unfortunately Visual Studio produces the following warning when I try to add the service reference:

Custom tool warning: The following Policy Assertions were not Imported:
    <wsat:ATAlwaysCapability xmlns:wsat=''>..</wsat:ATAlwaysCapability>

Apparently it cannot understand policy assertions in the WSDL published by the GlassFish server. Here's an excerpt from the WSDL:

<?xml version='1.0' encoding='UTF-8'?>
    xmlns:wsp="" xmlns:wsp1_2=""

    <wsp:Policy xmlns:wsat="" wsu:Id="SecurityWebServicePortBinding_AuthenticateUser_WSAT_Policy">
        <wsat:ATAlwaysCapability />
        <wsat:ATAssertion xmlns:ns1="" wsp:Optional="true" ns1:Optional="true" />

    <wsp:Policy xmlns:wsat="" wsu:Id="SecurityWebServicePortBinding_RegisterUser_WSAT_Policy">
        <wsat:ATAlwaysCapability />
        <wsat:ATAssertion xmlns:ns2="" wsp:Optional="true" ns2:Optional="true" />


    <binding name="SecurityWebServicePortBinding" type="tns:SecurityWebService">
        <soap:binding transport="" style="document" />
        <operation name="RegisterUser">
            <wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
            <soap:operation soapAction="RegisterUser" />
                <wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
                <soap:body use="literal" />
                <wsp:PolicyReference URI="#SecurityWebServicePortBinding_RegisterUser_WSAT_Policy" />
                <soap:body use="literal" />
            <fault name="UsernameExistsException">
                <soap:fault name="UsernameExistsException" use="literal" />



If I remove all the policy elements from the WSDL, Visual Studio is able to consume the service without any problems (in fact earlier I used to write the WSDL by hand and never put the policy statements). So my questions are:

  1. Why is GlassFish insisting on adding the policies? Is there any way to suppress them?
  2. Why is Visual Studio not able to consume the WSDL with the policies?


ws-AT (Atomic Transactions) seems to be part of the SOAP specification which WCF does not know about. There is some information here -

Update: Actually WCF is aware of the ws-AT spec, but doesn't support it fully ( I suppose this is because WCF has alternatives which use OleTransactions.

Ok, I figured out why GlassFish is adding the ws-AT policies. My web service is being generated using an EJB (see below):

public class SecurityWebService {

Since the default transaction attribute for a stateless EJB method is REQUIRED, GlassFish is making the web service method transactional too (see here for details). Not the behavior I want, but that's how it is!

Need Your Help

how to add a complete folder to a jar file by ant

ant jar

I'd like to create like a "fat" jar with ant where I have, not only the usual classes, manifest files, etc, but also my 'libs' folder too.

Iterating all items inside QListView using python

python pyqt4 qt-designer

I have a QlistView inside is which a checkboxes (created dynamically) with item name (QstandardItem). And below Qlistview is a checkbox named DatacheckercheckBox1. What I want is when this

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.