If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > wsdl proxy class problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-11, 16:22
RSieffert RSieffert is offline
Registered User
 
Join Date: May 2011
Posts: 1
wsdl proxy class problem

I'm using a wsdl file from another company to set up my proxy class to use their data from their web service. The wsdl file contains the following:

<xsd:simpleType name="departStatus">
<xsd:annotation>
<xsd:documentation>Enumerates allowable departure statuses (DEPARTED, NOT-DEPARTED)</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="DEPARTED"/>
<xsd:enumeration value="NOT-DEPARTED"/>
</xsd:restriction>
</xsd:simpleType>

When I generate the proxy class I get the following:

departStatus = (
DEPARTED,
[System.Xml.Serialization.XmlEnumAttribute('NOT-DEPARTED')]
NOTDEPARTED);

Which doesn't compile unless I remove the line starting with [System.xml..., and it will not recognize "NOT-DEPARTED" as a valid value for departStatus. If I change "NOT-DEPARTED" to "NOT_DEPARTED" in the wsdl file and any incoming xml file it works fine, but the company that set this up is insisting that "NOT-DEPARTED" is valid and will not change it. Any idas how to get around this? Thanks in advance for any help.
Reply With Quote
Reply

Tags
hyphen, proxy class, wsdl, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On