Specified Cast is Invalid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Jenkins

    Specified Cast is Invalid

    Hi,
    can anyone shed some light on an issue I have encountered. I have used a
    tool (Cape Clear) to generate a WSDL file for me. When I use the WSDL2Java
    tool provided by apache axis it creates proxies without any issues. When I
    use WSDL.exe I get the following:

    E:\XML\Schemas\ Cape Clear>wsdl /server myEmployeeServi ce.wsdl
    Microsoft (R) Web Services Description Language Utility
    [Microsoft (R) .NET Framework, Version 1.1.4322.573]
    Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

    Error: Unable to import binding 'PortType1Bindi ng' from namespace
    'http://com.tony.wsdl.t esting/CClear.wsdl'.
    - Unable to import operation 'SubmitEmployee Operation'.
    - Specified cast is not valid.

    If you would like more help, please type "wsdl /?".

    I cannot see anything obvious in the WSDL. Any help greatly appreciated.
    WSDL below:

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitio ns
    name="SimpleEmp loyee"
    targetNamespace ="http://com.tony.wsdl.t esting/CClear.wsdl"
    xmlns:import1=" http://MyFirstMessagin g.employee"
    xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
    xmlns:tns="http ://com.tony.wsdl.t esting/CClear.wsdl"
    xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/"
    xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
    <wsdl:documenta tion
    xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">Created using Cape Clear
    Studio SOA Editor - http://www.capeclear.c om</wsdl:documentat ion>
    <wsdl:types>
    <xs:schema
    targetNamespace ="http://MyFirstMessagin g.employee"
    xmlns="http://MyFirstMessagin g.employee"
    xmlns:b="http://schemas.microso ft.com/BizTalk/2003"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Employee" >
    <xs:annotatio n>
    <xs:appinfo>
    <b:properties >
    <b:property
    distinguished=" true"
    xpath="/*[local-name()='Employe e' and
    namespace-uri()='http://MyFirstMessagin g.employee']/@*[local-name()='Grade']
    "/>
    </b:properties>
    </xs:appinfo>
    </xs:annotation>
    <xs:complexType >
    <xs:sequence>
    <xs:element name="Name">
    <xs:complexType >
    <xs:sequence>
    <xs:element name="First"
    type="xs:string "/>
    <xs:element name="Middle"
    type="xs:string "/>
    <xs:element name="Last"
    type="xs:string "/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="Personal" >
    <xs:complexType >
    <xs:sequence>
    <xs:element minOccurs="0" name="SSN"
    nillable="true" type="xs:string "/>
    <xs:element name="DOB"
    type="xs:string "/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="Grade" type="xs:positi veInteger"
    use="required"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="SubmitEmp loyeeResponse">
    <wsdl:part name="empRespon se" type="xsd:strin g"/>
    </wsdl:message>
    <wsdl:message name="SubmitEmp loyee">
    <wsdl:documenta tion
    xmlns:wsdl="htt p://schemas.xmlsoap .org/wsdl/">Employee Submission
    Mechanism</wsdl:documentat ion>
    <wsdl:part element="import 1:Employee" name="p_Emp"/>
    </wsdl:message>
    <wsdl:portTyp e name="EmployeeP ort">
    <wsdl:operati on name="SubmitEmp loyeeOperation" >
    <wsdl:input message="tns:Su bmitEmployee"/>
    <wsdl:output message="tns:Su bmitEmployeeRes ponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="PortType1 Binding" type="tns:Emplo yeePort">
    <soap:binding style="document "
    transport="http ://schemas.xmlsoap .org/soap/http"/>
    <wsdl:operati on name="SubmitEmp loyeeOperation" >
    <soap:operati on

    soapAction="cap econnect::Emplo yeePort#SubmitE mployeeOperatio n"
    style="document "/>
    <wsdl:input>
    <soap:body parts="p_Emp" use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MyEmploye eService">
    <wsdl:port binding="tns:Po rtType1Binding" name="Port1">
    <soap:address
    location="http://localhost:8000/ccx/MyEmployeeServi ce"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definition s>


Working...