0

使用 PING Federate 8.x UnboundID SCIM 2 客户端 SDK

尝试检索结果时,我收到错误:

com.unboundid.scim2.client.ScimServiceException: MessageBodyReader not found for media type=text/plain, type=class com.unboundid.scim2.common.messages.ErrorResponse, genericType=class com.unboundid.scim2.common.messages.ErrorResponse.
    at com.unboundid.scim2.client.requests.RequestBuilder.toScimException(RequestBuilder.java:136)
    at com.unboundid.scim2.client.requests.SearchRequestBuilder.invoke(SearchRequestBuilder.java:325)
    at com.unboundid.scim2.client.requests.SearchRequestBuilder.invoke(SearchRequestBuilder.java:152)
    at com.unboundid.scim2.client.ScimService.getResourceTypes(ScimService.java:113)
    at com.willeke.scim.Scim2Test01.main(Scim2Test01.java:100)

我认为这是因为 PING Federate 返回:Content-Type: application/json 并且显然 UnboundID 期望 type=text/plain。

我们如何配置 SCIM 客户端以期望 application/json?

使用时:PING Federate 8.x UnboundID SCIM 1.1 Client SDK

线程“主”java.lang.NoSuchMethodError 中的异常:

javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V
    at org.glassfish.jersey.client.ClientRequest.accept(ClientRequest.java:326)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.accept(JerseyInvocation.java:237)
    at org.glassfish.jersey.client.JerseyInvocation$Builder.accept(JerseyInvocation.java:154)
    at org.apache.wink.client.Resource.get(Resource.java:177)
    at com.unboundid.scim.sdk.SCIMEndpoint.query(SCIMEndpoint.java:347)
    at com.unboundid.scim.sdk.SCIMEndpoint.query(SCIMEndpoint.java:271)
    at com.unboundid.scim.sdk.SCIMEndpoint.query(SCIMEndpoint.java:249)
    at com.willeke.scim.Client.main(Client.java:38)

谢谢-吉姆

4

1 回答 1

0

Doug Bulkley 于 1 月 12 日给您发送了回复,我将他的回复发布在这里:

我已附上示例 java 程序(可在https://gist.github.com/bertold/009a0f8555c11720756711e6b3a6a7a2获得)我为此编写的,它基于 GitHub 示例https://github.com/UnboundID/scim

当我执行此示例代码时,我的 CLASSPATH 中唯一的 jar 文件是下载的 SCIM 1.8.15 SDK 的 lib/ 目录中包含的所有 jar 文件。

这是我在执行程序时看到的返回:

Name{formatted='null', familyName='0', middleName='null', givenName='user', honorificPrefix='null', honorificSuffix='null’}
于 2016-12-12T19:17:06.460 回答