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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:31:29+00:00 2026-06-11T01:31:29+00:00

Lets say I have WSDL that defines an operation that accepts a complex type,

  • 0

Lets say I have WSDL that defines an operation that accepts a complex type, the very usual webmethod stuff like this one:

  <xs:element name="createBill">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" name="customer" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" name="billId"   nillable="true" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <wsdl:message name="createBillRequest">
    <wsdl:part name="parameters" element="ns:createBill" />
  </wsdl:message>

  <wsdl:operation name="creatBill">
    <wsdl:input wsaw:Action="urn:createBill" message="axis2:createBillRequest" />
    ...
  </wsdl:operation>

What is the WebServices standard implementation rule for the two different calls, one specifying billId as xsi:nil and the other completely omitting the node?

<creatBill ...>
   <customer>1332400</customer>
   <billId xsi:nil="true"/>
</createBill>

vs

<creatBill ...>
   <customer>1332400</customer>
</createBill>

To reveal more background, I have an issue with one Java guy. His web service is done in Axis2 and (for reasons strange to me) treats omission of bill element differently than the nil value. My claim is that they are one and the same and that it should behave the same in both cases (e.g. create a dynamic billID). His claim is that its not the same and he only generates dynamic ID when node is missing, otherwise returns an error (“billId missing”) when node is nilled.

The practical problem I have with his claim is that both WCF and WS stack in .NET treat these as one and the same and do not even make a provision for omitting nillable parameters, making it virtually impossible for me to implement a client without writing my own WS-stack, together with WS-Security he implements. As it stands I can only call the service specifying null:

serv.createBill("1332400", null);
serv.createBill("1332400"); // ERROR: no such method

I don’t even understand how he implemented server side in Java so that one web method has different calling patterns, what is billID parameter set to by Axis2 when node is omitted? He is very uncooperative and I need some arguments (if there are any) to present to him and later to his managers because they are under support contract.

Since we cannot both be right, does anyone know what the WS standard stipulates here? Who is at fault with the standard? I am not starting a wcf vs axis flame (please refrain), I need the look on this issue from the perspective of SOAP/WSDL standards and specifications as the parent of both.

  • 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-06-11T01:31:31+00:00Added an answer on June 11, 2026 at 1:31 am

    Your Web service uses the document/literal style. In that case, the Web service specifications only require that the message content (more specifically the single child of the SOAP body) is described by an XML Schema element declaration, and of course that it conforms to that declaration. Now, XML Schema indeed allows using minOccurs=”0″ and nillable=”true” at the same time, but the specification doesn’t attach any particular meaning to the absence of the element vs. an element with xsi:nil=”true”; in particular it doesn’t declare these two cases to be equivalent. It is up to the designer of the schema to define the meaning of these two cases.

    Also note that there is no universal standard that describes how to translate a WSDL and schema into language specific constructs.

    That being said, minOccurs=”0″ and nillable=”true” together is problematic because most languages only have a single concept, namely the null value, to represent the absence of a value. While using the null value works well if the element is declared with either minOccurs=”0″ or nillable=”true”, there is no natural way to handle elements declared with both. The JAX-WS specification addresses this issue as described in the following question:

    Jaxb generated class used JAXBElement instead of specified type

    In contrast to JAX-WS, some other language specific Web service binding conventions don’t address this issue properly, and using minOccurs=”0″ together with nillable=”true” often causes interoperability issues. Therefore this should be considered as a bad practice, but there is unfortunately nothing in the Web service specifications that forbids this.

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

Sidebar

Related Questions

Lets say I have a class A that is fairly simple like this -
Lets say I have an enumerable source, that looks like this: IEnumerable<string> source =
lets say i have an xml file path.xml that goes like this: <paths> <path
Lets say have this immutable record type: public class Record { public Record(int x,
Lets Say i have a table like this WEB_LIST_TABLE KEY Value ---------------------------------------- 134 google.com
Lets say I have multiple commands like 5000 which updates some column and row
Lets say I have a collection of applicants that can be accessed via /applicants
Lets say I have a div like this: <div id=test class=sourcecode> Some String </div>
lets'say i have a form, with like this : <form name=frmMail method=POST action=save.do dojoType=dijit.form.Form
lets say I have a table call payment that have a field call thing_id

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.