使用wsdl2perl.pl进行未绑定的前缀失败

时间:2012-01-05 00:27:33

标签: wcf web-services perl wsdl

我有一个由.NET WCF服务自动生成的WSDL。我正在尝试使用wsdl2perl.pl从WSDL生成Perl客户端。它在

上阻塞之前会通过几个接口和对象
  

C:\strawberry\perl\site\lib\SOAP\WSDL\Generator\Template\XSD\complexType.tt undef error - unbound http found for http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Logging. Bound prefixes are wsa, soapenc, soap, wsaw, wsap, q2, xsd, wsx, xml, wsa10, q3, xs, wsam, ser, wsdl, tns, msc, q at C:/strawberry/perl/site/lib/SOAP/WSDL/Base.pm line 62

这是什么意思?我找不到有关错误的任何文档。由于WSDL是由.NET自动生成的,我不确定是否可以更改它。我该怎么做才能解决此错误?


我指向wsdl2perl.pl的WSDL是:

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="LogService" targetNamespace="http://tempuri.org/">
    <wsp:Policy wsu:Id="WSHttpBinding_ILogService_policy">
        <wsp:ExactlyOne>
            <wsp:All>
                <wsaw:UsingAddressing/>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>
    <wsdl:types>
        <xsd:schema targetNamespace="http://tempuri.org/Imports">
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd0" namespace="http://tempuri.org/"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/FH.Logging"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Logging"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd5" namespace="http://schemas.datacontract.org/2004/07/System.Text"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd6" namespace="http://schemas.datacontract.org/2004/07/System.Diagnostics"/>
            <xsd:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd7" namespace="http://schemas.datacontract.org/2004/07/FH.Logging.Models"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="ILogService_WriteLog_InputMessage">
        <wsdl:part name="parameters" element="tns:WriteLog"/>
    </wsdl:message>
    <wsdl:message name="ILogService_WriteLog_OutputMessage">
        <wsdl:part name="parameters" element="tns:WriteLogResponse"/>
    </wsdl:message>
    <wsdl:message name="ILogService_RegisterApplication_InputMessage">
        <wsdl:part name="parameters" element="tns:RegisterApplication"/>
    </wsdl:message>
    <wsdl:message name="ILogService_RegisterApplication_OutputMessage">
        <wsdl:part name="parameters" element="tns:RegisterApplicationResponse"/>
    </wsdl:message>
    <wsdl:portType name="ILogService">
        <wsdl:operation name="WriteLog">
            <wsdl:input wsaw:Action="http://tempuri.org/ILogService/WriteLog" message="tns:ILogService_WriteLog_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/ILogService/WriteLogResponse" message="tns:ILogService_WriteLog_OutputMessage"/>
        </wsdl:operation>
        <wsdl:operation name="RegisterApplication">
            <wsdl:input wsaw:Action="http://tempuri.org/ILogService/RegisterApplication" message="tns:ILogService_RegisterApplication_InputMessage"/>
            <wsdl:output wsaw:Action="http://tempuri.org/ILogService/RegisterApplicationResponse" message="tns:ILogService_RegisterApplication_OutputMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="WSHttpBinding_ILogService" type="tns:ILogService">
        <wsp:PolicyReference URI="#WSHttpBinding_ILogService_policy"/>
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="WriteLog">
            <soap12:operation soapAction="http://tempuri.org/ILogService/WriteLog" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="RegisterApplication">
            <soap12:operation soapAction="http://tempuri.org/ILogService/RegisterApplication" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="LogService">
        <wsdl:port name="WSHttpBinding_ILogService" binding="tns:WSHttpBinding_ILogService">
            <soap12:address location="http://www.example.com/services/LoggingService.svc"/>
            <wsa10:EndpointReference>
                <wsa10:Address>
                    http://www.example.com/services/LoggingService.svc
                </wsa10:Address>
                <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
                    <Dns>localhost</Dns>
                </Identity>
            </wsa10:EndpointReference>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

这似乎引用了http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Logging

<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Logging" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Logging" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/">
    <xs:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
    <xs:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
    <xs:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd5" namespace="http://schemas.datacontract.org/2004/07/System.Text"/>
    <xs:import schemaLocation="http://www.example.com/services/LoggingService.svc?xsd=xsd6" namespace="http://schemas.datacontract.org/2004/07/System.Diagnostics"/>
    <xs:complexType name="LogEntry">
        <xs:sequence>
            <xs:element name="activityId" type="ser:guid"/>
            <xs:element name="activityIdInitialized" type="xs:boolean"/>
            <xs:element name="appDomainName" nillable="true" type="xs:string"/>
            <xs:element name="appDomainNameInitialized" type="xs:boolean"/>
            <xs:element name="categoryStrings" nillable="true" type="q1:ArrayOfstring" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
            <xs:element name="errorMessages" nillable="true" type="q2:StringBuilder" xmlns:q2="http://schemas.datacontract.org/2004/07/System.Text"/>
            <xs:element name="eventId" type="xs:int"/>
            <xs:element name="extendedProperties" nillable="true" type="q3:ArrayOfKeyValueOfstringanyType" xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
            <xs:element name="machineName" nillable="true" type="xs:string"/>
            <xs:element name="machineNameInitialized" type="xs:boolean"/>
            <xs:element name="message" nillable="true" type="xs:string"/>
            <xs:element name="priority" type="xs:int"/>
            <xs:element name="processId" nillable="true" type="xs:string"/>
            <xs:element name="processIdInitialized" type="xs:boolean"/>
            <xs:element name="processName" nillable="true" type="xs:string"/>
            <xs:element name="processNameInitialized" type="xs:boolean"/>
            <xs:element name="relatedActivityId" nillable="true" type="ser:guid"/>
            <xs:element name="severity" type="q4:TraceEventType" xmlns:q4="http://schemas.datacontract.org/2004/07/System.Diagnostics"/>
            <xs:element name="threadName" nillable="true" type="xs:string"/>
            <xs:element name="threadNameInitialized" type="xs:boolean"/>
            <xs:element name="timeStamp" type="xs:dateTime"/>
            <xs:element name="timeStampInitialized" type="xs:boolean"/>
            <xs:element name="title" nillable="true" type="xs:string"/>
            <xs:element name="unmanagedCodePermissionAvailable" type="xs:boolean"/>
            <xs:element name="unmanagedCodePermissionAvailableInitialized" type="xs:boolean"/>
            <xs:element name="win32ThreadId" nillable="true" type="xs:string"/>
            <xs:element name="win32ThreadIdInitialized" type="xs:boolean"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="LogEntry" nillable="true" type="tns:LogEntry"/>
</xs:schema>

0 个答案:

没有答案