CMDBuild Forum

Basic Connector

Hi,

A couple of questions.

1) I'm trying to use the Basic Connector to get user data from Active Directory into cmdbuild so our user list is dynamic. I have followed the manual as best I can (more on that below). I run "bash bin/connector.sh" and the connector starts. I believe the LDAP side is working as I can see data being transferred from our AD domain controller to the cmdbuild box using WireShark.  I then get an exception in the connector log (below this post)

The line with 

ConnectException invoking http://://services/soap/Private: Connection refused

looks like a pretty big issue but I can't see where to alter it. my configuration.xml has a cmdbuild section:

        <cmdbuild>

                <ServerAddress>10.46.5.42</ServerAddress>

                <ServerContext>cmdbuild</ServerContext>

                <ServerPort>8080</ServerPort>

                <Username>inventory</Username>

                <Password>inventory</Password>

</cmdbuild>

and I think that the three missing sections in the url correspond to ServerAddress, ServerContext and ServerPort. Is that right?
 
2) I'm struggling with the english versions of the manuals as there are a few typos. I'd be happy to spend a bit of time helping clean up the english version and add a bit more detail that might make the manuals more friendly for the novice user. Is there an easy way for me to do this?
 
Kind Regards
David
 

javax.xml.ws.WebServiceException: Could not send Message.

        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)

        at com.sun.proxy.$Proxy49.getCardList(Unknown Source)

        at org.cmdbuild.externalconnector.inventory.data.GetDataFromCMDBuild.isNewCard(GetDataFromCMDBuild.java:119)

        at org.cmdbuild.externalconnector.update.LDAPConnector.connect(LDAPConnector.java:119)

        at org.cmdbuild.externalconnector.update.UpdateCMDBuild.main(UpdateCMDBuild.java:45)

Caused by: java.net.ConnectException: ConnectException invoking http://://services/soap/Private: Connection refused

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2153)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2138)

        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)

        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:730)

        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:544)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:294)

        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

        ... 4 more

 
Has somebody a solution?
 
Previously David wrote:

Hi,

A couple of questions.

1) I'm trying to use the Basic Connector to get user data from Active Directory into cmdbuild so our user list is dynamic. I have followed the manual as best I can (more on that below). I run "bash bin/connector.sh" and the connector starts. I believe the LDAP side is working as I can see data being transferred from our AD domain controller to the cmdbuild box using WireShark.  I then get an exception in the connector log (below this post)

The line with 

ConnectException invoking http://://services/soap/Private: Connection refused

looks like a pretty big issue but I can't see where to alter it. my configuration.xml has a cmdbuild section:

        <cmdbuild>

                <ServerAddress>10.46.5.42</ServerAddress>

                <ServerContext>cmdbuild</ServerContext>

                <ServerPort>8080</ServerPort>

                <Username>inventory</Username>

                <Password>inventory</Password>

</cmdbuild>

and I think that the three missing sections in the url correspond to ServerAddress, ServerContext and ServerPort. Is that right?
 
2) I'm struggling with the english versions of the manuals as there are a few typos. I'd be happy to spend a bit of time helping clean up the english version and add a bit more detail that might make the manuals more friendly for the novice user. Is there an easy way for me to do this?
 
Kind Regards
David
 

javax.xml.ws.WebServiceException: Could not send Message.

        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)

        at com.sun.proxy.$Proxy49.getCardList(Unknown Source)

        at org.cmdbuild.externalconnector.inventory.data.GetDataFromCMDBuild.isNewCard(GetDataFromCMDBuild.java:119)

        at org.cmdbuild.externalconnector.update.LDAPConnector.connect(LDAPConnector.java:119)

        at org.cmdbuild.externalconnector.update.UpdateCMDBuild.main(UpdateCMDBuild.java:45)

Caused by: java.net.ConnectException: ConnectException invoking http://://services/soap/Private: Connection refused

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2153)

        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2138)

        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)

        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:730)

        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:544)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)

        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:294)

        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

        ... 4 more

 

 

I encountered a similar problem with the active directory connector I configured. The following are my files:

 
cmdbuild-schema.xml
 
<?xml version="1.0"?> 
<CMDBUILD> 
<Employee> 
<Code /> 
<Surname /> 
<Name /> 
<Email /> 
<Mobile /> 
<Fax /> 
<Office /> 
</Employee> 
</CMDBUILD>
 
 
configuration.xml
 
