tian-zhihui / cordysfilecon

Automatically exported from code.google.com/p/cordysfilecon
Apache License 2.0
0 stars 0 forks source link

Error when triggering a webservice #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I configured the file connector with correct XML Configuration
2. The file gets polled off the directory
3. I get an error

What is the expected output? What do you see instead?
I expect the webservice to be called but i get an error:
<?xml version='1.0' 
encoding='UTF-8'?><error-info><error-time>2011-09-28T14:46:24.950</error-time><c
urrent-file>/opt/sw/cordys/BOP/development/coe/fileconnector/poller/error/INCOMI
NG_AZR_FILES-00505699007011e0fd39fb43f117d71f/AW317_v30_OK.txt</current-file><or
iginal-file><path>/opt/sw/data/azr/incoming/AW317_v30_OK.txt</path><last-modifie
d>2011-09-28T14:46:06.000</last-modified></original-file><trace><![CDATA[com.cor
dys.coe.ac.fileconnector.extensions.directorypoller.states.FileStateException: 
Error triggering the webservice for 
/opt/sw/cordys/BOP/development/coe/fileconnector/poller/processing/INCOMING_AZR_
FILES-00505699007011e0fd39fb43f117d71f/AW317_v30_OK.txt
    at com.cordys.coe.ac.fileconnector.extensions.directorypoller.states.StateTrigger.sendTriggerRequest(StateTrigger.java:397)
    at com.cordys.coe.ac.fileconnector.extensions.directorypoller.states.StateTrigger.execute(StateTrigger.java:131)
    at com.cordys.coe.ac.fileconnector.extensions.directorypoller.FileProcessWorker.run(FileProcessWorker.java:95)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.cordys.coe.util.soap.SOAPException: [faultcode='Client', 
faultactor='', faultstring='Access is denied for the method 
'com.eibus.security.identity.CordysUserIdentityType@1d8adb0'.', 
detail='<cordys:FaultDetails 
xmlns:cordys="http://schemas.cordys.com/General/1.0/"><cordys:LocalizableMessage
 xmlns:cordys="http://schemas.cordys.com/General/1.0/"><cordys:MessageCode 
xmlns:cordys="http://schemas.cordys.com/General/1.0/">Cordys.ESBServer.Messages.
accessDeniedOnMethod</cordys:MessageCode><cordys:Insertion 
xmlns:cordys="http://schemas.cordys.com/General/1.0/">com.eibus.security.identit
y.CordysUserIdentityType@1d8adb0</cordys:Insertion></cordys:LocalizableMessage><
/cordys:FaultDetails><cordys:FaultRelatedException 
xmlns:cordys="http://schemas.cordys.com/General/1.0/"><![CDATA[LDAPException: 
java.lang.NullPointerException (80) Other
LDAPException: Server Message: java.lang.NullPointerException
java.lang.NullPointerException
    at com.eibus.directory.soap.LDAPSearchCache.getLDAPResults(LDAPSearchCache.java:386)
    at com.eibus.directory.soap.Cache.search(Cache.java:339)
    at com.eibus.directory.soap.Cache.search(Cache.java:309)
    at com.eibus.directory.soap.Cache.read(Cache.java:403)
    at com.eibus.directory.soap.Proxy.read(Proxy.java:425)
    at com.eibus.directory.soap.LDAPDirectory.read(LDAPDirectory.java:858)
    at com.eibus.soap.SOAPTransaction.isUserDisabled(SOAPTransaction.java:2351)
    at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:461)
    at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:175)
    at com.eibus.soap.Processor.onReceive(Processor.java:956)
    at com.eibus.soap.Processor.onReceive(Processor.java:929)
    at com.eibus.connector.nom.Connector.onReceive(Connector.java:417)
    at com.eibus.transport.Middleware$NonTransactionalWorkerThreadBody.run(Middleware.java:1722)
    at com.eibus.util.threadpool.WorkerThread.run(WorkerThread.java:64)
Caused by: java.lang.NullPointerException
    at com.eibus.directory.soap.LDAPCacheKey.hashCode(LDAPCacheKey.java:131)
    at java.util.Hashtable.get(Hashtable.java:334)
    at com.eibus.util.cache.Cache.getReadLock(Cache.java:177)
    at com.eibus.util.cache.Cache.get(Cache.java:244)
    at com.eibus.directory.soap.LDAPSearchCache.getLDAPResults(LDAPSearchCache.java:365)
    ... 13 more
]]]]><![CDATA[></cordys:FaultRelatedException>']
    at com.cordys.coe.ac.fileconnector.FileConnector$NomConnector.sendAndWait(FileConnector.java:649)
    at com.cordys.coe.ac.fileconnector.extensions.directorypoller.states.StateTrigger.sendTriggerRequest(StateTrigger.java:366)
    ... 5 more
]]></trace><file-states><state type="IN_PROCESSING" 
started="2011-09-28T14:46:24.833" 
finished="2011-09-28T14:46:24.833"><file-id>INCOMING_AZR_FILES-00505699007011e0f
d39fb43f117d71f</file-id><original-file>/opt/sw/data/azr/incoming/AW317_v30_OK.t
xt</original-file><processing-file>/opt/sw/cordys/BOP/development/coe/fileconnec
tor/poller/processing/INCOMING_AZR_FILES-00505699007011e0fd39fb43f117d71f/AW317_
v30_OK.txt</processing-file><original-size>4366</original-size><original-lastmod
ified>2011-09-28T14:46:06.000</original-lastmodified></state><state 
type="TRIGGER" started="2011-09-28T14:46:24.846" finished="" 
/></file-states></error-info>

