Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pastell Connecteur SAE Maarch RM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
Pastell Connecteur SAE Maarch RM
Commits
3e28fd05
Commit
3e28fd05
authored
10 months ago
by
Arnaud Pauget
Browse files
Options
Downloads
Patches
Plain Diff
fix package building before sending to Maarch RM
parent
7a190a16
Branches
fix/seda2_transferSource
Branches containing commit
No related tags found
1 merge request
!1
Changement du type d'exception levé pour éviter le blocage du workflow dans...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MaarchREST.class.php
+12
-13
12 additions, 13 deletions
MaarchREST.class.php
with
12 additions
and
13 deletions
MaarchREST.class.php
+
12
−
13
View file @
3e28fd05
...
...
@@ -55,10 +55,10 @@ class MaarchREST extends SAEConnecteur {
$curlWrapper
=
$this
->
curlWrapperFactory
->
getInstance
();
$bodyPackage
=
$this
->
createPackageSource
(
$seda_message_path
,
$attachments_path
);
$curlWrapper
->
setJsonPostData
(
$bodyPackage
);
return
$this
->
getWS
(
'/
t
ransfer/source'
,
"application/json"
,
$curlWrapper
);
return
$this
->
getWS
(
'/
medona/archiveT
ransfer/source'
,
"application/json"
,
$curlWrapper
);
}
public
function
createPackageSource
(
$seda_message_path
,
$attachments_path
)
{
...
...
@@ -82,12 +82,14 @@ class MaarchREST extends SAEConnecteur {
}
$sourcePackage
=
[];
$package
=
new
stdClass
();
$package
->
connector
=
"seda2zip"
;
$package
->
params
=
[];
$package
->
params
[
'manifest'
]
=
"bordereau.xml"
;
$package
->
package
=
base64_encode
(
file_get_contents
(
$zipFilePath
));
$sourcePackage
[]
=
$package
;
$package
=
base64_encode
(
file_get_contents
(
$zipFilePath
));
$sourcePackage
[
'package'
]
=
new
stdClass
();
$sourcePackage
[
'package'
]
->
data
=
$package
;
$sourcePackage
[
'package'
]
->
encoding
=
"base64"
;
$sourcePackage
[
'params'
]
=
[];
$sourcePackage
[
'params'
][
'manifest'
]
=
"bordereau.xml"
;
$sourcePackage
[
'connector'
]
=
"seda2zip"
;
unset
(
$zipFilePath
);
...
...
@@ -162,16 +164,12 @@ class MaarchREST extends SAEConnecteur {
// array_push($bodyPackage['attachments'], $attachment);
// }
// }
// var_dump($bodyPackage); exit;
// Chemin de base où les fichiers et dossiers sont stockés
$baseDirectory
=
$tmpFolder
.
"/tmpFiles"
;
$this
->
addFilesFromDirectory
(
$baseDirectory
,
$bodyPackage
);
// var_dump($bodyPackage); exit;
rmdir
(
$tmpFolder
.
"/tmpFiles"
);
return
$bodyPackage
;
...
...
@@ -206,7 +204,7 @@ class MaarchREST extends SAEConnecteur {
* @throws Exception
*/
public
function
getAcuseReception
(
$id_transfert
)
{
return
$this
->
getAck
(
$id_transfert
,
$this
->
originatingAgency
);
return
$this
->
getAck
(
$id_transfert
,
"test"
);
}
/**
...
...
@@ -360,6 +358,7 @@ class MaarchREST extends SAEConnecteur {
$curlWrapper
->
dontVerifySSLCACert
();
$result
=
$curlWrapper
->
get
(
$this
->
url
.
$url
);
if
(
!
$result
){
throw
new
Exception
(
$curlWrapper
->
getLastError
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment