BizTalkオーケストレーションから使用する必要のあるWebサービスがあります。BizTalkで使用するメッセージスキーマを定義しました。次のようになります。
<?xml version="1.0" encoding="utf-16"?>
<xs:schema
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
xmlns="http://www.myapp.com/schemas/IntegrationApplication-instance"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:ns0="https://DTIB.PropertySchema"
elementFormDefault="qualified"
targetNamespace="http://www.myapp.com/schemas/IntegrationApplication-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation=".\CommonTypes.xsd" />
<xs:element name="ProviderRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="Header" type="HeaderType" />
<xs:element name="Parameters" type="ParametersType" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
WCFサービスでは、次のように定義されたメソッドがあります
public ProviderResponse Provide(ProviderRequest providerRequest) {...}
ここで、ProviderRequest
は次のように定義されます
[DataContract(Namespace = "http://www.myapp.com/schemas/IntegrationApplication-instance")]
public class ProviderRequest
{
[DataMember]
public Header Header { get; set; }
[DataMember]
public Parameter[] Parameters { get; set; }
}
送信ポートを作成してProviderRequestメッセージを送信しようとすると、さまざまなエラーで失敗します。
BizTalkプロジェクトで定義されているものと同じスキーマを使用するWCFサービスを利用するための最良の方法は何ですか?