<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<cmdbuild> 
<ServerAddress>127.0.0.1</ServerAddress> 
<ServerContext>cmdbuild</ServerContext> 
<ServerPort>8080</ServerPort> 
<Username>admin</Username> 
<Password>admin</Password> 
</cmdbuild> 
<serverldap> 
<ServerAddress>192.168.10.5</ServerAddress> 
<Port>389</Port> 
<User>test@testdomain.local</User> 
<Password>password</Password> 
<SSL>0</SSL> 
<DN>DC=testdomain,DC=local</DN> 
<Search>objectClass=*</Search> 
<Class>Users</Class> 
<Attributes>sAMAccountName,sn,givenName,mail,mobile,facsimileTelephoneNumber,department</Attributes> 
<Key>sAMAccountName</Key>
</serverldap> 
</configuration>
 
 
 
transform.xsl
 
<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform
version="1.0"> 
<xsl:output method="xml" version="1.0" encoding="UTF-8" 
indent="yes" /> 
<xsl:template match="/"> 
<CMDBUILD> 
<xsl:apply-templates /> 
</CMDBUILD> 
</xsl:template> 
<xsl:template match="*"> 
<xsl:apply-templates /> 
</xsl:template> 
<xsl:template match="text()"></xsl:template> 
<xsl:template match="/serverldap/Users"> 
<Employee key="Code"> 
<Code> 
<xsl:value-of select="./sAMAccountName" /> 
</Code> 
<Surname> 
<xsl:value-of select="./sn" /> 
</Surname> 
<Name> 
<xsl:value-of select="./givenName" /> 
</Name> 
<Email> 
<xsl:value-of select="./mail" /> 
</Email> 
<Mobile> 
<xsl:value-of select="./mobile" /> 
</Mobile> 
<Fax> 
<xsl:value-of select="./facsimileTelephoneNumber" /> 
</Fax> 
<Office> 
<xsl:value-of select="./department" /> 
</Office> 
</Employee> 
</xsl:template> 
<xsl:template match="/CMDBUILD/Employee"> 
<Employee key="Code"> 
<xsl:attribute name="objid"> 
        <xsl:value-of select="./@objid" /> 
      </xsl:attribute> 
<Code> 
<xsl:value-of select="./Code" /> 
</Code> 
<Surname> 
<xsl:value-of select="./Surname" /> 
</Surname> 
<Name> 
<xsl:value-of select="./Name" /> 
</Name> 
<Email> 
<xsl:value-of select="./Email" /> 
</Email> 
<Mobile> 
<xsl:value-of select="./Mobile" /> 
</Mobile> 
<Fax> 
<xsl:value-of select="./Fax" /> 
</Fax> 
<Office> 
<xsl:value-of select="./Office" /> 
</Office> 
</Employee> 
</xsl:template> 
</xsl:stylesheet>
 
 
and here's the log as a result:
 
