Hello all, I have a hard time configuring a Rest webservice that creates a

Hello all,
I have a hard time configuring a Rest webservice that creates a document in a content management system. The request is defined as follows:

POST type multipart/form-data ON xxx/documents/create

Parameters:

N°          Name                                        Type
01          parentId                                        String
02          objectName                              String
03          title                                        String
04          subject                                        String
05          authors                                        String
06          keywords                                        String
07          isFullTextIndex                              boolean
08          docDate                                        date
09          content          MTOM SOAP / REST           File

My current settings of the send http request plugin are:

Endpoint: http://......../documents/create
Header: =

{          
a!httpQueryParameter("Authorization","Basic xxxxxxxxxxxxxxxxxxx"),          
a!httpQueryParameter("Content-Type","multipart/form-data")
}

Parameter:

={          
a!httpQueryParameter("parentId","0b02c1818026f783"),          
a!httpQueryParameter("objectName","DocumentTest"),          
a!httpQueryParameter("title","Nouveau test"),          
a!httpQueryParameter("subject","Test Intégration"),          
a!httpQueryParameter("authors","FBO"),          
a!httpQuer...

OriginalPostID-131060

OriginalPostID-131060

  Discussion posts and replies are publicly visible

Parents
  • ...yParameter("keywords","test"),          
    a!httpQueryParameter("isFullTextIndex",0),          
    a!httpQueryParameter("docDate","01/01/2014"),          
    a!httpQueryParameter("content",convertdocumenttobase64(pv!Document))
    }

    Any idea of what could be wrong? I am taking any advice.

    A workaround for me is to use their SOAP webservice but I would need to rewrite the wsdl to include the XSD. Another restriction is that they use MTOM to transfer the document and I have never used this protocol. Has anyone used MTOM before? If I understand it correctly, it is quite standard and there should not be additional custom development. If you can confirm it for me, that would be great.

    Thanks in advance.

    Best regards,

    Fabien
Reply
  • ...yParameter("keywords","test"),          
    a!httpQueryParameter("isFullTextIndex",0),          
    a!httpQueryParameter("docDate","01/01/2014"),          
    a!httpQueryParameter("content",convertdocumenttobase64(pv!Document))
    }

    Any idea of what could be wrong? I am taking any advice.

    A workaround for me is to use their SOAP webservice but I would need to rewrite the wsdl to include the XSD. Another restriction is that they use MTOM to transfer the document and I have never used this protocol. Has anyone used MTOM before? If I understand it correctly, it is quite standard and there should not be additional custom development. If you can confirm it for me, that would be great.

    Thanks in advance.

    Best regards,

    Fabien
Children
No Data