Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2004

Tip: Looking for answers? Try searching our database.

Help in Submitting Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jei San - 11 Aug 2004 03:16 GMT
In my submit button, first I tried invoking the
webservice directly from the button action. But I
couldn't see the return status. It would always say
successful.

I using Jscript (though I really dunno how) using the
ready script I have to invoke webservices. But it just
doesn't seem to connect to the webservice.

Here's the code for my webservice:

[WebMethod]
public string SubmitForecast( string brand, int month,
string fiscalyr)
{
 return "ok"; // previously there were more codes but
}              // at this point I just want to connect.

And here's my code for the Jscript invoking the webservice

function XDocument::OnSubmitRequest(eventObj)
{
    var submitAdapter = XDocument.DataAdapters
("SubmitForm");   // SubmitForm is the name of the data
                 //connection isn't it??
    submitAdapter.Submit();
    var submitDom =
submitAdapter.OutputLocation.ownerDocument;
    submitDom.setProperty
("SelectionNamespaces","xmlns:s0='http://tempuri.org'");
    var jNode = submitDom.selectSingleNode
("//s0:SubmitForecastResult");
   
    if (jNode != null)
    {
//    var responseMessage = submitDom.selectSingleNode
("//SubmitForecastResult").text;
    var responseMessage = jNode.text;
    var responseMsg        = jNode.xml;
    XDocument.UI.Alert(responseMessage+ ":\n\t" +
responseMsg);
    eventObj.ReturnStatus = true;
    }
    else
    {
    XDocument.UI.Alert("There was no response from
the Web Service where the form was submitted to.");
    eventObj.ReturnStatus=false;
    }
   
}

The result is, I would always get the pop-up that
"There was no response from the Web Service where the
form was submitted to."

But at this point, I am just expecting the popup "OK".
But there's none. Can anyone see where I got it wrong?

I'm just new at InfoPath and all, dunno this might prove
to be very basic.

Jei San
Matthew Blain \(Serriform\) - 11 Aug 2004 17:04 GMT
What is the type of your data connection (how did you create it)? How did
you (or did you) set the OutputLocation?
Have you looked at the XML of the OutputLocation? What does it look like?
How about GetDOM("youradapter").xml?

--Matthew Blain
http://tips.serriform.com

> In my submit button, first I tried invoking the
> webservice directly from the button action. But I
[quoted text clipped - 59 lines]
>
> Jei San
- 13 Aug 2004 07:49 GMT
The connection is a webservice. I just used the code
based on Lab8 of the Training Manual for InfoPath via
web. I know it worked before during training. But I'm
using it now in my own machine. It doesn't work anymore.

Err...How do I view the OutputLocation? The only output i
saw was that of testing the webservice through IE. upon
compilation of the webservice in VS.NET.

I'll try to display GetDom("SubmitForm").xml...is this
correct?

>-----Original Message-----
>What is the type of your data connection (how did you create it)? How did
[quoted text clipped - 34 lines]
>> submitAdapter.OutputLocation.ownerDocument;
>> submitDom.setProperty

("SelectionNamespaces","xmlns:s0='http://tempuri.org'");
>> var jNode = submitDom.selectSingleNode
>> ("//s0:SubmitForecastResult");
[quoted text clipped - 31 lines]
>
>.
Jei San - 13 Aug 2004 07:50 GMT
The connection is a webservice. I just used the code
based on Lab8 of the Training Manual for InfoPath via
web. I know it worked before during training. But I'm
using it now in my own machine. It doesn't work anymore.

Err...How do I view the OutputLocation? The only output i
saw was that of testing the webservice through IE. upon
compilation of the webservice in VS.NET.

I'll try to display GetDom("SubmitForm").xml...is this
correct?

>-----Original Message-----
>What is the type of your data connection (how did you create it)? How did
[quoted text clipped - 34 lines]
>> submitAdapter.OutputLocation.ownerDocument;
>> submitDom.setProperty

("SelectionNamespaces","xmlns:s0='http://tempuri.org'");
>> var jNode = submitDom.selectSingleNode
>> ("//s0:SubmitForecastResult");
[quoted text clipped - 31 lines]
>
>.
Matthew Blain \(Serriform\) - 15 Aug 2004 01:57 GMT
Any luck using GetDOM? Or looking at submitDom.xml?

> The connection is a webservice. I just used the code
> based on Lab8 of the Training Manual for InfoPath via
[quoted text clipped - 87 lines]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.