Version 20

    Step By Step Walkthrough


    *1. Follow the bare example in chapter Document Style Endpoints *

    a) start jboss 
    b) deploy the war


    • 2. Use the wsdl.exe tool to generate a csharp program*

    $ wsdl.exe http://draught:8080/jbossws-samples-docstyle-bare?wsdl
    Microsoft (R) Web Services Description Language Utility
    [Microsoft (R) .NET Framework, Version 1.1.4322.573]
    Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
    Writing file 'c:\devel\wiki\SampleService.cs'.


    *3. Add the following class to end of the file*

    public class Application {
        public static void Main(string[] args) {
            TrivialOrder order = new TrivialOrder();
            order.person = "John Doe";
            order.product = "Weed Wacker";
            SampleService service = new SampleService();
            TrivialOrderResponse response = service.purchase(order);


    *4. Compile it*

    $ csc SampleService.cs 
    Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
    for Microsoft (R) .NET Framework version 1.1.4322
    Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

    *5. run it*

    $ ./SampleService.exe 
    okJohn DoeWeed Wacker




    *Which encoding style should I use between JBoss and .NET?*


    .NET 1.1 Supports rpc/encoding and document/literal. JBoss is WS-I BP1.0 compliant, which means it supports rpc/literal, and document/literal. rpc/encoding is explicitly forbidden by WS-I BP1.0, so it is recommended that you use document/literal. .NET 2.0Beta has added support for rpc/literal, but it is not production ready. The future of webservices seems to be standardizing on document/literal anyways, so this is a safe bet to use.


    *Why do I get "HTTP 505 - Version not supported error" when using BASIC authentication?*

    .NET does not implement HTTP 1.1 properly (specifically contiuations), therefore the only way

    you can fix this is to force the client to use HTTP 1.0. You can do this on the server side by

    adding the following option (in bold) to your http connector tag in your tomcat server.xml file.


    <!-- A HTTP/1.1 Connector on port 8080 -->


          <Connector port="8080" address="${jboss.bind.address}"


             maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"




             enableLookups="false" redirectPort="8443" acceptCount="100"


             restrictedUserAgents="^.*MS Web Services Client Protocol.*$"


             connectionTimeout="20000" disableUploadTimeout="true"/>



    Also see .NET client & unsupported HTTP version