What version of the product are you using? On what operating system?

Please provide any additional information below.
The XML Store configuration:
<configuration 
xmlns:FCDP="http://schemas.cordys.com/coe/FileConnector/Poller/1.0">
  <folder>
    <name>Incoming AZR files</name>
    <location>/opt/sw/data/azr/incoming</location>
    <filter>*.*</filter>
    <track-time>10</track-time>
    <trigger>
      <method>SendMessage</method>
      <namespace>http://www.zorgregistratie.nl/azr/schema/AZRMessagingService/v1</namespace>
      <organization>o=system,cn=cordys,cn=development,o=gen.cms.local</organization>
      <user>cn=SYSTEM,cn=authenticated users,cn=cordys,cn=development,o=gen.cms.local</user>
      <move-file>false</move-file>
      <parameters>
        <Metadata xmlns="http://www.zorgregistratie.nl/azr/CDM/Metadata/v1">
          <MessageID />
          <MessageName />
          <MessageType>AW317</MessageType>
          <MessageVersion>3.0</MessageVersion>
          <ConversationID />
          <RefMessageID />
          <MessageDescription />
          <Sender />
          <Receiver />
          <SentDate />
        </Metadata>
        <Data>
          <Message />
        </Data>
      </parameters>
    </trigger>
  </folder>
</configuration>

Original issue reported on code.google.com by rvdkimme...@gmail.com on 28 Sep 2011 at 12:49

GoogleCodeExporter commented 8 years ago
The BPM container in which the method is executed is configured using 
CARSAuthentication. 
When I log the request that is done by the file poller it is:

<SOAP:Envelope
    xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
        <header
            xmlns="http://schemas.cordys.com/General/1.0/">
            <receiver>
                <component
                    xmlns="http://schemas.cordys.com/General/1.0/">cn=BPM - AZR Messaging,cn=soap nodes,o=system,cn=cordys,cn=development,o=gen.cms.local</component>
            </receiver>
            <sender>
                <component
                    xmlns="http://schemas.cordys.com/General/1.0/">com.cordys.coe.ac.fileconnector.FileConnector Connector</component>
                <reply-to
                    xmlns="http://schemas.cordys.com/General/1.0/">socket://cvzlact003.gen.cms.local:15067/</reply-to>
                <user
                    xmlns="http://schemas.cordys.com/General/1.0/">cn=rvdkimmenade,cn=authenticated users,cn=cordys,cn=development,o=gen.cms.local</user>
            </sender>
        </header>
        <i18n:international
            xmlns:i18n="http://www.w3.org/2005/09/ws-i18n">
            <locale
                xmlns="http://www.w3.org/2005/09/ws-i18n">en-US</locale>
        </i18n:international>
    </SOAP:Header>
    <SOAP:Body
        xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <SendMessage
            xmlns="http://www.zorgregistratie.nl/azr/schema/AZRMessagingService/v1">
            <Metadata
                xmlns="http://www.zorgregistratie.nl/azr/CDM/Metadata/v1">
                <MessageID/>
                <MessageName/>
                <MessageType>AW317</MessageType>
                <MessageVersion>3.0</MessageVersion>
                <ConversationID/>
                <RefMessageID/>
                <MessageDescription/>
                <Sender/>
                <Receiver/>
                <SentDate/>
            </Metadata>
            <Data>
                <Message/>
            </Data>
        </SendMessage>
    </SOAP:Body>
</SOAP:Envelope>

When I execute this within soapUI i get the result:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Header>
      <header xmlns="http://schemas.cordys.com/General/1.0/">
         <sender>
            <reply-to>cn=Business Process Management - AZR Messaging,cn=BPM - AZR Messaging,cn=soap nodes,o=system,cn=cordys,cn=development,o=gen.cms.local</reply-to>
            <organizationalContext/>
            <component>cn=BPM - AZR Messaging,cn=soap nodes,o=system,cn=cordys,cn=development,o=gen.cms.local</component>
         </sender>
         <receiver>
            <component>cn=webgateway,cn=cordys,cn=development,o=gen.cms.local</component>
            <sent-to>socket://host:15553/</sent-to>
         </receiver>
         <msg-id>00505699-0070-11e0-fd3b-33e83f539704</msg-id>
         <license>License has expired since 10 day(s)</license>
      </header>
   </SOAP:Header>
   <SOAP:Body>
      <SOAP:Fault>
         <faultcode xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">ns0:Client</faultcode>
         <faultstring xml:lang="en-US">Anonymous access is denied for the method 'SendMessage'.</faultstring>
         <faultactor>http://www.zorgregistratie.nl/azr/AZRMessagingService/v1</faultactor>
         <detail>
            <cordys:FaultDetails xmlns:cordys="http://schemas.cordys.com/General/1.0/">
               <cordys:LocalizableMessage>
                  <cordys:MessageCode>Cordys.ESBServer.Messages.anonymousAccessDenied</cordys:MessageCode>
                  <cordys:Insertion>SendMessage</cordys:Insertion>
               </cordys:LocalizableMessage>
            </cordys:FaultDetails>
         </detail>
      </SOAP:Fault>
   </SOAP:Body>
</SOAP:Envelope>

In this case no WS-Security header is added, so I think this is the problem.

Original comment by rvdkimme...@gmail.com on 28 Sep 2011 at 1:59

GoogleCodeExporter commented 8 years ago
The problem is solved by using the COBOC for executing the BPM directly.

Original comment by rvdkimme...@gmail.com on 29 Sep 2011 at 8:13

GoogleCodeExporter commented 8 years ago
The Poller configuration was not correct. After making changes to poller 
configuration with 
http://code.google.com/p/cordysfilecon/source/browse/tags/1.2.20/docs/external/s
amples/poller-config.xml as reference, the problem is solved. 

Original comment by srkrish...@cordys.com on 29 Sep 2011 at 8:58

GoogleCodeExporter commented 8 years ago
Hi,

I have a similar problem, how do I pass the file path from the poller to my BPM 
as input.

<configuration 
xmlns:FCDP="http://schemas.cordys.com/coe/FileConnector/Poller/1.0">
     <folder>
        <name>BPM</name>
        <location>C:/BPM</location>
        <filter>*.txt</filter>
        <track-time>10</track-time>
                <trigger>
             <method>RequestProcess</method>
             <namespace>http://schemas.cordys.com/1.0/coboc</namespace>
             <organization>o=interop,cn=cordys,cn=defaultInst,o=DEV1.sandbox.local</organization>
                               <user>cn=SYSTEM,cn=organizational users,o=interop,cn=cordys,cn=defaultInst,o=DEV1.sandbox.local</user>
                               <move-file>false</move-file>
               <parameters>
                                       <type>definition</type>
                      <receiver>org/nsfas/sbux/DirectoryPoller</receiver>
                      <message>
                                       <InputMessage FCDP:element- data="filepath"/>
                                        </message>
                     <source></source>
                               </parameters>

                </trigger>
  </folder>
</configuration>

Original comment by THULANI...@gmail.com on 2 Jul 2013 at 6:39