마이크로 소프트 MSDN은하지 않습니다,WCF 보편적 서비스 계약 및 WS-상호 운용성 준수
[ServiceContract]
public interface IUniversalRequestReply
{
[OperationContract(Action="*", ReplyAction="*")]
Message ProcessMessage(Message msg);
}
로 요청 응답 작업에 대한 가장 보편적 서비스 계약을 설명합니다 WSUI 호환 (SOAPUI 준수 검사 사용)
가장 보편적 인 계약은 또한 가장 상호 운용 가능할 것이라고 생각합니다.
왜 WS-I 규격을 준수하지 않는지 설명 할 수 있습니까? 더 중요한 것은 Message 클래스를 사용하면 Java 클라이언트가 서비스를 덜 소비하게 될까요?
Message 클래스를 사용한 모든 경험에 감사드립니다. 첫 번째 대답 후
편집 :
이 서비스 계약 및 운영 계약을 보여주는 전체 WSDL이다. WSI 준수 테스트가 실패 무엇
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="UniversalRequestReply" targetNamespace="http://tempuri.org/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://localhost:52437/UniversalRequestReply.svc?xsd=xsd0" namespace="http://schemas.microsoft.com/Message"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="IUniversalRequestReply_SomeOperation_InputMessage">
<wsdl:part xmlns:q1="http://schemas.microsoft.com/Message" name="msg" type="q1:MessageBody"/>
</wsdl:message>
<wsdl:message name="IUniversalRequestReply_SomeOperation_OutputMessage">
<wsdl:part xmlns:q2="http://schemas.microsoft.com/Message" name="SomeOperationResult" type="q2:MessageBody"/>
</wsdl:message>
<wsdl:portType name="IUniversalRequestReply">
<wsdl:operation name="SomeOperation">
<wsdl:input wsaw:Action="http://tempuri.org/IUniversalRequestReply/SomeOperation" message="tns:IUniversalRequestReply_SomeOperation_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IUniversalRequestReply/SomeOperationResponse" message="tns:IUniversalRequestReply_SomeOperation_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IUniversalRequestReply" type="tns:IUniversalRequestReply">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SomeOperation">
<soap:operation soapAction="http://tempuri.org/IUniversalRequestReply/SomeOperation" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UniversalRequestReply">
<wsdl:port name="BasicHttpBinding_IUniversalRequestReply" binding="tns:BasicHttpBinding_IUniversalRequestReply">
<soap:address location="http://localhost:52437/UniversalRequestReply.svc/basic"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
는 누락 된 서비스 계약이 아니라 메시지 입력을 직접 :
Name of message that failed: {http://tempuri.org/}IUniversalRequestReply_SomeOperation_InputMessage
Message: name={http://tempuri.org/}IUniversalRequestReply_SomeOperation_InputMessage
Part: name=msg
typeName={http://schemas.microsoft.com/Message}MessageBody
그래서이 메시지 클래스를 사용하여 몇 가지 이유 WSI 호환되지 않습니다.
나는 데이터 계약이 당신의 대답의 첫 줄에 서비스 계약이 아니라고 생각했다. 이 서비스에는 비 직렬화에 유용한 데이터 계약이 있지만 모든 것이 있습니다. – fanvabra
서비스 계약은 운영 계약과 데이터 계약을 모두 정의하기 때문에 서비스 계약을 의미했습니다. "범용"계약의 경우 가능한 모든 조작에 대해 단일 메소드가 호출됩니다. 이 메서드는 호출 된 작업과 해당 메서드에 적용되는 해당 데이터 계약을 파싱해야합니다. 예, 보편적 인 서비스는 요청/응답의 직렬화와 비 직렬화를 담당합니다. –