Java SpringWS:在wsdl请求中添加自定义SOAP头

Java SpringWS:在wsdl请求中添加自定义SOAP头,java,web-services,spring-boot,soap,wsdl,Java,Web Services,Spring Boot,Soap,Wsdl,我的目标是什么 我试图使用“UWLR_leerlinggevens_v2p2.xsd”公开soap服务,它还包括其他xsd: 下面公开了WSDL在ws:input中缺少soap:header,因此在将WSDL导入soapui报头部分时没有出现 <wsdl:operation name="leerkrachten"> <soap:operation soapAction="" /> <wsdl:input name="leerkrachten_verz

我的目标是什么

我试图使用“UWLR_leerlinggevens_v2p2.xsd”公开soap服务,它还包括其他xsd: 下面公开了WSDL在ws:input中缺少soap:header,因此在将WSDL导入soapui报头部分时没有出现

<wsdl:operation name="leerkrachten">
    <soap:operation soapAction="" />
    <wsdl:input name="leerkrachten_verzoek">
        <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output name="leerkrachten_antwoord">
        <soap:body use="literal" />
    </wsdl:output>
</wsdl:operation>
还尝试使用SimpleWsdl11Definition公开直接wsdl,而不是使用xsd

@Bean(name = "leerlinggegevens")
    public Wsdl11Definition defaultWsdl11Definition() {
        SimpleWsdl11Definition wsdl11Definition = new SimpleWsdl11Definition();
        wsdl11Definition.setWsdl(new ClassPathResource("wsdl/UWLR_Leerlinggegevens_v2p2.wsdl"));

        return wsdl11Definition;
    }
但在导入到SOAPUI时面临问题,因为原始wsdl引用了其他XSD,如下所示

<wsdl:types>
<xs:schema>
<xs:import schemaLocation="../Schemas/UWLR_Leerlinggegevens_v2p2.xsd" namespace="http://www.edustandaard.nl/leerresultaten/2/leerlinggegevens"/>
<xs:import schemaLocation="../Schemas/UWLR_Autorisatie_v2p2.xsd" namespace="http://www.edustandaard.nl/leerresultaten/2/autorisatie"/>
</xs:schema>
</wsdl:types>


使用SimpleWSDL11定义,我不知道如何添加其他XSD

预期输出:实际输出为:->中缺少标题部分请不要添加附加信息作为注释,而是编辑您的问题。我也不清楚您是否真的想向请求(传入)或响应(传出)添加头…我需要向请求(传入)添加头,您不能,因为客户端需要发送这些头。。。所以,如果您不从soapui或您正在使用的任何客户端发送它们,您就不能(也不应该)自动添加它们。
<wsdl:types>
<xs:schema>
<xs:import schemaLocation="../Schemas/UWLR_Leerlinggegevens_v2p2.xsd" namespace="http://www.edustandaard.nl/leerresultaten/2/leerlinggegevens"/>
<xs:import schemaLocation="../Schemas/UWLR_Autorisatie_v2p2.xsd" namespace="http://www.edustandaard.nl/leerresultaten/2/autorisatie"/>
</xs:schema>
</wsdl:types>