Highlighted
Absent Member.. kaiser_rp Absent Member..
Absent Member..
4307 views

Upload attachment with Web Services

Jump to solution

Hi.

 

We have develop a custom web in order to create Interactions in SM using SM Web Services.

 

All the process works fine, except the upload of attachments. The message error received is: 

scxmlapi(41) - The data in the 'data' field of record incidents - SD10754 -  -  -  of file SYSATTACHMENTS contains data that does not conform to the SOA datatype in datadict

 

Below I put some code lines with the parameters (url) we use to call the web service because seems to be the root problem.

 

Note: The Attachment param is the published name of data field in the SM file.

 

Thanks in advance.

 

 

Wsdl: http://enio2:13085/SM/7/SysAttachments?wsdl

 

Method: CreateAttachments

 

Params: array (

      'model' => array (

            'instance' => array (

                  'Attachment'      => base64_encode($file_content),

                  'Module'          => 'incidents',

                  'ElementId'       => 'SD10752',

                  'MimeType'        => 'image/jpeg',

                  'FileSize'        => (float)18482,

                  'FileName'        => 'imagefile.jpg',

            ),

            'keys' => array (),

      ),

      'attachmentInfo' => 1,

      'attachmentData' => 1,

      'ignoreEmptyElements' => true,

)

 

Response:

 

      [status] => FAILURE

      [message] => Data Type Mismatch Error

      [schemaRevisionDate] => 2012-08-24

      [schemaRevisionLevel] => 5

      [returnCode] => 41

      [messages] =>

            [message] =>

                  [_] => scxmlapi(41) - The data in the 'data' field of record incidents - SD10754 -  -  -  of file SYSATTACHMENTS contains data that does not conform to the SOA datatype in datadict

 

Kudos are appreciated
Regards from Barcelona >
0 Likes
1 Solution

Accepted Solutions
Absent Member.. kaiser_rp Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

solved removing the dataType in the extaccess record for SYSATTACHMENTS

Kudos are appreciated
Regards from Barcelona >
0 Likes
9 Replies
Absent Member.. kaiser_rp Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

solved removing the dataType in the extaccess record for SYSATTACHMENTS

Kudos are appreciated
Regards from Barcelona >
0 Likes
Andy_ABB Absent Member.
Absent Member.

Re: Upload attachment with Web Services

Jump to solution

Can you tell me how yo ucreated SysAttachemtns wsdl ? we have HP SM 9.30 but there is no such wsdl by defualt. If you can share solution i will really appreciate it.

 

Thanks in Advance!

0 Likes
Absent Member.. kaiser_rp Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

still we can't create attachments.

 

we create the attachment register in the DB, but the sm client don't show in the attachments tab still.

 

we use the wsdl OOB SysAttachments, using 9.30 too.

Kudos are appreciated
Regards from Barcelona >
0 Likes
Abhijit K Acclaimed Contributor.
Acclaimed Contributor.

Re: Upload attachment with Web Services

Jump to solution
0 Likes
Absent Member.. James Townson Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

http://enio2:13085/SM/7/SysAttachments?wsdl ??

 

Is this webservice  available out the box on 9.30? This is perfect for what i need but wasn't aware of it??

0 Likes
Andy_ABB Absent Member.
Absent Member.

Re: Upload attachment with Web Services

Jump to solution

for me im getting this error:

 

"SOAP-ENV:ServerInvalid Request - SOAP access not configured for SysAttachmentsServer"

0 Likes
Absent Member.. kaiser_rp Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

Finally solved using this thread:

http://www.sc-resources.net/threads/6765-Passing-attachments-via-WSDL?highlight=wsdl

 

 

My error:

Do it in two steps: createInteractionRequest and createSysattachmentRequest.

 

Solution;

Use only one step with: createInteractionRequest and use the <pws:attachments>

 

Regards ;

Kudos are appreciated
Regards from Barcelona >
0 Likes
Andy_ABB Absent Member.
Absent Member.

Re: Upload attachment with Web Services

Jump to solution

Hi

 

Which patch level you have applied for your server ?

0 Likes
Absent Member.. kaiser_rp Absent Member..
Absent Member..

Re: Upload attachment with Web Services

Jump to solution

SM 9.30.21

App patch 1

Kudos are appreciated
Regards from Barcelona >
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.