Hi devs,

I configured outbound provisioning for Salesforce and invoked the SCIM API
as in the documentation[1].

Here is the curl command that I invoked.

curl -v -k --header "Content-Type:application/json" --user ad...@wso2.com:admin
--data '{"schemas":["urn:scim:schemas:core:1.0"],"userName":"q...@wso2.com
","password":"test25","name":{"familyName":"Menaka12"},"emails":["
q...@wso2.com"],"entitlements":[{"value":"00e7F000002DkfY","display":"ChatterFreeUser"}]}'
https://localhost:9443/wso2/scim/Users

But it gives me an exception. (See the attached file).

I also tried the scim2 api as well.

curl -v -k --header "Content-Type:application/json" --user ad...@wso2.com:admin
--data '{"schemas":["urn:scim:schemas:core:1.0"],"userName":"q...@wso2.com
","password":"test25","name":{"familyName":"Menaka12"},"emails":["
q...@wso2.com"],"entitlements":[{"value":"00e7F000002DkfY","display":"ChatterFreeUser"}]}'
https://localhost:9443/scim2/Users

But this also gives an error.

{"schemas":"urn:ietf:params:scim:api:messages:2.0:Error","scimType":"invalidSyntax","detail":"Unknown
JSON representation for the MultiValued attribute emails which has data
type as COMPLEX","status":"400"}%

There is no mentioning about the SCIM2 API in the documentation.

Highly appreciate any solution for this.

[1]
https://docs.wso2.com/display/IS540/Outbound+Provisioning+with+Salesforce


Thanks and Regards,
Menaka
-- 
*Menaka Jayawardena*
*Software Engineer - WSO2 Inc*
*Tel : 071 350 5470*
*LinkedIn: https://lk.linkedin.com/in/menakajayawardena
<https://lk.linkedin.com/in/menakajayawardena>*
*Blog: https://menakamadushanka.wordpress.com/
<https://menakamadushanka.wordpress.com/>*
[2018-02-02 10:37:44,937] ERROR {org.apache.catalina.core.StandardWrapperValve} 
-  Servlet.service() for servlet [SCIMServlet] in context with path [/wso2] 
threw exception
java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: 
org/wso2/carbon/identity/provisioning/IdentityProvisioningException
    at 
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
    at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:336)
    at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at 
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)
    at 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
    at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
    at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
    at 
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
    at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)
    at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:209)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at 
org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at 
org.wso2.carbon.webapp.mgt.filter.AuthorizationHeaderFilter.doFilter(AuthorizationHeaderFilter.java:128)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at 
org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at 
org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:80)
    at 
org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
    at 
org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:60)
    at 
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
    at 
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
    at 
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
    at 
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
    at 
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
    at 
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
    at 
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
    at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
    at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.cxf.interceptor.Fault: 
org/wso2/carbon/identity/provisioning/IdentityProvisioningException
    at 
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170)
    at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:136)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
    at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
    at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
    ... 50 more
Caused by: java.lang.NoClassDefFoundError: 
org/wso2/carbon/identity/provisioning/IdentityProvisioningException
    at 
org.wso2.carbon.identity.scim.provider.impl.IdentitySCIMManager.getUserManager(IdentitySCIMManager.java:181)
    at 
org.wso2.carbon.identity.scim.provider.resources.UserResource.createUser(UserResource.java:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
    at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
    ... 55 more
Caused by: java.lang.ClassNotFoundException: 
org.wso2.carbon.identity.provisioning.IdentityProvisioningException
    at 
org.wso2.carbon.webapp.mgt.loader.CarbonWebappClassLoader.loadClass(CarbonWebappClassLoader.java:153)
    at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
    ... 63 more


_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to