Advertisement

05.05.2008 at 07:38AM PDT, ID: 23376506 | Points: 125
[x]
Attachment Details

WSDL will not create a proxy class in C# with visual studio

Asked by buck2769 in Web Services Description Language, Web Services for .Net, SOAP

Tags: wsdl

My first hand written WSDL. It will build a SOAP request in PHP, Oxygen XML, and XML Spy and receive an expected response from the server. However, when trying to create a webservice in Visual Studio it fails to create the proxy class. I'm not the .Net developer and am not aware of any quirks Visual Studio and .Net have with their proxy class generation. Is there something wrong with my WSDL or a change needed for .Net to behave properly?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
<?xml version ='1.0' encoding ='UTF-8' ?> 
<definitions name="Stat" targetNamespace="urn:SWStat" xmlns:tns="urn:SWStat"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
 
    <!-- optional define complex types -->
    <types>
        <xsd:schema targetNamespace="urn:SWStat" xmlns="http://www.w3.org/2001/XMLSchema">
            <!-- OBJECTS -->
 
            <!-- OBJECT FOR STATS -->
            <xsd:complexType name="StatObject">
                <xsd:all>
                    <xsd:element name="id" type="xsd:string"/>
                    <xsd:element name="clicks" type="xsd:int"/>
                    <xsd:element name="clickthroughs" type="xsd:int"/>
                    <xsd:element name="leads" type="xsd:int"/>
                    <xsd:element name="signup_ratio" type="xsd:string"/>
                    <xsd:element name="num_sales" type="xsd:int"/>
                    <xsd:element name="sales" type="xsd:string"/>
                    <xsd:element name="sub_sales" type="xsd:string"/>
                    <xsd:element name="commission" type="xsd:string"/>
                    <xsd:element name="we_get" type="xsd:string"/>
                    <xsd:element name="revenue" type="xsd:string"/>
                    <xsd:element name="impressions" type="xsd:string"/>
                </xsd:all>
            </xsd:complexType>
            <element name="stat" type="tns:StatObject"/>
 
            <!-- ARRAYS -->
            <!-- Array of STATS -->
            <xsd:complexType name="ArrayOfStatObject">
                <xsd:complexContent>
                    <xsd:restriction base="soapenc:Array">
                        <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="tns:StatObject[]"/>
                    </xsd:restriction>
                </xsd:complexContent>
            </xsd:complexType>
            <element name="statarray" type="tns:ArrayOfStatObject"/>
 
        </xsd:schema>
    </types>
 
    <!-- MESSAGES -->
    <message name="dailyTotalRequest">
        <part name="dt_id" type="xsd:string"/>
        <part name="password" type="xsd:string"/>
        <part name="start_date" type="xsd:string"/>
        <part name="end_date" type="xsd:string"/>
        <part name="program_id" type="xsd:string"/>
    </message>
    <message name="dailyTotalResponse">
        <part name="statarray" type="tns:ArrayOfStatObject"/>
        <!--<part name="stat" element="tns:statarray"/>-->
        <!--<part name="stat" element="tns:statarray"/>-->
    </message>
 
    <!-- /MESSAGES -->
 
    <!-- PORT TYPES -->
    <!-- step 2 - attach request and response messages to binding -->
    <portType name="StatPortType">
        <operation name="dailyTotal">
            <input message="tns:dailyTotalRequest"/>
            <output message="tns:dailyTotalResponse"/>
        </operation>
    </portType>
    <!-- /PORT TYPES -->
    
    <!-- BINDINGS -->
    <!-- step one - create a new binding -->
    <binding name="StatBinding" type="tns:StatPortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="dailyTotal">
            <soap:operation soapAction="urn:SWStat#dailyTotal" style="rpc"/>
            <input>
                <soap:body use="literal" namespace="urn:SWStat"
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </input>
            <output>
                <soap:body use="literal" namespace="urn:SWStat"
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </output>
        </operation>
    </binding>
    <!-- /BINDINGS -->
 
    <!-- this location must be changed for production -->
    <service name="StatService">
        <port name="StatPort" binding="tns:StatBinding">
            <soap:address location="http://192.168.1.95/sw/ws/index.php"/>
        </port>
    </service>
</definitions>
[+][-]05.05.2008 at 08:06AM PDT, ID: 21500545

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
05.05.2008 at 08:06AM PDT, ID: 21500545
Here is an example .xsd file:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XSDSchema1" targetNamespace="http://tempuri.org/XSDSchema1.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/XSDSchema1.xsd" xmlns:mstns="http://tempuri.org/XSDSchema1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="Document">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Employee">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="EmployeeID" type="xs:int" />
              <xs:element name="NationalIDNumber" type="xs:string" />
              <xs:element name="ContactID" type="xs:int" />
              <xs:element name="LoginID" type="xs:string" />
              <xs:element name="ManagerID" type="xs:int" minOccurs="0" />
              <xs:element name="Title" type="xs:string" />
              <xs:element name="BirthDate" type="xs:dateTime" />
              <xs:element name="MaritalStatus" type="xs:string" />
              <xs:element name="Gender" type="xs:string" />
              <xs:element name="HireDate" type="xs:dateTime" />
              <xs:element name="SalariedFlag" type="xs:boolean" />
              <xs:element name="VacationHours" type="xs:short" />
              <xs:element name="SickLeaveHours" type="xs:short" />
              <xs:element name="CurrentFlag" type="xs:boolean" />
              <xs:element name="rowguid" type="xs:string" />
              <xs:element name="ModifiedDate" type="xs:dateTime" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="DocumentKey1">
      <xs:selector xpath=".//mstns:Employee" />
      <xs:field xpath="mstns:EmployeeID" />
    </xs:unique>
  </xs:element>
</xs:schema>
Open in New Window
 
 
20080716-EE-VQP-32 / EE_QW_2_20070628