Web service session - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Web service session

Last post 10-29-2004 03:08 PM by Greg Collins. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 10-25-2004 08:05 AM

    • jonbrave
    • Top 200 Contributor
    • Joined on 10-15-2004
    • United Kingdom
    • Posts 59

    Web service session

    OK, I've tried this one on MS communities and gotten nowhere.

    Using a web service. WS starts a new "session" on first contact from IP. I need to reuse this session for future IP exchanges.

    Left to itself, you get a brand new session on each contact from IP. From what I have read, I think you have have to preserve a cookie, extracted from something like the SOAP message and included back into the SOAP message to achieve this. XDocument.QueryAdapter.Query() etc. I think are wrapped by IP talking the WS. I need to influence this. Where do I start? I have to say, without this IP is going to be severely restricted as any use with a web service (e.g. my user logs in initially with username+password, I don't want him to do this each time, I can't just use Windows logon).
  • 10-25-2004 02:12 PM In reply to

    So what you are asking for is a way for an InfoPath form to be able to "remember" some configuration data from the previous run?

    I'm not sure of a way to do that with InfoPath by itself. Cookies don't work as the form is always loaded in a new location.

    A Web service could certainly have some way of keeping track, per machine, of some config data and then reloading it and setting states.

    I'm not sure exactly what you are trying to do, nor do I have enough WS experience to be able to help out with it.

    Did any of these things help out at all?

    Greg Collins [InfoPath MVP]
  • 10-26-2004 08:27 AM In reply to

    • jonbrave
    • Top 200 Contributor
    • Joined on 10-15-2004
    • United Kingdom
    • Posts 59
    Sorry, no, that didn't help at all, but I am grateful that you try :)

    Forget some of the detail. Here's what I think is needed:
    XDocument.QueryAdapter is hooked to an underlying WebServiceAdapter (in my case). When I go XD.QA.Query(), you ultimately wrap this and do the SOAP exchange with the WS. So I can't seem to get at the "wrapper" layer. In that layer, the WS is passing me a cookie for me to copy and reuse in my further exchanges which will cause the session to be reused. But I can't get at it! So no session persistence/reuse. I think I need to go out a level and do the XD.QA etc. layer myself in script so that I can receive/send that paramater. But I don't know how to do that... :(

    Where are all your developers who do know about WS etc.? It's you guys who put it in, we who want to use it need a bit of help. I post on MS communities but get nowhere.
  • 10-26-2004 06:27 PM In reply to

    The WS adapter in InfoPath is meant for basic WS calls. If you want more functionality, you will need to write your own SOAP. There should be plenty of info already available on the public nrewsgroups on SOAP.

    Greg Collins [InfoPath MVP]
  • 10-27-2004 09:03 AM In reply to

    • jonbrave
    • Top 200 Contributor
    • Joined on 10-15-2004
    • United Kingdom
    • Posts 59
    ...and when I do my own SOAP calls, I'll still be able to read from queryFields and have the response populate into dataFields? 'Coz that's what the WS DA is doing for me.
  • 10-27-2004 10:31 AM In reply to

    It sounds like your main data source is based off of the Web service. If this is the case then yes, your fields will continue to be populated as before.

    Greg Collins [InfoPath MVP]
  • 10-29-2004 01:58 PM In reply to

    • jonbrave
    • Top 200 Contributor
    • Joined on 10-15-2004
    • United Kingdom
    • Posts 59
    Main data source does indeed come from web service (returning dataset).
    Doubtless soon though I'll want to use secondary sources for other info from web service.
    Are you implying that will be different? :)
  • 10-29-2004 03:08 PM In reply to

    The key to remember is that each data source has its own set of namespaces. You need to account for that when you deal with a new data source. Never assume anything about the namespaces of a new data source -- its a quick way to get into trouble.

    Greg Collins [InfoPath MVP]
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.