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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:58:39+00:00 2026-05-20T15:58:39+00:00

I consume a web service that uses positive and negative numbers to indicate if

  • 0

I consume a web service that uses positive and negative numbers to indicate if the web service call was successful, and if it wasn’t, the numbers indicate the type of error. Using the WSDL importer (in Delphi 2007, Delphi 2010, and Delphi XE), I get this type definition:

PCRUpdateCodes = (_7, _6, _5, _4, _3, _2, _1, _1, _2, _3, _4);

In the WSDL, the last four entries on the right are negative numbers. The Delphi compiler gives me an error “Identifier redeclared” for the last four entries. How can I make the last four entries negative numbers?

Here is the relevant portion of the WSDL.

 <xs:simpleType name="PCRUpdateCodes">
    <xs:annotation>
       <xs:documentation>Codes to describe return codes for an attempted PCR import web service operation</xs:documentation>

    </xs:annotation>
    <xs:restriction base="xs:integer">
       <xs:enumeration value="-7">
          <xs:annotation>
             <xs:documentation>Permission denied to the client for that organization</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="-6">

          <xs:annotation>
             <xs:documentation>Permission denied to the client for the operation</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="-5">
          <xs:annotation>
             <xs:documentation>Invalid username and/or password</xs:documentation>
          </xs:annotation>

       </xs:enumeration>
       <xs:enumeration value="-4">
          <xs:annotation>
             <xs:documentation>Failed update of PCR, because no PCR exists with the same agency # and PCR #</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="-3">
          <xs:annotation>

             <xs:documentation>Failed update of PCR marked incomplete, because PCR was previously marked complete</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="-2">
          <xs:annotation>
             <xs:documentation>Failed update of PCR, because of failing NEMSIS XML validation</xs:documentation>
          </xs:annotation>
       </xs:enumeration>

       <xs:enumeration value="-1">
          <xs:annotation>
             <xs:documentation>Failed update of PCR marked complete, because of failing logical validation</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="1">
          <xs:annotation>
             <xs:documentation>Successful update of PCR marked incomplete, but failing logical validation</xs:documentation>

          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="2">
          <xs:annotation>
             <xs:documentation>Successful update of PCR marked incomplete</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="3">

          <xs:annotation>
             <xs:documentation>Successful update of PCR marked complete, previously marked incomplete</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="4">
          <xs:annotation>
             <xs:documentation>Successful update of PCR marked complete, previously marked complete, now marked amended</xs:documentation>
          </xs:annotation>

       </xs:enumeration>
       <xs:enumeration value="5">
          <xs:annotation>
             <xs:documentation>Successful update of PCR marked complete, previously marked incomplete, but with validation warnings</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
       <xs:enumeration value="6">
          <xs:annotation>

             <xs:documentation>Successful update of PCR marked complete, previously marked complete, now marked amended, but with validation warnings</xs:documentation>
          </xs:annotation>
       </xs:enumeration>
    </xs:restriction>
 </xs:simpleType>
  • 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-20T15:58:39+00:00Added an answer on May 20, 2026 at 3:58 pm

    I have tried the definition of your enumeration with WsdlImp.exe 15.0.3953.35171 provided by Delphi XE (Update 1). Option “Validate Enumeration members” is checked.

    Here is the code for the generated enumeration.

    TEnumTest = (
            _7,
            _6,
            _5,
            _4,
            _3,
            _2,
            _1,
            _12,
            _22,
            _32,
            _42,
            _52,
            _62
    );
    

    And the registration code for the enumeration values.

    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_7', '-7');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_6', '-6');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_5', '-5');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_4', '-4');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_3', '-3');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_2', '-2');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_1', '-1');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_12', '1');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_22', '2');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_32', '3');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_42', '4');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_52', '5');
    RemClassRegistry.RegisterExternalPropName(TypeInfo(TEnumTest), '_62', '6');
    

    Looks like it is alright to me. If you do not get this it could be that you have an older version of WsdlImp.exe. A last resort would be to modify your generated code by hand.

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

Sidebar

Related Questions

I'm trying to consume a remote Web service that uses HTTP basic authentication, using
Im trying to consume a Java web-service, that uses a certificate. I could generate
I have a Spring application that uses JAX-WS to consume another web service. Everything
So I need to consume a Web Service that uses a custom SoapHeader, as
I have a JAX-RPC web service that I am attempting to consume using Spring.
I want to consume a web service that is running on the local machine
Can any body have idea how to consume php soap web service that have
I need to consume a Web Service via SSL. In order to accomplish that
Apparently, Groovy easily consumes web services. Can it consume a web service that needs
I'm about to develop widget that will consume a web service built on top

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.