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 3941468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:32:47+00:00 2026-05-20T00:32:47+00:00

I’m new to both web services and C# so please forgive me if my

  • 0

I’m new to both web services and C# so please forgive me if my question is too simple. I’ve searched around but cannot find an answer — at least one based on my keywords.

I am trying to call a web service via C# (Visual Web Developer 2010 Express) but I get an error back as a response. When I call the same web service via soapUI I do not get an error. When I compare the SOAP request from C# against the SOAP request from soapUI the C# SOAP request is missing an intentionally empty parameter <aclObjectId>. When I take the empty parameter out of the soapUI request I get the same error. To me, the answer is to get C# to send the parameter even though it is empty. I tried this by setting it to null or “” but to no avail. Is there a way to force my C# web service client to send an empty parameter or perhaps send all parameters even if they do not have a value?

WSDL

<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-b02-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-b02-. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://search.services.redacted/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://search.services.redacted/" name="EDRSearchServiceSOAPImplService">
<types>
<xsd:schema>
<xsd:import namespace="http://search.services.redacted/" schemaLocation="http://wwwdev.redacted:80/EDRSearch?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="processSearch">
<part name="parameters" element="tns:processSearch"></part>
</message>
<message name="processSearchResponse">
<part name="parameters" element="tns:processSearchResponse"></part>
</message>
<message name="getAttributes">
<part name="parameters" element="tns:getAttributes"></part>
</message>
<message name="getAttributesResponse">
<part name="parameters" element="tns:getAttributesResponse"></part>
</message>
<message name="getACLUsers">
<part name="parameters" element="tns:getACLUsers"></part>
</message>
<message name="getACLUsersResponse">
<part name="parameters" element="tns:getACLUsersResponse"></part>
</message>
<portType name="EDRSearchServiceSOAPImpl">
<operation name="processSearch">
<input message="tns:processSearch"></input>
<output message="tns:processSearchResponse"></output>
</operation>
<operation name="getAttributes">
<input message="tns:getAttributes"></input>
<output message="tns:getAttributesResponse"></output>
</operation>
<operation name="getACLUsers">
<input message="tns:getACLUsers"></input>
<output message="tns:getACLUsersResponse"></output>
</operation>
</portType>
<binding name="EDRSearchServiceSOAPImplPortBinding" type="tns:EDRSearchServiceSOAPImpl">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="processSearch">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
<operation name="getAttributes">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
<operation name="getACLUsers">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="EDRSearchServiceSOAPImplService">
<port name="EDRSearchServiceSOAPImplPort" binding="tns:EDRSearchServiceSOAPImplPortBinding">
<soap:address location="http://wwwdev.redacted:80/EDRSearch"></soap:address>
</port>
</service>
</definitions>

C# SOAP (doesn’t work)

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <getACLUsers xmlns="http://search.services.redacted/">
      <ACLUsersRequest xmlns="">
        <docbase>edmsdev</docbase>
        <aclName>my_acl</aclName>
      </ACLUsersRequest>
      <userCredentials xmlns="">
        <userName>spoonyfork</userName>
        <password>my_password</password>
        <docbase>edmsdev</docbase>
      </userCredentials>
    </getACLUsers>
  </s:Body>
</s:Envelope>

soapUI SOAP (works)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://search.services.redacted/">
   <soapenv:Header/>
   <soapenv:Body>
      <sear:getACLUsers>
         <!--Optional:-->
         <ACLUsersRequest>
            <docbase>edmsdev</docbase>
            <aclName>my_acl</aclName>
            <aclObjectId></aclObjectId>
         </ACLUsersRequest>
         <!--Optional:-->
         <userCredentials>
            <userName>spoonyfork</userName>
            <!--Optional:-->
            <password>my_password</password>
            <!--Optional:-->
            <wsl4cookie></wsl4cookie>
            <!--Optional:-->
            <endUserForProxyId></endUserForProxyId>
            <!--Optional:-->
            <ip></ip>
            <!--Optional:-->
            <docbase>edmsdev</docbase>
         </userCredentials>
      </sear:getACLUsers>
   </soapenv:Body>
</soapenv:Envelope>

EDRSearch XSD

<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-b02-. --><xs:schema xmlns:tns="http://search.services.redacted/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://search.services.redacted/">

<xs:element name="getACLUsers" type="tns:getACLUsers"></xs:element>

<xs:element name="getACLUsersResponse" type="tns:getACLUsersResponse"></xs:element>

<xs:element name="getAttributes" type="tns:getAttributes"></xs:element>

<xs:element name="getAttributesResponse" type="tns:getAttributesResponse"></xs:element>

<xs:element name="processSearch" type="tns:processSearch"></xs:element>

<xs:element name="processSearchResponse" type="tns:processSearchResponse"></xs:element>

