views:

40

answers:

0

Hi,

i want to configure a wsdl with an operation which can return an object among a list of two. How can i configure it's schema and it's message?

This is my wsdl :

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:hl7="urn:hl7-org:v3" xmlns:ihe="urn:ihe:iti:pam:2007"
    xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
    xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PAMConsumer"
    targetNamespace="urn:ihe:iti:pam:2007">
    <types>

        <xsd:schema elementFormDefault="qualified" targetNamespace="urn:ihe:iti:pam:2007">



            <xsd:import namespace="urn:hl7-org:v3"
                schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201314UV02.xsd" />
            <xsd:import namespace="urn:hl7-org:v3"
                schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201315UV02.xsd" />
            <xsd:import namespace="urn:hl7-org:v3"
                schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201316UV02.xsd" />
        </xsd:schema>

    </types>


    <message name="PRPA_IN201314UV02_Message">
        <part element="hl7:PRPA_IN201314UV02" name="body" />
    </message>

    **<message name="PRPA_IN201314_responseUV02_Message">
        <part element="hl7:PRPA_IN201314_responseUV02" name="body" />
    </message>**


    <message name="PRPA_IN201315UV02_Message">
        <part element="hl7:PRPA_IN201315UV02" name="body" />
    </message>


    <message name="PRPA_IN201316UV02_Message">
        <part element="hl7:PRPA_IN201316UV02" name="body" />
    </message>



    <portType name="PAMConsumer_PortType">



        <operation name="PAMConsumer_PRPA_IN201314UV02">
            <input message="ihe:PRPA_IN201314UV02_Message" wsaw:Action="urn:hl7-org:v3:PRPA_IN201314UV02" />
            <output message="ihe:PRPA_IN201314_responseUV02_Message"
                wsaw:Action="urn:hl7-org:v3:PRPA_IN201314_responseUV02" />
        </operation>

    </portType>

    <binding name="PAMConsumer_Binding_Soap12" type="ihe:PAMConsumer_PortType">
        <soap12:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />

        <operation name="PAMConsumer_PRPA_IN201314UV02">
            <soap12:operation soapAction="urn:hl7-org:v3:PRPA_IN201314UV02" />
            <input>
                <soap12:body use="literal" />
            </input>
            <output>
                <soap12:body use="literal" />
            </output>
        </operation>

    </binding>
    <service name="PAMConsumer_Service">
        <port binding="ihe:PAMConsumer_Binding_Soap12" name="PAMConsumer_Port_Soap12">
                        <soap12:address location="https://spirit6:8443/XDS3/registry" />
        </port>
    </service>
</definitions>

and this is the error when i run wsdl2java command:

Part in Message PRPA_IN201314_responseUV02_Message referenced type PRPA_IN201314_responseUV02_Message can not be dfound in the schemas.

Actually, i don't know how to configure the right way this xsd:choice for the schemas and the message.

Thank you.