>>> Program Started  - version (Basic Connector 1.5.0 - 30/10/2013)<<<
Searching for: C:\xampp\tomcat\webapps\CMDBuildConnectors\ADConnector\conf\configuration.xml
Parsing XML file [C:\xampp\tomcat\webapps\CMDBuildConnectors\ADConnector\conf\configuration.xml]
Ended to read configuration file 
Trasform file foundtrue
Parsing XML file [C:\xampp\tomcat\webapps\CMDBuildConnectors\ADConnector\conf\cmdbuild-schema.xml]
Interceptor for {http://soap.services.cmdbuild.org}PrivateService#{http://soap.services.cmdbuild.org}getCardList has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:544)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:294)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
at com.sun.proxy.$Proxy47.getCardList(Unknown Source)
at org.cmdbuild.externalconnector.inventory.data.GetDataFromCMDBuild.isNewCard(GetDataFromCMDBuild.java:119)
at org.cmdbuild.externalconnector.update.LDAPConnector.connect(LDAPConnector.java:119)
at org.cmdbuild.externalconnector.update.UpdateCMDBuild.main(UpdateCMDBuild.java:45)
Caused by: java.net.ConnectException: ConnectException invoking http://://services/soap/Private: Connection refused: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2153)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2138)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:730)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 10 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:2048)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:2000)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2068)
... 13 more
 
 
I followed closely the Basic Connector Reference for CMDBuild 2.1 but I am stuck with the above error.  Please help.  Thanks....
 

Hi,

the problem could be in both cases inside the XPDL definition.
Have you configured the parameters (cm_url, cm_username, cm_password) inside the xpdl to reach the correct instance of CMDBuild?
 
If still doesn't work and you still need assistance, could you attach also the cmdbuild.log?
 
Best regards.
 
-- CMDBuild Team

Previously Tecnoteca wrote:

Hi,
the problem could be in both cases inside the XPDL definition.
Have you configured the parameters (cm_url, cm_username, cm_password) inside the xpdl to reach the correct instance of CMDBuild?
 
If still doesn't work and you still need assistance, could you attach also the cmdbuild.log?
 
Best regards.
 
-- CMDBuild Team

 

Thank you for your quick response.  I just used and uploaded the XPDL definition (for shark version 4.4) that came with the basic connector 1.5.  Do I need to make modifications inside the XPDL?  I have the Together Workflow editor 4.4 and can open the file but I am not sure how to configure the parameters to reach the correct instance of CMDBuild.  Please help me here.
 
Also, I'll post the cmdbuild.log later after I'm done with the XPDL.
 
Thanks a lot.

Previously Patrick wrote:

Previously Tecnoteca wrote:
Hi,
the problem could be in both cases inside the XPDL definition.
Have you configured the parameters (cm_url, cm_username, cm_password) inside the xpdl to reach the correct instance of CMDBuild?
 
If still doesn't work and you still need assistance, could you attach also the cmdbuild.log?
 
Best regards.
 
-- CMDBuild Team

 

Thank you for your quick response.  I just used and uploaded the XPDL definition (for shark version 4.4) that came with the basic connector 1.5.  Do I need to make modifications inside the XPDL?  I have the Together Workflow editor 4.4 and can open the file but I am not sure how to configure the parameters to reach the correct instance of CMDBuild.  Please help me here.
 
Also, I'll post the cmdbuild.log later after I'm done with the XPDL.
 
Thanks a lot.
You may need to adjust your Shark,conf or cmdbuild auth.conf file as it has a default of workflow for the username and changeme for the password. I am stuck here as well but with a connection timeout issue. I also do not understand the version difference between the two XPDL files supplied with the basic connector, I am using the 2.3 version. I am happy to contribute to a more complete guide on using the connector for both LDAP and OCS.

 

Hi every one,

I've get exactly the same problem and may be the documentation is not clear at this point, so I'm going to describe the different steps that I've followed:

1 - I've installed OSC Inventory and seems to work well. (mysql)

2 - Installed postgres 9.4 and tomcat6 ona Centos 6.5

3 - Deployed : cmdbuild-2.3.0.zip ; shark-cmdbuild-2.3.0.zip ;  tecnoteca-cmdbuild-9c0781dd05b8.zip

.... Until here every thing seems to be ok. I can login but i don't really know what to do ... This process took me a while since postgres 8.x is not supported (4h).

4 - Trying to figure out what to do with basic-connector-1.5.0.zip:

      a - configuring files as it's said in the technical manual:  basic-connector/conf/cmdbuild-schema.xml; basic-connector/conf/transform.xsl; basic-connector/conf/configuration.xml. Patrick, after checking the url's of cmdbuild, this error message (the one you posted) disappeared.

      b - Running  basic-connector/bin/connector.sh en getting the following error:

>> Program Started - version (Basic Connector 1.5.0 - 30/10/2013)<<<
Searching for: /root/tmp/CMDBUILD/basic-connector-1.5.0/basic-connector/conf/configuration.xml
Parsing XML file [/root/tmp/CMDBUILD/basic-connector-1.5.0/basic-connector/conf/configuration.xml]
Ended to read configuration file
Reading the transform file.
Parsing XML file [/root/tmp/CMDBUILD/basic-connector-1.5.0/basic-connector/conf/cmdbuild-schema.xml]
Configuring endpoint for: http://127.0.0.1:8080/cmdbuild-2.3.0/services/soap/Private (username: xxxxxxxpassword: xxxxxxx)
Total objects to check: 58
Reading card nr. 1 - Code: Backups
keyNode name is: devicewith id:72
Fault occurred while processing.
Reading card nr. 2 - Code: Clust
keyNode name is: devicewith id:88
Fault occurred while processing.
......

 I have not found any error on psql , nor mysql logs

5 - Trying to Upload  XPDL definition process gived me the same error as Patrick:

Error: org.cmdbuild.workflow.xpdl.XpdlException: The process id does not match
 at org.cmdbuild.workflow.xpdl.XpdlManager.updateDefinition(XpdlManager.java:106)

 

Can any one explain me how to use OCS Inventory DB.