<xs:complexType name="getACLUsers">
<xs:sequence>
<xs:element name="ACLUsersRequest" type="tns:ACLUsersRequest" minOccurs="0"></xs:element>
<xs:element name="userCredentials" type="tns:UserCredentials" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ACLUsersRequest">
<xs:sequence>
<xs:element name="docbase" type="xs:string"></xs:element>
<xs:element name="aclName" type="xs:string"></xs:element>
<xs:element name="aclObjectId" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="UserCredentials">
<xs:sequence>
<xs:element name="userName" type="xs:string"></xs:element>
<xs:element name="password" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="wsl4cookie" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="endUserForProxyId" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="ip" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="docbase" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="getACLUsersResponse">
<xs:sequence>
<xs:element name="return" type="tns:ACLUsersResponse" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ACLUsersResponse">
<xs:sequence>
<xs:element name="user" type="xs:string" maxOccurs="unbounded"></xs:element>
<xs:element name="largeGroups" type="xs:string" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="processSearch">
<xs:sequence>
<xs:element name="searchRequest" type="tns:searchRequest" minOccurs="0"></xs:element>
<xs:element name="userCredentials" type="tns:UserCredentials" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="searchRequest">
<xs:sequence>
<xs:element name="version" type="xs:string"></xs:element>
<xs:element name="docbase" type="xs:string"></xs:element>
<xs:element name="searchCriteria" type="tns:logicalOp" maxOccurs="unbounded"></xs:element>
<xs:element name="maxNumberOfDocuments" type="xs:string"></xs:element>
<xs:element name="folderPaths" type="xs:string" maxOccurs="unbounded"></xs:element>
<xs:element name="metaDataList" type="xs:string" maxOccurs="unbounded"></xs:element>
<xs:element name="objectType" type="xs:string"></xs:element>
<xs:element name="documentLaunchSettings" type="tns:documentLaunchSettings"></xs:element>
<xs:element name="documentACLSettings" type="tns:documentACLSettings"></xs:element>
<xs:element name="oracleHint" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="logicalOp">
<xs:sequence>
<xs:element name="type" type="xs:string"></xs:element>
<xs:element name="name" type="xs:string"></xs:element>
<xs:element name="value" type="xs:string"></xs:element>
<xs:element name="logical" type="xs:string"></xs:element>
<xs:element name="relational" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="documentLaunchSettings">
<xs:sequence>
<xs:element name="launcher" type="xs:string"></xs:element>
<xs:element name="useChronicleId" type="xs:boolean"></xs:element>
<xs:element name="showLink" type="xs:boolean"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="documentACLSettings">
<xs:sequence>
<xs:element name="returnACL" type="xs:boolean"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="processSearchResponse">
<xs:sequence>
<xs:element name="return" type="tns:searchResponse" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="searchResponse">
<xs:sequence>
<xs:element name="docbase" type="xs:string" minOccurs="0"></xs:element>
<xs:element name="documents" type="tns:document" nillable="true" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="numberOfDocuments" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="document">
<xs:sequence>
<xs:element name="objectId" type="xs:string"></xs:element>
<xs:element name="linkLocation" type="xs:string"></xs:element>
<xs:element name="metaDataList" type="tns:metaDataItem" maxOccurs="unbounded"></xs:element>
<xs:element name="aclInfo" type="tns:ACLInfo" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="metaDataItem">
<xs:sequence>
<xs:element name="name" type="xs:string"></xs:element>
<xs:element name="value" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ACLInfo">
<xs:sequence>
<xs:element name="ACLName" type="xs:string"></xs:element>
<xs:element name="ACLObjectId" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="getAttributes">
<xs:sequence>
<xs:element name="attributesRequest" type="tns:objectType" minOccurs="0"></xs:element>
<xs:element name="userCredentials" type="tns:UserCredentials" minOccurs="0"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="objectType">
<xs:sequence>
<xs:element name="docbase" type="xs:string"></xs:element>
<xs:element name="objectType" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="getAttributesResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

C# code

ServiceReference1.UserCredentials uc = new ServiceReference1.UserCredentials();
uc.userName = "spoonyfork";
uc.password = "my_password";
uc.docbase = "edmsdev";

ServiceReference1.ACLUsersRequest aurt = new ServiceReference1.ACLUsersRequest();
aurt.aclName = "my_acl";
aurt.docbase = "edmsdev";

ServiceReference1.EDRSearchServiceSOAPImplClient client = new ServiceReference1.EDRSearchServiceSOAPImplClient();
ServiceReference1.ACLUsersResponse aure = new ServiceReference1.ACLUsersResponse();
aure = client.getACLUsers(aurt, uc);
  • 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-20T00:32:48+00:00Added an answer on May 20, 2026 at 12:32 am

    First, you can try to declare aclObjectId property to serialize even if it is null. For that you’ll need to find the definition of class ACLUsersRequest and add

    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]

    for that property.
    That ‘ll include it into SOAP request as <aclObjectId xsi:nil="true" />

    Second, you can simply declare that property as string.Empty:

    EDRSearchServiceSOAPImplClient client = new EDRSearchServiceSOAPImplClient();
    var test = client.getACLUsers(
        new ACLUsersRequest() {
            aclName = "my_acl",
            docbase = "qwe",
            aclObjectId=string.Empty },//this should do the trick
        new UserCredentials() {
            userName = "lala",
            password = "123",
            docbase = "qwe" });
    

    That ‘ll include it into SOAP request as <aclObjectId /> which is equal to <aclObjectId></aclObjectId>

    If neither of methods will work, then you are dealing with really bad web service provider and need to implement self written client that will format message as forced by provider.

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
This could be a duplicate question, but I have no idea what search terms
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

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.