Adding a new row to web service resource table
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 9
- Joined: Thu Nov 28, 2013 1:53 pm
- Location: Germany
Adding a new row to web service resource table
In my application I'm trying to add a row in a table of a web service resource. Neither the "Add Row" button once the script inserts a row cause a new line. Is there any write protection, I have to disable before?
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 9
- Joined: Thu Nov 28, 2013 1:53 pm
- Location: Germany
Ok, I've found the error. It was because I had the jquery file is removed from the folder "Javascript". Now adding new lines works again.
The aim of this web service call:
<mbr:ProcessPerson versionID="6.0.0.4">
<oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType">
<oa:CreationDateTime>2008-05-22T14:32:12.375Z</oa:CreationDateTime>
<oa:BODID>64c38f00-282d-11dd-baf2-832f4835bc2c</oa:BODID>
<_wcf:BusinessContext>
<_wcf:ContextData name="storeId">10101</_wcf:ContextData>
</_wcf:BusinessContext>
</oa:ApplicationArea>
<_mbr:DataArea>
<oa:Process>
<oa:ActionCriteria>
<oa:ActionExpression actionCode="AuthenticatePassword" expressionLanguage="_wcf:XPath"/>
</oa:ActionCriteria>
</oa:Process>
<_mbr:Person>
<_mbr:Credential>
<_mbr:LogonID>wcsadmin</_mbr:LogonID>
<_mbr:Password>wcs1admin</_mbr:Password>
</_mbr:Credential>
<_mbr:PersonalProfile/>
<_mbr:ContactInfo>
<_wcf:ContactInfoIdentifier>
<_wcf:ExternalIdentifier/>
</_wcf:ContactInfoIdentifier>
<_wcf:Address/>
</_mbr:ContactInfo>
</_mbr:Person>
</_mbr:DataArea>
</_mbr:ProcessPerson>
Even though I would add a line to the table "Action Expression" and add the values ​​for actionCode and expressionLanguage as set in the example (same for the table "Person" where I set LogonId und Password), the entire block <_mbr:DataArea> will not be sent in the SOAP request. I checked the Soap output with Wireshark. I know that I have a mistake somewhere in there, but I do not understand it. It must be due to the tables. The "individual fields" like Bodid and Creation DateTime are in the request.
Conclusion: Column field values ​​are not included in the Request
The aim of this web service call:
<mbr:ProcessPerson versionID="6.0.0.4">
<oa:ApplicationArea xsi:type="_wcf:ApplicationAreaType">
<oa:CreationDateTime>2008-05-22T14:32:12.375Z</oa:CreationDateTime>
<oa:BODID>64c38f00-282d-11dd-baf2-832f4835bc2c</oa:BODID>
<_wcf:BusinessContext>
<_wcf:ContextData name="storeId">10101</_wcf:ContextData>
</_wcf:BusinessContext>
</oa:ApplicationArea>
<_mbr:DataArea>
<oa:Process>
<oa:ActionCriteria>
<oa:ActionExpression actionCode="AuthenticatePassword" expressionLanguage="_wcf:XPath"/>
</oa:ActionCriteria>
</oa:Process>
<_mbr:Person>
<_mbr:Credential>
<_mbr:LogonID>wcsadmin</_mbr:LogonID>
<_mbr:Password>wcs1admin</_mbr:Password>
</_mbr:Credential>
<_mbr:PersonalProfile/>
<_mbr:ContactInfo>
<_wcf:ContactInfoIdentifier>
<_wcf:ExternalIdentifier/>
</_wcf:ContactInfoIdentifier>
<_wcf:Address/>
</_mbr:ContactInfo>
</_mbr:Person>
</_mbr:DataArea>
</_mbr:ProcessPerson>
Even though I would add a line to the table "Action Expression" and add the values ​​for actionCode and expressionLanguage as set in the example (same for the table "Person" where I set LogonId und Password), the entire block <_mbr:DataArea> will not be sent in the SOAP request. I checked the Soap output with Wireshark. I know that I have a mistake somewhere in there, but I do not understand it. It must be due to the tables. The "individual fields" like Bodid and Creation DateTime are in the request.
Conclusion: Column field values ​​are not included in the Request
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You must issue an updatetable for any tables (as opposed to fields) that appear in the web service document you want to send e.g.
The updatetable transfers the table data (row and column data) for that one table from the form into the web service document.
Regards
Jon
Code: Select all
tables.TABLE1.updateTable();
resources.WEBSERVICE1.call();
Regards
Jon
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 9
- Joined: Thu Nov 28, 2013 1:53 pm
- Location: Germany
Thanks for the tip with the Execution Log. This is my Script for the Web Resource:
importPackage(com.ebasetech.xi.api);
importPackage(com.ebasetech.xi.services);
tables.ACTIONEXPRESSION.updateTable();
tables.PERSON.updateTable();
resources.MEMBERSERVICES.update();
resources.MEMBERSERVICES.call();
Nevertheless, the Soap request looks like this:
Payload: <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<mem:ProcessPerson xmlns:mem="http://www.ibm.com/xmlns/prod/commerce/9/member" versionID="6.0.0.4">
<ns:ApplicationArea xmlns:ns="http://www.openapplications.org/oagis/9">
<ns:CreationDateTime/>
</ns:ApplicationArea>
</mem:ProcessPerson>
</soap:Body>
</soap:Envelope>
importPackage(com.ebasetech.xi.api);
importPackage(com.ebasetech.xi.services);
tables.ACTIONEXPRESSION.updateTable();
tables.PERSON.updateTable();
resources.MEMBERSERVICES.update();
resources.MEMBERSERVICES.call();
Nevertheless, the Soap request looks like this:
Payload: <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<mem:ProcessPerson xmlns:mem="http://www.ibm.com/xmlns/prod/commerce/9/member" versionID="6.0.0.4">
<ns:ApplicationArea xmlns:ns="http://www.openapplications.org/oagis/9">
<ns:CreationDateTime/>
</ns:ApplicationArea>
</mem:ProcessPerson>
</soap:Body>
</soap:Envelope>
0 x
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi
I think that you could be missing the mappings from your resource to the form.
Could you export your form (Tools-->Migration-->Export) and and the associated parts and zip them in an email to support@ebasetech.com
Note: the export xml file will be located in the following directory:
<ebase-install-dir>/UfsServer/transport
I will take a look and see if I can resolve the problem for you.
Kind regards
Steve Upton
I think that you could be missing the mappings from your resource to the form.
Could you export your form (Tools-->Migration-->Export) and and the associated parts and zip them in an email to support@ebasetech.com
Note: the export xml file will be located in the following directory:
<ebase-install-dir>/UfsServer/transport
I will take a look and see if I can resolve the problem for you.
Kind regards
Steve Upton
0 x
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi
If you remove the default values from the table column fields and run the form again.
Click add row and type you values into the form manually.
Then click the button to call the web service. The table values are now copied into the resource and the document looks correct.
I hope this helps
Steve
If you remove the default values from the table column fields and run the form again.
Click add row and type you values into the form manually.
Then click the button to call the web service. The table values are now copied into the resource and the document looks correct.
I hope this helps
Steve
0 x
-
- Ebase User
- Posts: 9
- Joined: Thu Nov 28, 2013 1:53 pm
- Location: Germany
Thanks for the help this far. The hopefully last point I want to address is the fetchTable () procedure. I get the following snippet within the soap response:
<_wcf:UserData>
<_wcf:UserDataField name="identityTokenID">70145</_wcf:UserDataField>
<_wcf:UserDataField name="identityTokenSignature">IIJUYmrEuMO1IRNseWaKdP0/1Zg=</_wcf:UserDataField>
</_wcf:UserData>
The strings "identityTokenID" and "identity token signature" I can read from the table CREDENTIAL_USERDATA_USERDATAFIELD2 (column name57). However, I do not know where I can read the actual values. Naive as I am, I just tested the table PERSONALPROFILE_ATTRIBUTES2 because it has the column name58. This table, however, does not seem to be the right one.
My question is: where can I read the values ​​(in my snippet "70145" and "IIJUYmrEuMO1IRNseWaKdP0/1Zg =")
<_wcf:UserData>
<_wcf:UserDataField name="identityTokenID">70145</_wcf:UserDataField>
<_wcf:UserDataField name="identityTokenSignature">IIJUYmrEuMO1IRNseWaKdP0/1Zg=</_wcf:UserDataField>
</_wcf:UserData>
The strings "identityTokenID" and "identity token signature" I can read from the table CREDENTIAL_USERDATA_USERDATAFIELD2 (column name57). However, I do not know where I can read the actual values. Naive as I am, I just tested the table PERSONALPROFILE_ATTRIBUTES2 because it has the column name58. This table, however, does not seem to be the right one.
My question is: where can I read the values ​​(in my snippet "70145" and "IIJUYmrEuMO1IRNseWaKdP0/1Zg =")
0 x
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi Sebastian,
You will need to fetchTable() on the Person table before you fetchTable() on the UserData.
This is a fairly complicated scenario. It might be best to work though the example to fully understand nest tables, or there might be enough information for you to understand here:
http://dev-docs.verj.io/ufs/doc/xmlreso ... torial_1_-
This example will show you how to work with nested tables.
Kind regards
Steve
You will need to fetchTable() on the Person table before you fetchTable() on the UserData.
This is a fairly complicated scenario. It might be best to work though the example to fully understand nest tables, or there might be enough information for you to understand here:
http://dev-docs.verj.io/ufs/doc/xmlreso ... torial_1_-
This example will show you how to work with nested tables.
Kind regards
Steve
0 x
Who is online
Users browsing this forum: No registered users and 5 guests