Using AddAttachment from SP Lists Web Service in InfoPath

J

Javier

Hi, I need to add an attachment to the list I use to submit a web-based
Infopath form. I'm writing custom code in the FormEvents_Submit method to
call the DataConnection associated to the Web Service (_vti_bin/Lists.asmx --
AddAttachment)

When I call the Execute method, I get the following error:

-----
InfoPath cannot submit the form.
An error occurred while the form was being submitted.

The SOAP response indicates that an error occurred on the server:

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was
thrown.
<detail><errorstring
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Input string was not in
a correct format.</errorstring></detail>
-----

I think this is related to the attachment field (tns:attachment -
base64Binary) that is not being passed correctly to the web service. Any
ideas on how to solve this problem?

Thanks a lot!

Javier.
 
J

Joe Corrao

Hey javier,

Did you figure this one out?
I am just hitting this same type of issue, except I get the HRESULT:0x81020073 complaining about invalid characters in a filename or folder. I validated that this is not the case so I'm curious why the web service would throw this exception.



Javier wrote:

Using AddAttachment from SP Lists Web Service in InfoPath
30-Nov-09

Hi, I need to add an attachment to the list I use to submit a web-base
Infopath form. I am writing custom code in the FormEvents_Submit method t
call the DataConnection associated to the Web Service (_vti_bin/Lists.asmx -
AddAttachment

When I call the Execute method, I get the following error

----
InfoPath cannot submit the form
An error occurred while the form was being submitted
?????
The SOAP response indicates that an error occurred on the server

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' wa
thrown
<detail><errorstrin
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Input string was not i
a correct format.</errorstring></detail
----

I think this is related to the attachment field (tns:attachment
base64Binary) that is not being passed correctly to the web service. An
ideas on how to solve this problem

Thanks a lot

Javier.

Previous Posts In This Thread:

Using AddAttachment from SP Lists Web Service in InfoPath
Hi, I need to add an attachment to the list I use to submit a web-base
Infopath form. I am writing custom code in the FormEvents_Submit method t
call the DataConnection associated to the Web Service (_vti_bin/Lists.asmx -
AddAttachment

When I call the Execute method, I get the following error

----
InfoPath cannot submit the form
An error occurred while the form was being submitted
?????
The SOAP response indicates that an error occurred on the server

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' wa
thrown
<detail><errorstrin
xmlns="http://schemas.microsoft.com/sharepoint/soap/">Input string was not i
a correct format.</errorstring></detail
----

I think this is related to the attachment field (tns:attachment
base64Binary) that is not being passed correctly to the web service. An
ideas on how to solve this problem

Thanks a lot

Javier.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Make Your Apps Talk to Each Other: Asynchronous Named Pipes Library
http://www.eggheadcafe.com/tutorial...0-5acdaeb00162/make-your-apps-talk-to-ea.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top