各位好,今天使用wsdl.exe生成js文件时>wsdl /language:js /out:e:\Translation.js e:\Translation.wsdl,出现错误,如下所示:
Microsoft(R) Web Services 描述语言实用工具
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
警告: 一个或多个操作已被跳过。
遇到警告。请检查生成的源注释,了解更多详细信息。我查看了生成文件的信息://CODEGEN: 命名空间“urn:Translation”中的操作“translateSentence”已被忽略。JScriptCodeProvider 不支持参数声明上的自定义属性。不知道有没有谁出现这种错误,生成c#,vb等语言我试了都没有问题。附wsdl文件:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Translation"
targetNamespace="urn:Translation"
xmlns:tns="urn:Translation"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:Translation"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"><types> <schema targetNamespace="urn:Translation"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:Translation"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<!-- operation request element -->
<element name="translateKeyword">
<complexType>
<sequence>
<element name="trans-engin" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="sl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="tl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="dict" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Trans-text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation response element -->
<element name="translateKeywordResponse">
<complexType>
<sequence>
<element name="tgt" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation request element -->
<element name="translateSentence">
<complexType>
<sequence>
<element name="trans-engin" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="sl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="tl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="subject" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Trans-text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation response element -->
<element name="translateSentenceResponse">
<complexType>
<sequence>
<element name="tgt" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</schema></types><message name="translateKeywordRequest">
<part name="parameters" element="ns:translateKeyword"/>
</message><message name="translateKeywordResponse">
<part name="parameters" element="ns:translateKeywordResponse"/>
</message><message name="translateSentenceRequest">
<part name="parameters" element="ns:translateSentence"/>
</message><message name="translateSentenceResponse">
<part name="parameters" element="ns:translateSentenceResponse"/>
</message><portType name="TranslationPortType">
<operation name="translateKeyword">
<documentation>Service definition of function ns__translateKeyword</documentation>
<input message="tns:translateKeywordRequest"/>
<output message="tns:translateKeywordResponse"/>
</operation>
<operation name="translateSentence">
<documentation>Service definition of function ns__translateSentence</documentation>
<input message="tns:translateSentenceRequest"/>
<output message="tns:translateSentenceResponse"/>
</operation>
</portType><binding name="Translation" type="tns:TranslationPortType">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="translateKeyword">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body parts="parameters" use="literal"/>
</input>
<output>
<SOAP:body parts="parameters" use="literal"/>
</output>
</operation>
<operation name="translateSentence">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body parts="parameters" use="literal"/>
</input>
<output>
<SOAP:body parts="parameters" use="literal"/>
</output>
</operation>
</binding><service name="Translation">
<documentation>gSOAP 2.7.9l generated service definition</documentation>
<port name="Translation" binding="tns:Translation">
<SOAP:address location="http://168.160.200.62/cgi/Translation.cgi"/>
</port>
</service></definitions>
Microsoft(R) Web Services 描述语言实用工具
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
警告: 一个或多个操作已被跳过。
遇到警告。请检查生成的源注释,了解更多详细信息。我查看了生成文件的信息://CODEGEN: 命名空间“urn:Translation”中的操作“translateSentence”已被忽略。JScriptCodeProvider 不支持参数声明上的自定义属性。不知道有没有谁出现这种错误,生成c#,vb等语言我试了都没有问题。附wsdl文件:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Translation"
targetNamespace="urn:Translation"
xmlns:tns="urn:Translation"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:Translation"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"><types> <schema targetNamespace="urn:Translation"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns="urn:Translation"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<!-- operation request element -->
<element name="translateKeyword">
<complexType>
<sequence>
<element name="trans-engin" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="sl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="tl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="dict" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Trans-text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation response element -->
<element name="translateKeywordResponse">
<complexType>
<sequence>
<element name="tgt" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation request element -->
<element name="translateSentence">
<complexType>
<sequence>
<element name="trans-engin" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="sl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="tl" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="subject" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Trans-text" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<!-- operation response element -->
<element name="translateSentenceResponse">
<complexType>
<sequence>
<element name="tgt" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
</schema></types><message name="translateKeywordRequest">
<part name="parameters" element="ns:translateKeyword"/>
</message><message name="translateKeywordResponse">
<part name="parameters" element="ns:translateKeywordResponse"/>
</message><message name="translateSentenceRequest">
<part name="parameters" element="ns:translateSentence"/>
</message><message name="translateSentenceResponse">
<part name="parameters" element="ns:translateSentenceResponse"/>
</message><portType name="TranslationPortType">
<operation name="translateKeyword">
<documentation>Service definition of function ns__translateKeyword</documentation>
<input message="tns:translateKeywordRequest"/>
<output message="tns:translateKeywordResponse"/>
</operation>
<operation name="translateSentence">
<documentation>Service definition of function ns__translateSentence</documentation>
<input message="tns:translateSentenceRequest"/>
<output message="tns:translateSentenceResponse"/>
</operation>
</portType><binding name="Translation" type="tns:TranslationPortType">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="translateKeyword">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body parts="parameters" use="literal"/>
</input>
<output>
<SOAP:body parts="parameters" use="literal"/>
</output>
</operation>
<operation name="translateSentence">
<SOAP:operation soapAction=""/>
<input>
<SOAP:body parts="parameters" use="literal"/>
</input>
<output>
<SOAP:body parts="parameters" use="literal"/>
</output>
</operation>
</binding><service name="Translation">
<documentation>gSOAP 2.7.9l generated service definition</documentation>
<port name="Translation" binding="tns:Translation">
<SOAP:address location="http://168.160.200.62/cgi/Translation.cgi"/>
</port>
</service></definitions>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货