2009-10-27 1 views
2

wsdl 파일에 대해 SvcUtil을 사용하여 프록시 클래스를 생성하려고하는데 관련이 있다고 생각되는 요소가 누락되었습니다. 스키마 그룹 요소에 적용됩니다. 누군가 svcutil 처리 할 수있는 사실을 알고 있습니까? 그렇다면 다른 스키마 파일에있는 그룹 정의를 가리키는 ref 속성을 가진 xs : group 요소를 처리 할 것인가?프록시 클래스를 생성하기 위해 wsdl에서 SvcUtil.exe를 사용하는 중 오류 - xs : group 요소

d:\codegen\svcutil.exe d:\codegen\RPE\ProtocolStateManager.wsdl d:\codegen\RPE\schema\RPE.xsd d:\codegen\RPE\schema\PORT_MT100001UV.xsd d:\codegen\RPE\schema\coreschemas\infrastructureRoot.xsd d:\codegen\RPE\schema\coreschemas\dataTypes.xsd d:\codegen\RPE\schema\coreschemas\voc.xsd /l:cs 

오류는 다음과 같습니다 :

Error: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter Error: Group InfrastructureRootElements is missing. XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:ihe:qrph:rpe:2009']/wsdl:portType[@name= 'ProtocolStateManager']

ProtocolStateManager.wsdl :

<?xml version="1.0" encoding="UTF-8"?> 
<definitions name="ProtocolStateManager" 
      targetNamespace="urn:ihe:qrph:rpe:2009" 
      xmlns:rpe="urn:ihe:qrph:rpe:2009" 
      xmlns="http://schemas.xmlsoap.org/wsdl/" 
      xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"> 
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    TYPE DEFINITION - List of services participating in this BPEL process 
    The default output of the BPEL designer uses strings as input and 
    output to the BPEL Process. But you can define or import any XML 
    Schema type and use them as part of the message types. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
<types> 
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ihe:qrph:rpe:2009"> 
    <include schemaLocation="schema\RPE.xsd"/> 
    </schema> 
</types> 
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    MESSAGE TYPE DEFINITION - Definition of the message types used as 
    part of the port type defintions 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
<message name="EnterPatientRequestRequestMessage"> 
    <part name="payload" element="rpe:EnterPatientRequest"/> 
</message> 
<message name="EnterPatientRequestResponseMessage"> 
    <part name="payload" element="rpe:EnterPatientRequest"/> 
</message> 
<message name="PatientScreeningVisitsScheduledRequestMessage"> 
    <part name="payload" element="rpe:PatientScreeningVisitsScheduled"/> 
</message> 
<message name="PatientScreeningVisitsScheduledResponseMessage"> 
    <part name="payload" element="rpe:PatientScreeningVisitsScheduled"/> 
</message> 
<message name="PatientScreeningVisitRecordedRequestMessage"> 
    <part name="payload" element="rpe:PatientScreeningVisitRecorded"/> 
</message> 
<message name="PatientScreeningVisitRecordedResponseMessage"> 
    <part name="payload" element="rpe:PatientScreeningVisitRecorded"/> 
</message> 
<message name="EnrollPatientRequestRequestMessage"> 
    <part name="payload" element="rpe:EnrollPatientRequest"/> 
</message> 
<message name="EnrollPatientRequestResponseMessage"> 
    <part name="payload" element="rpe:EnrollPatientRequest"/> 
</message> 
<message name="PatientStudyVisitsScheduledRequestMessage"> 
    <part name="payload" element="rpe:PatientStudyVisitsScheduled"/> 
</message> 
<message name="PatientStudyVisitsScheduledResponseMessage"> 
    <part name="payload" element="rpe:PatientStudyVisitsScheduled"/> 
</message> 
<message name="PatientStudyVisitRecordedRequestMessage"> 
    <part name="payload" element="rpe:PatientStudyVisitRecorded"/> 
</message> 
<message name="PatientStudyVisitRecordedResponseMessage"> 
    <part name="payload" element="rpe:PatientStudyVisitRecorded"/> 
</message> 
    <message name="AlertProtocolStateMessage"> 
    <part name="payload" element="rpe:AlertProtocolState"/> 
