亚洲视频二区_亚洲欧洲日本天天堂在线观看_日韩一区二区在线观看_中文字幕不卡一区

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.430618.com 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

本文介紹了在不帶復(fù)雜類(lèi)型的情況下緩存cxf SOAP WSDL的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我使用Apachecxf創(chuàng)建一個(gè)Soap Web服務(wù),當(dāng)我發(fā)布我的Web服務(wù)時(shí),我得到一個(gè)不帶復(fù)雜類(lèi)型的wsdl部分,這是我的代碼:

我的接口:

@WebService(targetNamespace = "http://v4.ws.provider.acp.com/", name = "IGetAuthorizationDetails")
public interface IGetAuthorizationDetailsWebService {

    @WebMethod(operationName = "getAuthorizationDetailsV4")
    @RequestWrapper(localName = "getAuthorization_V4", targetNamespace = "http://request.message.provider.acp.com/", className = "ws.model.request.GetAuthorizationDetailsV4")
    @ResponseWrapper(localName = "getAuthorizationDetails_V4Response", targetNamespace = "http://response.message.provider.acp.com/", className = "ws.model.response.GetAuthorizationDetails4Response")
    @WebResult(name = "GetAuthorizationDetailsV4Rs", targetNamespace = "")
    public GetAuthorizationDetailsV4Rs getAuthorizationDetails4(

            @WebParam(name = "GetAuthorizationDetailsV4Rq", targetNamespace = "")
            @Valid GetAuthorizationDetailsV4Rq request
    ) throws TechnicalException;
}

我的配置:

  @Bean
    public ISearchAuthorizationWebServicePort getISearchAuthorizationWebServicePort(){
        return new ISearchAuthorizationWebServicePort();
    }

@Bean
    public Endpoint getIGetAuthorizationDetailsEndpoint() {
        EndpointImpl endpoint = new EndpointImpl(bus,  getIGetAuthorizationDetailsWebServicePort());
        endpoint.publish("/GetAuthorizationDetailsTest/V4");

        return endpoint;
    }

我的請(qǐng)求對(duì)象:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GetAuthorizationDetailsV4Rq", namespace = "http://request.message.provider.acp.com/", propOrder = {
        "referenceNumber",
})
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
public class GetAuthorizationDetailsV4Rq extends AbstractMessageV4Rq {

    @XmlElement(name = "referenceNumber")
    @Pattern(regexp = "^[A-Za-z0-9]*$", message = "ReferenceNumber must contains only alphanumeric characters")
 private String referenceNumber ;
   

}

這是生成的wsdl:

<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ws.api.controller.ws/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns4="http://schemas.xmlsoap.org/soap/http" xmlns:ns1="http://v4.ws.provider.acp.com/" name="IGetAuthorizationDetailsWebServicePortService" targetNamespace="http://ws.api.controller.ws.pwc/">
<wsdl:import location="http://localhost:8082/home/GetAuthorizationDetails/V4?wsdl=IGetAuthorizationDetails.wsdl" namespace="http://v4.ws.provider.acp.com/"> </wsdl:import>
<wsdl:binding name="IGetAuthorizationDetailsWebServicePortServiceSoapBinding" type="ns1:IGetAuthorizationDetails">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getAuthorizationDetailsV4">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="getAuthorizationDetailsV4">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getAuthorizationDetailsV4Response">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="TechnicalException">
<soap:fault name="TechnicalException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="IGetAuthorizationDetailsWebServicePortService">
<wsdl:port binding="tns:IGetAuthorizationDetailsWebServicePortServiceSoapBinding" name="IGetAuthorizationDetailsWebServicePortPort">
<soap:address location="http://localhost:8082/home/GetAuthorizationDetails/V4"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

為什么在我生成的wsdl中找不到我的請(qǐng)求屬性,如&referenceNumber&qot;

wsdl

檢查導(dǎo)入的推薦答案,查看是否在其中定義了請(qǐng)求對(duì)象。查看您的wsdl中的這一行:

<wsdl:import location="http://localhost:8082/home/GetAuthorizationDetails/V4?wsdl=IGetAuthorizationDetails.wsdl" namespace="http://v4.ws.provider.acp.com/"> </wsdl:import>

如果在瀏覽器中打開(kāi)http://localhost:8082/home/GetAuthorizationDetails/V4?wsdl=IGetAuthorizationDetails.wsdl,它包含什么內(nèi)容?您的類(lèi)型和參考編號(hào)在里面嗎?

最后,在定義Web服務(wù)及其所有組件元素時(shí),我將嘗試只使用一個(gè)XML名稱(chēng)空間。在我看來(lái),現(xiàn)在您有兩個(gè)名稱(chēng)空間:

http://request.message.provider.acp.com/
http://v4.ws.provider.acp.com/

.而CXF正在分兩個(gè)部分創(chuàng)建wsdl。使用一個(gè)命名空間應(yīng)該會(huì)給您提供一個(gè)沒(méi)有導(dǎo)入的完整的wsdl,并且只有一個(gè)URL可用。另請(qǐng)參閱:CXF autogenerates WSDL imports itself?

這篇關(guān)于在不帶復(fù)雜類(lèi)型的情況下緩存cxf SOAP WSDL的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,

分享到:
標(biāo)簽:cxf SOAP wsdl 不帶 情況下 類(lèi)型 緩存
用戶無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定