Я сгенерировал клиента для веб -сервиса, используя WSDL2Java CXF.May 22, 2013 3:44:46 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://www.service-now.com/cmdb_ci_comm ... db_ci_comm from WSDL: file:/C:/Dev/Workspaces/Eclipse/clim20130508/ServiceNowCXFClient/bin/service-now.wsdl
Invoking getRecords...
May 22, 2013 3:44:51 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://www.service-now.com/foo}ServiceN ... getRecords has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unexpected wrapper element getRecordsResponse found. Expected {http://www.service-now.com/foo}getRecordsResponse.
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:100)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
at com.sun.proxy.$Proxy29.getRecords(Unknown Source)
at com.service_now.cmdb_ci_comm.ServiceNowSoap_ServiceNowSoap_Client.main(ServiceNowSoap_ServiceNowSoap_Client.java:178)
< /code>
Очевидно, что полученный ответ отличается от ожидаемого ответа тем, что последний включает пространство имен. < /p>
getRecordsResponse found. Expected {http://www.service-now.com/foo}getRecordsResponse
< /code>
Мой клиент службы открывается следующим образом ... < /p>
@WebServiceClient(name = "ServiceNow_foo",
wsdlLocation = "service-now.wsdl",
targetNamespace = "http://www.service-now.com/foo")
public class ServiceNowFoo extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://www.service-now.com/foo", "ServiceNow_foo");
public final static QName ServiceNowSoap = new QName("http://www.service-now.com/foom", "ServiceNowSoap");
< /code>
Вы можете увидеть клиент -код в вопросе, как можно настроить CXF сгенерированного клиента для предотвращающей HTTP Auth?>
Подробнее здесь: https://stackoverflow.com/questions/167 ... ted-client
Неожиданный элемент обертки при использовании CXF -генерируемого клиента ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Сложность очистки HTML-страницы с динамически генерируемого веб-сайта с помощью Python.
Anonymous » » в форуме Python - 0 Ответы
- 15 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Сложность очистки HTML-страницы с динамически генерируемого веб-сайта с помощью Python.
Anonymous » » в форуме Python - 0 Ответы
- 9 Просмотры
-
Последнее сообщение Anonymous
-