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...
20080716-EE-VQP-32 / EE_QW_2_20070628