</message> 
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    PORT TYPE DEFINITION - A port type groups a set of operations into 
    a logical service unit. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
<!-- portType implemented by the ProtocolStateManager BPEL process --> 
<portType name="ProtocolStateManager"> 
    <operation name="EnterPatientRequest"> 
    <input message="rpe:EnterPatientRequestRequestMessage"/> 
    <output message="rpe:EnterPatientRequestResponseMessage"/> 
    </operation> 
    <operation name="PatientScreeningVisitsScheduled"> 
    <input message="rpe:PatientScreeningVisitsScheduledRequestMessage"/> 
    <output message="rpe:PatientScreeningVisitsScheduledResponseMessage"/> 
    </operation> 
    <operation name="RecordPatientScreeningVisit"> 
    <input message="rpe:PatientScreeningVisitRecordedRequestMessage"/> 
    <output message="rpe:PatientScreeningVisitRecordedResponseMessage"/> 
    </operation> 
    <operation name="EnrollPatientRequest"> 
    <input message="rpe:EnrollPatientRequestRequestMessage"/> 
    <output message="rpe:EnrollPatientRequestResponseMessage"/> 
    </operation> 
    <operation name="PatientStudyVisitsScheduled"> 
    <input message="rpe:PatientStudyVisitsScheduledRequestMessage"/> 
    <output message="rpe:PatientStudyVisitsScheduledResponseMessage"/> 
    </operation> 
    <operation name="RecordPatientStudyVisit"> 
    <input message="rpe:PatientStudyVisitRecordedRequestMessage"/> 
    <output message="rpe:PatientStudyVisitRecordedResponseMessage"/> 
    </operation> 
</portType> 

    <portType name="ProtocolStateManagerCallback"> 
    <operation name="onAlertProtocolState"> 
    <input message="rpe:AlertProtocolStateMessage"/> 
    </operation> 
</portType> 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    PARTNER LINK TYPE DEFINITION 
    the ProtocolStateManager partnerLinkType binds the provider and 
    requester portType into an asynchronous conversation. 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 
<plnk:partnerLinkType name="ProtocolStateManager"> 
    <plnk:role name="ProtocolStateManagerProvider"> 
     <plnk:portType name="rpe:ProtocolStateManager"/> 
    </plnk:role> 
    <plnk:role name="ProtocolStateManagerCallbackListener"> 
     <plnk:portType name="rpe:ProtocolStateManagerCallback"/> 
    </plnk:role> 
</plnk:partnerLinkType> 
</definitions> 

RPE

svcutil.exe에 명령 (하여 XSD 파일에 대한 경로도 포함) .xsd (ProtocolStateManager.wsdl에 의한 참조) :

