Tôi đang cố gắng thêm một Tham chiếu dịch vụ vào dự án của mình và tôi sẽ liên tục gặp lỗi tương tự.Tham chiếu dịch vụ không tải: Không thể tìm thấy lược đồ có không gian tên đích
tôi đã tạo ra một dịch vụ giả với giao diện người dùng SOAP mà có vẻ tốt đẹp, sau đó tôi cố gắng thêm một tài liệu tham khảo phục vụ cho dịch vụ giả này và các lỗi xuất hiện:
Warning 14 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Schema with target namespace 'urn:oasis:names:tc:dss:1.0:core:schema' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/esign']/wsdl:portType[@name='EsignServiceSoap11PortType']
Việc nhập khẩu trên wsdl nơi schema với namespace urn: ốc đảo: tên: tc: dss: 1,0: lõi: schema đang được nạp là:
<wsdl:types>
<schema xmlns="urn:oasis:names:tc:dss:1.0:core:schema">
<import namespace="urn:oasis:names:tc:dss:1.0:core:schema" schemaLocation="oasis-dss-core-schema-v1.0-os.xsd"/>
</schema>
.....
</wsdl:types>
tôi đã cố gắng để liên kết các schemaLocation trực tiếp đến các tập tin trong thư mục cùng hơn wsdl, để một url nơi nó được xuất bản trong một máy chủ riêng và đến một uri công cộng, nơi nó cũng được xuất bản.
Tôi nhận được cùng một lỗi và tôi bắt đầu cảm thấy rằng có thể tôi đã nhầm lẫn với nguồn gốc của vấn đề.
Mọi thông tin chi tiết sẽ được đánh giá cao.
CẬP NHẬT: Tôi đã tiêm urn: ốc đảo: tên: tc: dss: 1.0: core: định nghĩa hoàn thành giản đồ bên trong tệp wsdl của tôi, thay vì cố nhập nó. Khi tôi làm như vậy, SOAP UI vẫn tạo ra một cách chính xác các dịch vụ chế nhạo, tuy nhiên, khi tôi cố gắng thêm một Reference Service, lỗi này được ném trong phát hiện dịch vụ:
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- DTD is prohibited in this XML document.
Metadata contains a reference that cannot be resolved: 'http://elite8100-3:8088/mockEsignServiceSoap11Binding?WSDL'.
The content type text/html; charset=iso-8859-1 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 455 bytes of the response were: '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>Server</soap:Value>
</soap:Code>
<soap:Reason>
<!--1 or more repetitions:-->
<soap:Text xml:lang="en">Missing operation for soapAction [null] and body element [null] with SOAP Version [SOAP 1.2]</soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
</soap:Envelope>'.
The remote server returned an error: (500) Internal Server Error.
If the service is defined in the current solution, try building the solution and adding the service reference again.
EDIT2: Tôi đã sử dụng Fiddler để kiểm tra http lưu lượng truy cập khi cố tạo proxy, như được đề xuất trong câu trả lời. Trong quá trình tạo, 500 lỗi máy chủ nội bộ xuất hiện trên Fiddler khi cố gắng truy cập url mockService, phản hồi từ máy chủ là "Thiếu hoạt động cho soapAction [null] và phần tử cơ thể [null] với phiên bản SOAP [SOAP 1.2]".
Đây là, hiện tại, WSDL tôi đang sử dụng để tạo mockService.
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://aplicaciones.serpasa.es/CONTROLAMBIENTAL/oasis-dss-core-schema-v1.0-os.xsd"/>
</schema>
<schema xmlns="http://princast.es/esign/2.0/esign.xsd">
<import namespace="http://princast.es/esign/2.0/esign.xsd" schemaLocation="http://aplicaciones.serpasa.es/CONTROLAMBIENTAL/esign.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="SignRequestMessage">
<wsdl:part element="dss:SignRequest" name="payload"/>
</wsdl:message>
<wsdl:message name="SignResponseMessage">
<wsdl:part element="dss:SignResponse" name="payload"/>
</wsdl:message>
<wsdl:message name="VerifyRequestMessage">
<wsdl:part element="dss:VerifyRequest" name="payload"/>
</wsdl:message>
<wsdl:message name="VerifyResponseMessage">
<wsdl:part element="dss:VerifyResponse" name="payload"/>
</wsdl:message>
<wsdl:message name="GetSignInfoFromDocumentRequestMessage">
<wsdl:part element="esign:SignInfoRequest" name="payload"/>
</wsdl:message>
<wsdl:message name="GetSignInfoFromDocumentResponseMessage">
<wsdl:part element="esign:SignInfo" name="payload"/>
</wsdl:message>
<wsdl:message name="GetSignConfigurationRequestMessage">
<wsdl:part element="esign:SignConfigurationRequest" name="payload"/>
</wsdl:message>
<wsdl:message name="GetSignConfigurationResponseMessage">
<wsdl:part element="esign:SupportedSignConfiguration" name="payload"/>
</wsdl:message>
<!-- Port -->
<wsdl:portType name="EsignServiceSoap11PortType">
<wsdl:operation name="sign">
<wsdl:input message="impl:SignRequestMessage" name="signRequest"/>
<wsdl:output message="impl:SignResponseMessage" name="signResponse"/>
</wsdl:operation>
<wsdl:operation name="verify">
<wsdl:input message="impl:VerifyRequestMessage" name="verifyRequest"/>
<wsdl:output message="impl:VerifyResponseMessage" name="verifyResponse"/>
</wsdl:operation>
<wsdl:operation name="getSignConfiguration">
<wsdl:input message="impl:GetSignConfigurationRequestMessage" name="getSignConfigurationRequest"/>
<wsdl:output message="impl:GetSignConfigurationResponseMessage" name="getSignConfigurationResponse"/>
</wsdl:operation>
<wsdl:operation name="getSignInfoFromDocument">
<wsdl:input message="impl:GetSignInfoFromDocumentRequestMessage" name="getSignInfoFromDocumentRequest"/>
<wsdl:output message="impl:GetSignInfoFromDocumentResponseMessage" name="getSignInfoFromDocumentResponse"/>
</wsdl:operation>
</wsdl:portType>
<!-- Binding -->
<wsdl:binding name="EsignServiceSoap11Binding" type="impl:EsignServiceSoap11PortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sign">
<wsdl:documentation>
Realiza una firma digital delegada sobre un
documento segun el estandard OASIS Digital Signature Service (DSS)
</wsdl:documentation>
<wsdlsoap:operation soapAction="urn:sign"/>
<wsdl:input name="signRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="signResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="verify">
<wsdl:documentation>
Verifica una firma digital OASIS Digital
Signature Service (DSS)
</wsdl:documentation>
<wsdlsoap:operation soapAction="urn:verify"/>
<wsdl:input name="verifyRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="verifyResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSignConfiguration">
<wsdl:documentation>
Obtiene los certificados con los que una
aplicacion en el MC de Firma Digital puede realizar
una firma
</wsdl:documentation>
<wsdlsoap:operation soapAction="urn:getSignConfiguration"/>
<wsdl:input name="getSignConfigurationRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getSignConfigurationResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSignInfoFromDocument">
<wsdl:documentation>
Obtiene informacion de un fichero de firma
</wsdl:documentation>
<wsdlsoap:operation soapAction="urn:getSignInfoFromDocument"/>
<wsdl:input name="getSignInfoFromDocumentRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getSignInfoFromDocumentResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EsignService">
<wsdl:documentation>
Servicio web de firma digital
</wsdl:documentation>
<wsdl:port binding="impl:EsignServiceSoap11Binding" name="EsignServiceSoap11Port">
<wsdlsoap:address location="http://someexternalsite.com"/>
</wsdl:port>
</wsdl:service>
Tôi đã tải mỗi XSD đơn liên quan và xuất bản chúng trên một máy chủ nào, tôi cũng đã thay đổi schemaLocations để họ trỏ đến địa chỉ trên máy chủ công cộng này, tuy nhiên , vấn đề dường như liên quan đến cấu trúc WSDL.
Để cập nhật, có vẻ như tiêu đề loại nội dung không được đặt chính xác, văn bản/html thay vì (ứng dụng/xà phòng + xml; charset = utf-8), mặc dù tải trọng trông giống như phong bì xà phòng. Ngoài ra, máy chủ đang ném (500) Lỗi Máy chủ Nội bộ. Bạn có quyền truy cập vào các lỗi trên máy chủ đó không? – Dijkgraaf
@Dijkgraaf Lỗi loại nội dung hoàn toàn mất phương hướng cho tôi, vì khi tôi chỉ đưa lược đồ vào thì không có vấn đề gì với nó. Đáng buồn là tôi đã không truy cập để xem lỗi trên máy chủ từ xa. – Bardo
Một câu hỏi nhỏ, đã cố gắng để xem điều gì xảy ra khi bạn cố gắng kết nối với một lược đồ thử nghiệm cục bộ? một lược đồ trong cùng một vị trí như lược đồ có vấn đề? Câu hỏi cơ bản là, Có phải vấn đề khi truy cập lược đồ nói chung hay lược đồ cụ thể này không? Tôi biết nó sẽ không giải quyết được vấn đề, nhưng nó sẽ bản địa hoá vấn đề – user3569147