2010-06-07 2 views
6

BizTalk 2006 R2를 사용하여 WSDL 파일에서 웹 참조를 생성하고 있습니다.BizTalk 웹 참조 - 생성 된 XSD에 WSDL에서 "손실 된"정보가 있습니다.

생성 된 XSD와 WSDL을 비교하면 많은 정보가 손실되었음을 알 수 있습니다.

는 WSDL에서 다음 추출물을 고려

<s:element form="unqualified" minOccurs="0" maxOccurs="4" name="Applicant"> 
    <s:complexType> 
    <s:sequence> 
     <s:element form="unqualified" minOccurs="1" maxOccurs="1" name="ApplicantIdentifier"> 
     <s:simpleType> 
      <s:restriction base="s:string" /> 
     </s:simpleType> 
     </s:element> 
     <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Name"> 
     <s:complexType> 
      <s:sequence> 
      <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Title"> 
       <s:simpleType> 
       <s:restriction base="s:string"> 
        <s:maxLength value="10" /> 
       </s:restriction> 
       </s:simpleType> 
      </s:element> 
      <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Forename"> 
       <s:simpleType> 
       <s:restriction base="s:string"> 
        <s:pattern value="[0-9A-Za-z \-]*" /> 
        <s:maxLength value="15" /> 
        <s:minLength value="1" /> 
       </s:restriction> 
       </s:simpleType> 
      </s:element> 
      <!-- more --> 
      </s:sequence> 
     </s:complexType> 
     </s:element> 
    </s:sequence> 
    </s:complexType> 
</s:element> 

에 BizTalk 생성 한 등가 XSD는 다음과 같습니다

<xs:element minOccurs="0" maxOccurs="unbounded" form="unqualified" name="Applicant"> 
    <xs:complexType> 
    <xs:sequence> 
     <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="ApplicantIdentifier" type="xs:string" /> 
     <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Name"> 
     <xs:complexType> 
      <xs:sequence> 
      <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Title" type="xs:string" /> 
      <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Forename" type="xs:string" /> 
      <!-- more --> 
      </xs:sequence> 
     </xs:complexType> 
     </xs:element> 
    </xs:sequence> 
    </xs:complexType> 
</xs:element> 

그래서, XSD가 제한 패턴을 잃고 자신의 값을 설정하고있다 minOccurs 및 maxOccurs의 경우

다른 소스에서 XSD로 매핑해야하므로 해당 단계에서 WSDL을 준수하지 않는 데이터를 트랩하려고합니다.

BizTalk가 XSD의 제한 사항을 보존하지 않은 이유를 알고있는 사람이 있습니까? 또는 비 손실 XSD를 어떻게 생성 할 수 있습니까?

+0

Xsd.exe를 사용하면 동일한 결과가 생성됩니까? – TEEKAY

+0

제안 해 주셔서 감사합니다, TEEKAY. WSDL 파일에서 xsd.exe를 가리킬 때 : xsd.exe "C : \ Demos \ MyProblem.wsdl"/ o : "C : \ Demos" 오류 : "잘못된 명령 줄 인수 : C : \ Demos \ MyProblem.wsdl ' " 그런 다음 파일 확장명을 xsd.exe를 속일 수 있도록 변경했습니다. xsd.exe"C : \ Demos \ MyProblem.xsd "/ o :"C : \ Demos " 오류가 발생했습니다 : "오류 : 클래스 또는 데이터 집합 중 하나만 생성 할 수 있습니다." 어쨌든 제안 해 주셔서 감사합니다. –

답변

1

는, 제한 및 maxOccurs에이> 1은 실제로 아무것도하지 않을 ... 예입니다 런타임에 BizTalk에서 사용됩니다. 이것이 웹 참조가 손실되는 이유입니다.

개인적으로 '웹 참조 추가'기능이나 '어댑터 메타 데이터 추가'/ WCF를 좋아하지 않았습니다. wsdl이 수시로 형식 정의를 xsd 파일로 수동 복사하는 것이 너무 많은 작업 인 경우 :

a) wsdl을 검색하고 형식을 추출하고 xsd를 업데이트하는 간단한 콘솔 응용 프로그램 빌드 파일 (VS의 외부 도구 메뉴에서 시작) 및

b) 서비스 계약 변경이 자주 필요한 개발 프로세스의 문제점을 해결하십시오!

관련 문제