WebService URL not known at runtime

J

jb

I wish to supply InfoPath forms with our product. Our product creates a web
service on customers' servers, to be consumed by InfoPath.

I know the name of the service(s) I wish to use, but not the URL, e.g. it
could be:
http://<their-server>/<their-chosen-virtual-dir>/myservice.asmx

Assuming I get this info from somewhere, how can I change the InfoPath web
service information at runtime to connect to this? Or do my customers *have
to* edit the forms in IP and change these themselves?
 
J

jb

Thanks for this.

I had already noticed this as the only possible way. (But I like your way
of parsing & changing it as XML --- I was going to do straight string
manipulation.)

However, it seems to me the explanation in the post is not quite right.
There are *2* items that hold the web service URL: serviceUrl & wsdlUrl. I
don't see how changing the operation's serviceURL will affect the
webServiceAdapter's wsdlUrl? Not that I quite understand, but maybe it
doesn't matter if I leave the wsdlUrl as is, perhaps that's only used at
design time?
 
M

Matthew Blain \(Serriform\)

I believe you're right that the WSDL URL is only used at design time.
The assumption here is that the web services are identical except for the
end points, so the WSDL is basically correct. If they're not, you'll have to
call the web service yourself using code (XMLHTTP or something with the .NET
codebehind). I've done this before SP1 came out, but it's a bit more
involved.

--Matthew Blain
http://tips.serriform.com/
http://www.microsoft.com/mspress/books/7128.asp
 

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