백45경1천5백15조5백36억9천1백36만3천2백10
<schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
     targetNamespace="urn:ihe:qrph:rpe:2009" 
     xmlns:rpe="urn:ihe:qrph:rpe:2009" 
     xmlns:v3="urn:hl7-org:v3" 
     xmlns="http://www.w3.org/2001/XMLSchema"> 

    <import namespace="urn:hl7-org:v3" schemaLocation="PORT_MT100001UV.xsd"/> 

    <element name="RetrieveProtocolDef" type="rpe:RetrieveProtocolDefType"/> 
    <element name="EnterPatientRequest" type="rpe:EnterPatientRequestType"/> 
    <element name="EnrollPatientRequest" type="rpe:EnrollPatientRequestType"/> 
    <element name="PatientScreeningVisitsScheduled" type="rpe:PatientScreeningVisitsScheduledType"/> 
    <element name="PatientScreeningVisitRecorded" type="rpe:PatientScreeningVisitRecordedType"/> 
    <element name="PatientStudyVisitsScheduled" type="rpe:PatientStudyVisitsScheduledType"/> 
    <element name="PatientStudyVisitRecorded" type="rpe:PatientStudyVisitRecordedType"/> 
    <element name="AmendProtocolDef" type="rpe:AmendProtocolDefType"/> 
    <element name="AlertProtocolState" type="rpe:AlertProtocolStateType"/> 
    <!-- need patient information and study information 
      EnterPatientRequestType can also be used for the return of candidateID?--> 
    <complexType name="RetrieveProtocolDefType"> 
     <sequence> 
      <element name="query" type="string"/> 
      <element name="protocolDef" type="string"/> 
     </sequence> 
    </complexType> 
    <complexType name="EnterPatientRequestType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="study" type="v3:PORT_MT100001UV.Study"/> 
     </sequence> 
    </complexType> 
    <!-- need patient for candidateID of the patient being scheduled for screening visits 
      need studyID to associate the candidate with the study 
      need schedule information--> 
    <complexType name="PatientScreeningVisitsScheduledType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="studyID" type="v3:II"/> 
      <element name="schedule" type="rpe:ScreeningVisitScheduleType"/> 
     </sequence> 
    </complexType> 
    <!-- need patient for candidateID of patient being recorded for screening visit 
      need studyID to associate the candidate with the study 
      need visit information for the screening visit being recorded--> 
    <complexType name="PatientScreeningVisitRecordedType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="studyID" type="v3:II"/> 
      <element name="visit" type="rpe:ScreenVisitType"/> 
     </sequence> 
    </complexType> 
    <!-- need patient information and study information 
      EnterPatientRequestType can also be used for the return of subjectID?--> 
    <complexType name="EnrollPatientRequestType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="study" type="v3:PORT_MT100001UV.Study"/> 
     </sequence> 
    </complexType> 
    <!-- need patient for subjectID of the patient being scheduled for visits 
      need studyID to associate the subject with the study 
      need schedule information--> 
    <complexType name="PatientStudyVisitsScheduledType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="studyID" type="v3:II"/> 
      <element name="schedule" type="rpe:StudyVisitScheduleType"/> 
     </sequence> 
    </complexType> 
    <!-- need patient for subjectID of patient being recorded for visit 
      need studyID to associate the subject with the study 
      need visit information for the visit being recorded--> 
    <complexType name="PatientStudyVisitRecordedType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="studyID" type="v3:II"/> 
      <element name="visit" type="rpe:StudyVisitType"/> 
     </sequence> 
    </complexType> 
    <!-- patient information should NOT include emrID? 
      should contain placeholder for candidateID and subjectID 
      what specific demographics data is needed? 
       Should this be a generic type so that an XML standard can be passed?--> 
    <complexType name="PatientType"> 
     <sequence> 
      <element name="candidateID" type="string"/> 
      <element name="subjectID" type="string"/> 
      <element name="name" type="string"/> 
      <element name="address" type="string"/> 
      <element name="dob" type="string"/> 
     </sequence> 
    </complexType> 
    <!-- studyID to identify the study 
      should studyData be a generic type to store an XML standard 
    <complexType name="StudyType"> 
     <sequence> 
      <element name="studyID" type="string"/> 
      <element name="studyData" type="string"/> 
     </sequence> 
    </complexType>--> 
    <complexType name="ScreenVisitType"> 
     <sequence> 
      <element name="visitID" type="string"/> 
      <element name="candidateID" type="string"/> 
      <element name="date" type="string"/> 
      <element name="screenVisitData" type="string"/> 
     </sequence> 
    </complexType> 
    <complexType name="StudyVisitType"> 
     <sequence> 
      <element name="visitID" type="string"/> 
      <element name="subjectID" type="string"/> 
      <element name="date" type="string"/> 
      <element name="studyVisitData" type="string"/> 
     </sequence> 
    </complexType> 
    <complexType name="ScreeningVisitScheduleType"> 
     <sequence> 
      <element name="visit" type="rpe:ScreenVisitType" maxOccurs="unbounded"/> 
     </sequence> 
    </complexType> 
    <complexType name="StudyVisitScheduleType"> 
     <sequence> 
      <element name="visit" type="rpe:StudyVisitType" maxOccurs="unbounded"/> 
     </sequence> 
    </complexType> 
    <complexType name="AmendProtocolDefType"> 
     <sequence> 
      <element name="protocolDef" type="string"/> 
     </sequence> 
    </complexType> 
    <complexType name="AlertProtocolStateType"> 
     <sequence> 
      <element name="patient" type="rpe:PatientType"/> 
      <element name="study" type="v3:PORT_MT100001UV.Study"/> 
     </sequence> 
    </complexType> 
</schema> 

(참조 : RPE.xsd) PORT_MT100001UV.xsd 니펫 -은 "InfrastructureRootElements"XS주의 : 그룹 :

