javax.xml.ws.WebServiceException when invoking WSDL service

核能气质少年 提交于 2019-12-11 13:51:52

问题


I was looking to use the Travelport Universal API to develop a Flight Booking System, so i have used this Travelport Developers official link as reference:

Getting Started for Travelport Developers

As the documentation referred:

Travelport Universal API offers an array of travel content for air, hotel, car, and rail, including ancillaries (optional services). It also provides functionality to build complete traveler, agency, branch, and account profiles.

For be able to send requests and receive responses, we should ask for a 30-Day Trial Credentials for Travelport Universal API, so i have asked for this and i have received my credentials, the credentials is composed about many things:

  • Universal API User ID

  • Universal API Password

  • Branch Code (TargetBranch) for ProviderName (ProviderCode)

  • A URL

    I test this credentials, and i am sure they are working using a php file from the link below:

    TravelPort Universal API - Ping Request with PHP

    I am trying to run the Travelport API in JAVA using eclipse, and i follow the steps mentioned in the below url:

    Setting up to work with Universal API

    The configurations steps that i followed are :

  • I have linked the Apache CXF with Tomcat

  • I have imported the project from GitHub using this link:

    Travelport/travelport-uapi-tutorial

  • I have edited the ENDPOINT_PREFIX in WSDLService class with the url received from the 30-Day Trial Credentials for Travelport Universal API email response

  • I generated the client classes using WSDL, and i tried to invoke the service,

    But a error appears:

    Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message.
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:150)
        at $Proxy48.service(Unknown Source)
        at com.travelport.service.system_v9_0.SystemPingPortType_SystemPingPort_Client.main(SystemPingPortType_SystemPingPort_Client.java:55)
    Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost:8080/kestrel/SystemService
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1600)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1607)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
        ... 2 more
    

    Can anyone support me with the required steps that i should do for be able to test the Travelport API, so i can send requests and receive responses from the real data of Travelport?


    回答1:


    It seems that you try to connect to localhost on port 8080, but there's no service running.



    来源:https://stackoverflow.com/questions/35961224/javax-xml-ws-webserviceexception-when-invoking-wsdl-service

  • 易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!