Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# wsdl.exe和wsimport之间的差异_C#_Java_Wsdl - Fatal编程技术网

C# wsdl.exe和wsimport之间的差异

C# wsdl.exe和wsimport之间的差异,c#,java,wsdl,C#,Java,Wsdl,有我需要实现的Web服务的描述 order-processor-Service.wsdl <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://s

有我需要实现的Web服务的描述

order-processor-Service.wsdl

    <?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:port="http://xxxx.yy.ru/services/forms/integration/orderprocess"
    xmlns:tns="http://xxxx.yy.ru/services/forms/integration/orderprocess"
    targetNamespace="http://xxxx.yy.ru/services/forms/integration/orderprocess"
    >

    <wsdl:import namespace="http://xxxx.yy.ru/services/forms/integration/orderprocess" location="order-processor.wsdl"/>

    <wsdl:binding name="OrderProcessorSOAP" type="port:IOrderProcessor">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="processOrder">
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:service name="OderProcessorService">
        <wsdl:port name="OrderProcessorSoap" binding="tns:OrderProcessorSOAP">
            <soap:address location="http://localhost/OrderProcessorService"/>
        </wsdl:port>
   </wsdl:service>

</wsdl:definitions>
我需要C#的服务实现,而不是java。 请帮帮我。

错误消息

缺少soap:操作绑定

意味着您需要使用

<soap:operation soapAction="" />

声明或类似声明


缺少此声明可能会导致您遇到错误。

看不见或类似情况,这可能会导致错误。亲爱的,我将添加此声明作为答案,以便对未来的参与者更清楚,也许我会得到一些果汁。;)
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xxxx.yy.ru/services/forms/integration/orderprocess"
    xmlns:tns="http://xxxx.yy.ru/services/forms/integration/orderprocess"
    xmlns:types="http://xxxx.yy.ru/services/forms/integration/types"
    elementFormDefault="qualified" 
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    jaxb:version="2.0"
    >

    <xs:import namespace="http://xxxx.yy.ru/services/forms/integration/types" schemaLocation="forms-services-types.xsd"/>


    <xs:annotation>
        <xs:appinfo>
            <jaxb:globalBindings>
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:date"
                    parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                    printMethod="javax.xml.bind.DatatypeConverter.printDateTime"
                />
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
                    parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                    printMethod="javax.xml.bind.DatatypeConverter.printDateTime"
                />
                <jaxb:serializable uid="1" />
            </jaxb:globalBindings>
        </xs:appinfo>
    </xs:annotation>

    <xs:element name="processOrder" type="tns:ProcessOrderRequest" />

    <xs:element name="processOrderResponse" type="tns:ProcessOrderResponse" />


    <xs:element name="processOrderFault" type="xs:string">
        <xs:annotation>
            <xs:documentation>
                Элемент содержит сообщение об ошибке (то что будет пользователю показываться)
            </xs:documentation>
        </xs:annotation>
    </xs:element>


    <xs:complexType name="ProcessOrderRequest">
        <xs:sequence>
            <xs:element name="OrderHeader"  type="tns:OrderHeader">
                <xs:annotation>
                    <xs:documentation>
                        Доступная служебная информация о заявке (почти все, что хранится в базе)
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="OrderPayload" >
                <xs:annotation>
                    <xs:documentation>
                        Модель данных из формы
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:any/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="OrderAttachments" type="tns:OrderAttachments" >
                <xs:annotation>
                    <xs:documentation>
                         Прикрепленные файлы из формы
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ProcessOrderResponse">
        <xs:sequence>
            <xs:annotation>
                <xs:documentation>
                    Идентификатор заявки назначенный внешней сиситемой
                </xs:documentation>
            </xs:annotation>
            <xs:element name="return" type="xs:string" />
        </xs:sequence>
    </xs:complexType>


    <xs:complexType name="OrderHeader">
        <xs:sequence>
            <xs:element ref="types:order"/>
            <xs:element ref="types:service"/>
        </xs:sequence>            
    </xs:complexType>

    <xs:complexType name="OrderAttachments">
        <xs:sequence>
            <xs:element ref="types:attachments" />
        </xs:sequence>
    </xs:complexType>

</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema 
    version="1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xxxx.yy.ru/services/forms/integration/types"
    xmlns:tns="http://xxxx.yy.ru/services/forms/integration/types"
    elementFormDefault="qualified"
    >

    <xs:element name="order" type="tns:OrderType"/>
    <xs:element name="service" type="tns:ServiceType"/>
    <xs:element name="attachments" >
        <xs:complexType>
            <xs:sequence>
                <xs:element name="attachment" type="tns:AttachmentType" minOccurs="1" maxOccurs="unbounded"/> 
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="OrderType">
        <xs:sequence>
            <xs:element name="guid" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        внутренний мдентификатор заявки. для служебного пользования
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="humanID" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        идентификатор заявки  отображаемый пользователю
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="externalId" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        идентификатор заявки, присваеваемый обрабатывающей сиситемой. 
                        Если система поддерживает наши идентификаторы, то вероятно будет равен guid
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="creationDate" type="xs:dateTime">
                <xs:annotation>
                    <xs:documentation>
                        дата создаия заявки
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="userId" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        идентификатор пользователя, подавшего заявку
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="serviceId" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>


    <xs:complexType name="ServiceType">
        <xs:sequence>
            <xs:element name="guid" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        идентификатор услуги                        
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="name" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        имя услуги
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="orderPrefix" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        префикс для идентификтора заявки  данной услуги.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="properties">
                <xs:annotation>
                    <xs:documentation>
                        свойства специфичные для обработчиков данной услуги
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="property" type="tns:PropertyType" minOccurs="1" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="PropertyType">
        <xs:sequence>
            <xs:element name="value" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="AttachmentType">
        <xs:sequence>
            <xs:element name="name"     type="xs:string"/>
            <xs:element name="mimeType" type="xs:string"/>
            <xs:element name="data"     type="xs:base64Binary"/>
        </xs:sequence>
    </xs:complexType>



</xs:schema>
C:\Documents and Settings\Alex\Рабочий стол\orders-processing>"C:\Program Files\
Microsoft SDKs\Windows\v7.0A\bin\wsdl.exe" /serverInterface order-processor-Serv
ice.wsdl order-processor.wsdl order-processor.xsd forms-services-types.xsd
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Unable to import binding 'OrderProcessorSOAP' from namespace 'http://xxxx
.yy.ru/services/forms/integration/orderprocess'.
  - Unable to import operation 'processOrder'.
  - The operation binding 'processOrder' from namespace 'http://xxxx.yy.ru/servi
ces/forms/integration/orderprocess' had invalid syntax.  Missing soap:operation
binding.

If you would like more help, please type "wsdl /?".
<soap:operation soapAction="" />