<xs:complexType name="PORT_MT100001UV.Access"> 
     <xs:sequence> 
     <xs:group ref="InfrastructureRootElements"/> 
     <xs:element name="id" type="II" minOccurs="0" maxOccurs="unbounded"/> 
     <xs:element name="targetSiteCode" type="CD" minOccurs="0" maxOccurs="1"/> 
     <xs:choice> 
      <xs:choice> 
       <xs:element name="accessedPerson" type="PORT_MT100001UV.Person" nillable="true" 
          minOccurs="0" 
          maxOccurs="1"/> 
       <xs:element name="accessedNonPersonLivingSubject" 
          type="PORT_MT100001UV.NonPersonLivingSubject" 
          nillable="true" 
          minOccurs="0" 
          maxOccurs="1"/> 
      </xs:choice> 
      <xs:element name="accessedProduct" type="PORT_MT100001UV.Product" nillable="true" 
         minOccurs="0" 
         maxOccurs="1"/> 
     </xs:choice> 
     </xs:sequence> 
     <xs:attributeGroup ref="InfrastructureRootAttributes"/> 
     <xs:attribute name="nullFlavor" type="NullFlavor" use="optional"/> 
     <xs:attribute name="classCode" type="RoleClassAccess" use="required"/> 
    </xs:complexType> 

infrastructureRoot.xsd (PORT_MT100001UV.xsd 의한 기준)에 InfrastructureRootElements 정의 알 - 여기에 그룹이 심판 속성이 위의 스키마에서 같은 그룹 :

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<xs:schema xmlns:mif="urn:hl7-org:v3/mif" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:v3="urn:hl7-org:v3" 
      xmlns:ex="urn:hl7-org/v3-example" 
      elementFormDefault="qualified"> 
    <xs:annotation xmlns="urn:hl7-org:v3"> 
     <xs:documentation>Source Information...</xs:documentation> 
    </xs:annotation> 
    <xs:include schemaLocation="voc.xsd"/> 
    <xs:include schemaLocation="datatypes.xsd"/> 
    <xs:group name="InfrastructureRootElements"> 
     <xs:sequence> 
     <xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded"/> 
     <xs:element name="typeId" type="II" minOccurs="0" maxOccurs="1"/> 
     <xs:element name="templateId" type="II" minOccurs="0" maxOccurs="unbounded"/> 
     </xs:sequence> 
    </xs:group> 
    <xs:attributeGroup name="InfrastructureRootAttributes"/> 
</xs:schema> 
+0

모든 스키마 파일을 제공하면됩니다. 이게 효과가 있니? –

+0

불행히도 현재 나의 관심은 다른 것들로 전환되었습니다. 마지막으로 나는 모든 스키마 참조를 확인하고 있었고, 30 개 이상의 xsd 파일에 모두 미친 이름을 가진 파일이 있다고 생각합니다. ug - 다시 돌아올 때 솔루션을 게시합니다. – Tone

답변

3

나는 msdn 포럼의 게시물에서을 발견했습니다. 그것은 저의 실수를 극복하고 기능면에서 좀 더 많은 것을 제공합니다.

+0

아주 좋은 도구. 문제를 파악하는 데 도움이되었습니다. – Deepfreezed

1

내가는 svcutil 확실하지 않다,하지만 XSD.exe 및 WSDL.exe 당신은 모든 파일을 지정해야하는 .xsd f에 의해 사용됩니다. 왜냐하면 그들은 요소를 인식하지 못하기 때문입니다. 어쩌면 내 게시물도 도움이 될 것입니다. http://seanmcilvenna.com/blog/7-general/30-xca-implementation

+0

참으로 나는 그 문제에 대해 알고 있으며 과거에 그것을 극복하고 극복했습니다. 불행히도 여기서는 도움이되지 않았습니다. Svcutil.exe는 wsdl.exe에 해당하는 WCF입니다. 블로그 링크를 제공해 주셔서 감사합니다. 다른 사람들이 IHE 프로필 (XDS, XCA 등)을 개발하는 것을 찾는 것이 좋습니다. 내년에 connectathon에서 보게 될지도 모릅니다. – Tone

관련 문제