Urgent help and sugestions required

K

Kevin

Heres the situation...

I am trying to drag our company into the 21st century. The ideal project for
this is to create a form for our quotations that is going to be able to allow
file attachments.

It needs to save data to our MIS database.

This is a project that I need to put in place in order to proove the value
of the technology.

I can not get any money to buy Visual Studio 2003 to create web services, so
I have used the Web Developer and Visual C# 2005 Beta versions. These are
very good, and allow me to crete web services etc, BUT they use ASP.NET
version 2 and .NET Framework version 2.

The web services created are not compatable if I use a DataSet, the WSDL has
elements that InfoPath does not like.... including a "schema" tag. When I do
manage to get around this, Infopath complains about inline schemas.

I can muck about and strip out the XML and get something that InfoPath can
use, but I can not get InfoPath to see the field with the base 64 encoded
data as anything other than a string.

Is there some way I can get this to work?

Can someone send me some output from a web service that works for a file
attachemnt so I can compare it? (sample code would be great as well)

ANY help would be greatly appreciated..... it is getting to the point where
I will have to drop the project soon.
 
V

vtasparagus

When you say InfoPath inline schema, are you refering to the "my"
namespace?

Also - I checked out this issue because I thought it was interesting.
I found this http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=560
and then I found this
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=7 which led me to
this
http://radio.weblogs.com/0131777/categories/infopathTipsAndTricks/2004/04/04.html#a107.


I truely hope this helps.

One a complete side note - from a very generic standpoint, a DataSet, a
..Net XmlDocument object, etc. are complex types specific to .NET.
Since webservices can be written in other technologies like Java, it
really is not best to assume that you a DataSet with your webservice.
Using primitive types like ints, strings, chars, etc. is best.
Although most of the time, InfoPath developers do not go down that
path. But if you go down that path, you can show how "portable" this
application is when getting data that may not be on a Microsoft
platform. Big selling point from an enterprise perspective.
 
K

Kevin

All this is very helpfull, but there are some things that I just dont get...

When I try and load data from a web service, it does not seem to matter what
I try, I just can not get infopath to see the file attachment field as a base
64 binary type. It just sees it as a string.

I tried creating a separate schema file, and creating a form based on
that.... great I can include the File Attachment, but then I can not bind it
to the web service. I have tried adding the web service as a data source, but
I can not change the binding on the File Attachment field to a sceondary
source.

I am sure there is something that I am missing, I just can not see it.

How do I type an XML node as base64Binary when outputing from a web service?
When I tyr and include schema information, it is either ignored or gives me
an error regarding inline schemas. Unfortunately my XML knowledge is not
great as I am just starting on this stuff, so I dont realy understand what is
going on here.
 
V

vtasparagus

In a last ditch effort, I did some more searches and came across this
article - Working with Image Objects in InfoPath 2003 and SQL Server
2000 -
http://msdn.microsoft.com/library/d...ip2003_ta/html/odc_InfoPath_image_objects.asp

Informational - Attaching Files in InfoPath 2003 -
http://msdn.microsoft.com/library/e..._InfoPath_attaching_files.asp?frame=true&_r=1


I will be needing to do this soon on possible assignment but have not
done it yet. I am not encouraged becuase you have been running across
several issues. Keep me posted.

Anyone else have advice on how to handle this issue?
 
K

Kevin

I have been doing some more thinking about what you siad in your original
post regarding not using the .NET types, but using simple types etc.

The main problem with that is that I am using he Web Developer stuff for the
web service, and the WSDL is being created automatically. So when Infopath
requests the WSDL info, the web service is automatically generating the code
with the type "any" for the response from the web service to the request.....
hence I believe, InfoPath just reads the base64 data as a long string of
characters and automatically assigns it a "string" type instead of a
base64Binary type.

It would be good if I could change the way the WSDL is produced so that the
types are explicitly listed for the response.

I think this is what I need to do.

Any Ideas on how to do this?
 
V

vtasparagus

My comment was more geared toward returning a DataSet from a
webservice. InfoPath integrates well with DataSets and there is
something to be said for good, simple integration.

According to that article link I put in above ("Working with Image
Objects in InfoPath 2003 and SQL Server 2000"), if the schema has
base64Binary definred for the data being returned by the web service
InfoPath should be able to consume it correctly. Where you able to do
a test based on that article? To double check if InfoPath is consuming
the XSD correctly from the web service, go to the data source task pane
in InfoPath >> select the web service >> and review the nodes under the
dataFields node.
 

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