Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7587925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:47:45+00:00 2026-05-30T19:47:45+00:00

I have been given a wsdl file by a company which will integrate with

  • 0

I have been given a wsdl file by a company which will integrate with us, detailing how they expect the interface to look. This file contains a few messages and operations, which have request and response objects as input and output, looking like this (I’m not free to share the file, so this has been slightly anonymized. That also means there might be some typos – if so, sorry!):

<wsdl:types>
    <xs:schema>
        <xs:simpleType name="user_t">
            <xs:restriction base="xs:string"> 
                <xs:minLength value="1" />
                <xs:maxLength value="20" />
            </xs:restriction>
        </xs:simpleType>
        <xs:simpleType name="password_t">
            <xs:restriction base="xs:string"> 
                <xs:minLength value="4" />
                <xs:maxLength value="128" />
            </xs:restriction>
        </xs:simpleType>
        <xs:simpleType name="accountId_t">
            <xs:restriction base="xs:string"> 
                <xs:minLength value="1" />
                <xs:maxLength value="64" />
            </xs:restriction>
        </xs:simpleType>
        <xs:simpleType name="language_t">
            <xs:restriction base="xs:string"> 
                <xs:length value="2" />
            </xs:restriction>
        </xs:simpleType>

        <xs:element name="logon">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="user" type="ns:user_t" />
                    <xs:element name="password" type="ns:password_t" />
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        <xs:element name="logonResponse">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="accountId" type="ns:accountId_t" />
                    <xs:element name="language" type="ns:language_t" minOccurs="0"/>
                </xs:sequence>
            </xs:complexType>           
        </xs:element>
    </xs:schema>
</wsdl:types>

<wsdl:message name="loginRequest">
    <wsdl:part name="parameters" element="ns:login" />
</wsdl:message>
<wsdl:message name="loginResponse">
    <wsdl:part name="parameters" element="ns:loginResponse" />
</wsdl:message>
<wsdl:operation name="login">
    <wsdl:input message="ns:loginRequest" />
    <wsdl:output message="ns:loginResponse" />
    <wsdl:fault message="ns:InvalidUserException" name="InvalidUserException" />
</wsdl:operation>

I then run svcutil on this file to generate an interface. I’d expect a login method looking something like this (implementation language is C#):

loginResponse login(loginRequest request)

What I get, however, is this:

string login(string user, string password, out string language)

This causes a problem, not only because it is not really “ok” to use out parameters in wcf here, but also because our logging framework explodes when wcf services have out-parameters (we really want to avoid changes into the logging framework, as that would require veryveryvery extensive testing, as it would change everything, everywhere).

EDIT: The plot thickens. There is one method in the wsdl which actually is generated as I expected. It is defined in exactly the same fashion as the other operations, except that the response element is empty:

<xs:element name="fooResponse">
</xs:element>

If I alter the logonResponse element so that it is empty, tada!, it works:
loginResponse login(loginRequest request)

Does this make any sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:47:47+00:00Added an answer on May 30, 2026 at 7:47 pm

    A couple of options come to mind:

    Change the Service

    Change the service interface. If you don’t own, of course you can’t change it.

    Update your logging framework

    Doesn’t sound fun, but could theoretically be updated so that the changes only affect those services that actually have out parameters, thereby reducing your regression testing load (test the new service and a subset of the old ones).

    Hand code your own proxies

    If you don’t like what svcutil is doing, make your own contracts using messages. It’s painful from a maintenance standpoint, but you can craft your own messages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been given a WSDL file and I need to consume a web
I have been given a task to create a Python file that will take
I have been given a problem to decrypt this text: 3e47b75000b0924b6c9ba5759a7cf15d which is supposedly
I have been given some html that look like this (I have no control
I have been given an application which uses a build.xml file for building purposes.
I have been given an existing project which is consisting of pom.xml file in
I have been given a WSDL with all the method requests and responses, and
I have been given a fairly large database stored in Microsoft Excel, which I
I have been given a project to edit. I think this is a simple
i have been given a project where i will need to write code such

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.