views:

297

answers:

1

I would like to retrieve and submit data that contains Rich Text to a webservice but I am having problems with the particular datatype on the webservice side.

If I have a simple string type coming from the webservice, infopath will not allow a RTF box as it is not the correct datatype (which is XHTML).

Anybody have any Ideas?

Edit: Starting bounty.

+2  A: 

You're correct that the Rich Text Box won't bind to a simple string. The XML Schema type would be wrong.

If you're able to affect the schema of the webservice you're connecting to, it could be done.

Here's some more detailed information: How to bind a Rich Text Box control to an element that is returned from a Web service in InfoPath and Visual Studio .NET 2003

This solution works if you are able to modify the web service. On the other had, if you aren't, you'll probably have to rely on writing some code in your InfoPath form that copies the data from the webservice data to an unbound Rich Text Box and back again.

By the way, I assume you've already used InfoPath's Rich Text Box and seen the nasty HTML that it produces. If you're going to use it, I wouldn't suggest trying to use that HTML in any way other than re-displaying it in InfoPath's Rich Text Box.

Mike Schenk
Thanks Mike. I am able to affect the webservice as I am also writing it also. haven't had a chance yet to try it out yet. Maybe tomorrow. So far it looks like it should work. As for the HTML that infopath returns, no i have'nt seen it. sounds like I should investigate how the users intend on using the results and steer them away from the richtextbox. if there is any reporting invloved.
Nathan Fisher