Hi
Quite simply, I'm struggling to populate my form's text fields with the response from my server's web service. I believe I need to know what id names or XML paths to set against each text field so it knows that upon a data response, to populate the fields. I have searched the forum, but I have not been able to find anything similar. I can provide the SOAP envelop and payload etc. plus the response if that would help? If there is some specific documentation about, I'd be happy to read it. Thoughts? Thanks Adam |
Administrator
|
Adam,
Yes, you need to know the exact format of the response XML of the SOAP request, and then to write XPath expressions against that. If you provide an example of XML we can help. -Erik On Fri, Mar 2, 2012 at 7:48 AM, cappsie <[hidden email]> wrote: > Hi > > Quite simply, I'm struggling to populate my form's text fields with the > response from my server's web service. > > I believe I need to know what id names or XML paths to set against each text > field so it knows that upon a data response, to populate the fields. > > I have searched the forum, but I have not been able to find anything > similar. I can provide the SOAP envelop and payload etc. plus the response > if that would help? > > If there is some specific documentation about, I'd be happy to read it. > > Thoughts? > > Thanks > Adam > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/SOAP-Response-and-Web-Services-tp4438816p4438816.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Certainly - I will email you directly as I'd rather the XML was not within the public domain.
Thanks Adam |
Administrator
|
Adam,
The payloads would help too. Regards, -Erik On Tue, Mar 6, 2012 at 12:47 AM, cappsie <[hidden email]> wrote: > Certainly - I will email you directly as I'd rather the XML was not within > the public domain. > > Thanks > Adam > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/SOAP-Response-and-Web-Services-tp4438816p4449096.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik, Was that payload sufficient? I was only for the first response. If you can provide details for the first, I can probably work the rest out.
Adam From: Erik Bruchez [via Orbeon Forms (ops-users)] [mailto:[hidden email]] Adam, > Certainly - I will email you directly as I'd rather the XML was not within > the public domain. > > Thanks > Adam > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/SOAP-Response-and-Web-Services-tp4438816p4449096.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws If you reply to this email, your message will be added to the discussion below: To unsubscribe from SOAP Response and Web Services, click here. |
Administrator
|
Adam,
Sorry about the delay, I haven't yet had time to look at this. I will try on Tuesday. -Erik On Wed, Mar 7, 2012 at 2:57 PM, cappsie <[hidden email]> wrote: > Hi Erik, > > > > Was that payload sufficient? I was only for the first response. If you can > provide details for the first, I can probably work the rest out. > > > Thanks > > Adam > > > > From: Erik Bruchez [via Orbeon Forms (ops-users)] [mailto:[hidden email]] > Sent: 06 March 2012 17:57 > To: cappsie > Subject: Re: Re: SOAP Response and Web Services > > > > Adam, > > The payloads would help too. > > Regards, > > -Erik > > On Tue, Mar 6, 2012 at 12:47 AM, cappsie <[hidden email]> wrote: > > >> Certainly - I will email you directly as I'd rather the XML was not within >> the public domain. >> >> Thanks >> Adam >> >> -- >> View this message in context: click here. > NAML > > > ________________________________ > View this message in context: RE: Re: SOAP Response and Web Services > > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by cappsie
Adam,
I just had some time today to look at the files you sent. When you call the service, you must first set a template for your SOAP request. So you place the request document such as: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> ... </s:Envelope> in the Request Body box of the HTTP Service Editor Then, in the Action Editor, you will need to use Set Service Request Values. There, choose the control that is the source of the value. Then, set the XPath expression to point to the part of the SOAP request you need to address. Of course, this is the sticky point! But it's not that hard. Find in the request the element you want to set a value to, say "a:Surname". Then, you have a choice as to how you target that element. If the element name after the colon is unique in the request, you can just write: //*:Surname Otherwise, you need to be more precise. For example: //*:CurrentName/*:Surname If you want to be sure to address the exact element from the root, you can write: /*:a/*:b/*:c where a, b, and c are the local names of the element. The use of the wildcard "*" just means you don't care about the actual namespace of the element, which works in general if you have unique names between namespaces. The same goes for the response document. I hope this helps as a start. -Erik On Fri, Mar 2, 2012 at 7:48 AM, cappsie <[hidden email]> wrote: > Hi > > Quite simply, I'm struggling to populate my form's text fields with the > response from my server's web service. > > I believe I need to know what id names or XML paths to set against each text > field so it knows that upon a data response, to populate the fields. > > I have searched the forum, but I have not been able to find anything > similar. I can provide the SOAP envelop and payload etc. plus the response > if that would help? > > If there is some specific documentation about, I'd be happy to read it. > > Thoughts? > > Thanks > Adam > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/SOAP-Response-and-Web-Services-tp4438816p4438816.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik, I have managed to get a response using the SOAP HTTP Service Editor. That bit was easy. Unfortunately I need to pass it a variable each time and I don't know how to do that. I have the following set up for the payload and need to place the variable, pulled from a single text line, into the <ID></ID> - so it might look like: <ID>X12345667890</ID> Where the number is the variable. On another form software package, I was able to define the variable with square brackets thus: <ID>[Single_Line_Element_Name]</ID> This is the payload and envelope etc: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"></Action> </s:Header> <s:Body> <SearchByUnitNumber xmlns="http://tempuri.org/"> <ID></ID> <ShallowLoad></ShallowLoad> </SearchByUnitNumber> </s:Body> </s:Envelope> The next step is I need to ensure that the correct text elements are ready to receive the data I'm querying for, so I might have 3 single text fields called Forname, Surname and Age. I'm struggling with getting the data into those elements. Are there any log files I can query to see what's going on? I haven't been able to find anything as yet; I suspect my logging level may be too low. Let me know. Thanks :) Adam
|
Administrator
|
Adam,
On the variable thing: where does value "X12345667890" come from? In other words, how and when is the variable value set? Does it come from a form field? If not, you could create a hidden form field to hold that variable. On setting the data: the XML document associated with the service must contain placeholders for the data. But I am not 100% sure I understand this? You can always enable XForms logging to see more: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging -Erik On Thu, Mar 15, 2012 at 1:42 AM, cappsie <[hidden email]> wrote: > Hi Erik, > > I have managed to get a response using the SOAP HTTP Service Editor. That > bit was easy. Unfortunately I need to pass it a variable each time and I > don't know how to do that. I have the following set up for the payload and > need to place the variable, pulled from a single text line, into > the <ID></ID> - so it might look like: <ID>X12345667890</ID> Where the > number is the variable. On another form software package, I was able to > define the variable with square brackets > thus: <ID>[Single_Line_Element_Name]</ID> > > This is the payload and envelope etc: > > <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> > <s:Header> > <Action s:mustUnderstand="1" > xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"></Action> > </s:Header> > <s:Body> > <SearchByUnitNumber xmlns="http://tempuri.org/"> > <ID></ID> > <ShallowLoad></ShallowLoad> > </SearchByUnitNumber> > </s:Body> > </s:Envelope> > > > > The next step is I need to ensure that the correct text elements are ready > to receive the data I'm querying for, so I might have 3 single text fields > called Forname, Surname and Age. I'm struggling with getting the data into > those elements. > > Are there any log files I can query to see what's going on? I haven't been > able to find anything as yet; I suspect my logging level may be too low. > > Let me know. > Thanks :) > Adam > > > -------- Original Message -------- > Subject: Re: SOAP Response and Web Services > From: "Erik Bruchez [via Orbeon Forms (ops-users)]" > <[hidden email]> > Date: Wed, March 14, 2012 6:24 pm > To: cappsie <[hidden email]> > > Adam, > > I just had some time today to look at the files you sent. > > When you call the service, you must first set a template for your SOAP > request. So you place the request document such as: > > <s:Envelope xmlns:s="click here. > NAML > > > ________________________________ > View this message in context: RE: SOAP Response and Web Services > > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik
Yes the variable comes from a text field element, I believe a single in line element. Do you have an example of a variable can be passed to the web service, by way of using the payload? If you look at my SOAP payload you'll see the <ID></ID> tag within which the variable must sit. So it might look like this: <ID>%variable</ID> Or perhaps like this: <ID>{variable}</ID> Do you understand what I mean? :-) Thanks, Adam On 16 Mar 2012, at 23:16, Erik Bruchez <[hidden email]> wrote: > Adam, > > On the variable thing: where does value "X12345667890" come from? In > other words, how and when is the variable value set? Does it come from > a form field? > > If not, you could create a hidden form field to hold that variable. > > On setting the data: the XML document associated with the service must > contain placeholders for the data. But I am not 100% sure I understand > this? > > You can always enable XForms logging to see more: > > http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging > > -Erik > > On Thu, Mar 15, 2012 at 1:42 AM, cappsie <[hidden email]> wrote: >> Hi Erik, >> >> I have managed to get a response using the SOAP HTTP Service Editor. That >> bit was easy. Unfortunately I need to pass it a variable each time and I >> don't know how to do that. I have the following set up for the payload and >> need to place the variable, pulled from a single text line, into >> the <ID></ID> - so it might look like: <ID>X12345667890</ID> Where the >> number is the variable. On another form software package, I was able to >> define the variable with square brackets >> thus: <ID>[Single_Line_Element_Name]</ID> >> >> This is the payload and envelope etc: >> >> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> >> <s:Header> >> <Action s:mustUnderstand="1" >> xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"></Action> >> </s:Header> >> <s:Body> >> <SearchByUnitNumber xmlns="http://tempuri.org/"> >> <ID></ID> >> <ShallowLoad></ShallowLoad> >> </SearchByUnitNumber> >> </s:Body> >> </s:Envelope> >> >> >> >> The next step is I need to ensure that the correct text elements are ready >> to receive the data I'm querying for, so I might have 3 single text fields >> called Forname, Surname and Age. I'm struggling with getting the data into >> those elements. >> >> Are there any log files I can query to see what's going on? I haven't been >> able to find anything as yet; I suspect my logging level may be too low. >> >> Let me know. >> Thanks :) >> Adam >> >> >> -------- Original Message -------- >> Subject: Re: SOAP Response and Web Services >> From: "Erik Bruchez [via Orbeon Forms (ops-users)]" >> <[hidden email]> >> Date: Wed, March 14, 2012 6:24 pm >> To: cappsie <[hidden email]> >> >> Adam, >> >> I just had some time today to look at the files you sent. >> >> When you call the service, you must first set a template for your SOAP >> request. So you place the request document such as: >> >> <s:Envelope xmlns:s="click here. >> NAML >> >> >> ________________________________ >> View this message in context: RE: SOAP Response and Web Services >> >> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Adam,
I think so! So you would use "Set Service Request Values" in the Actions editor, and use as source control the text field, and as destination XPath expression, a pointer to that id, for example "//ID", or "//*:ID", assuming there is only one ID element. The idea is that at the time the service is called, the value is retrieved from the field, set into the payload, and then the request is sent. -Erik On Sat, Mar 17, 2012 at 3:17 AM, Adam Capps <[hidden email]> wrote: > Hi Erik > > Yes the variable comes from a text field element, I believe a single in line element. Do you have an example of a variable can be passed to the web service, by way of using the payload? If you look at my SOAP payload you'll see the <ID></ID> tag within which the variable must sit. So it might look like this: > <ID>%variable</ID> > Or perhaps like this: > <ID>{variable}</ID> > > Do you understand what I mean? :-) > > Thanks, > Adam > > On 16 Mar 2012, at 23:16, Erik Bruchez <[hidden email]> wrote: > >> Adam, >> >> On the variable thing: where does value "X12345667890" come from? In >> other words, how and when is the variable value set? Does it come from >> a form field? >> >> If not, you could create a hidden form field to hold that variable. >> >> On setting the data: the XML document associated with the service must >> contain placeholders for the data. But I am not 100% sure I understand >> this? >> >> You can always enable XForms logging to see more: >> >> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging >> >> -Erik >> >> On Thu, Mar 15, 2012 at 1:42 AM, cappsie <[hidden email]> wrote: >>> Hi Erik, >>> >>> I have managed to get a response using the SOAP HTTP Service Editor. That >>> bit was easy. Unfortunately I need to pass it a variable each time and I >>> don't know how to do that. I have the following set up for the payload and >>> need to place the variable, pulled from a single text line, into >>> the <ID></ID> - so it might look like: <ID>X12345667890</ID> Where the >>> number is the variable. On another form software package, I was able to >>> define the variable with square brackets >>> thus: <ID>[Single_Line_Element_Name]</ID> >>> >>> This is the payload and envelope etc: >>> >>> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> >>> <s:Header> >>> <Action s:mustUnderstand="1" >>> xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"></Action> >>> </s:Header> >>> <s:Body> >>> <SearchByUnitNumber xmlns="http://tempuri.org/"> >>> <ID></ID> >>> <ShallowLoad></ShallowLoad> >>> </SearchByUnitNumber> >>> </s:Body> >>> </s:Envelope> >>> >>> >>> >>> The next step is I need to ensure that the correct text elements are ready >>> to receive the data I'm querying for, so I might have 3 single text fields >>> called Forname, Surname and Age. I'm struggling with getting the data into >>> those elements. >>> >>> Are there any log files I can query to see what's going on? I haven't been >>> able to find anything as yet; I suspect my logging level may be too low. >>> >>> Let me know. >>> Thanks :) >>> Adam >>> >>> >>> -------- Original Message -------- >>> Subject: Re: SOAP Response and Web Services >>> From: "Erik Bruchez [via Orbeon Forms (ops-users)]" >>> <[hidden email]> >>> Date: Wed, March 14, 2012 6:24 pm >>> To: cappsie <[hidden email]> >>> >>> Adam, >>> >>> I just had some time today to look at the files you sent. >>> >>> When you call the service, you must first set a template for your SOAP >>> request. So you place the request document such as: >>> >>> <s:Envelope xmlns:s="click here. >>> NAML >>> >>> >>> ________________________________ >>> View this message in context: RE: SOAP Response and Web Services >>> >>> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. >>> >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] mailing >>> list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >>> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by cappsie
Hi Eric,
When I submit a string to the web server, I need that string to be dynamic it as it changes every single time. What I need is to have a place holder or name variable in my form so that when I type in the variable (i.e. B12345) that variable is then placed into the SOAP payload and submitted to the web service. The B12345 will change each time the form needs to be loaded. What is the variable I can use which defines that place holder? Perhaps something like this? <ID>[Dynamic Variable From Form]</ID> On the form the text box would be called "Dynamic Variable From Form" - so you can see how the form text box is then inserted into the SOAP payload and submitted to the web service dynamically. Let me know what you think? Thanks Adam |
In reply to this post by Erik Bruchez
Probably worth adding this:
2012-04-10 11:54:59,573 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"} 2012-04-10 11:54:59,573 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"} 2012-04-10 11:54:59,573 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"} 2012-04-10 11:54:59,573 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"} 2012-04-10 11:54:59,604 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-uuid"} 2012-04-10 11:54:59,604 WARN XFormsServer - xxforms:instance() - instance not found {instance id: "fr-save-locally-file-name"} |
Administrator
|
In reply to this post by cappsie
Adam,
The way to handle such variables right now is to create hidden fields. You can do this for example at the bottom of your form, for example placing the form in a section with Visibility set to false(). -Erik On Tue, Apr 10, 2012 at 3:33 AM, cappsie <[hidden email]> wrote: > Hi Eric, > > When I submit a string to the web server, I need that string to be dynamic > it as it changes every single time. > > What I need is to have a place holder or name variable in my form so that > when I type in the variable (i.e. B12345) that variable is then placed into > the SOAP payload and submitted to the web service. > > The B12345 will change each time the form needs to be loaded. > > What is the variable I can use which defines that place holder? Perhaps > something like this? <ID>[Dynamic Variable From Form]</ID> > > On the form the text box would be called "Dynamic Variable From Form" - so > you can see how the form text box is then inserted into the SOAP payload and > submitted to the web service dynamically. > > Let me know what you think? > > Thanks > Adam > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/SOAP-Response-and-Web-Services-tp4438816p4545194.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |