xWeb Namespace

The namespace of xWeb is http://www.avectra.com/2005.

Since this namespace is in the form of a URL, a common confusion and mistake is that this is the URL of the xWeb web service. http://www.avectra.com/2005 is not the URL of the web service. It is not the location of the schema.

The URL of xWeb endpoint is in the following form:

https://netforumsite/xweb/secure/netForumXML.asmx

where netformsite is the actual host name of the NetForum application, for example, www.abcde.org.

Formatting Requests with Namespace

Many of the complex xWeb Objects such as Shopping Cart Object, Registrant Object require setting the namespace correctly when these Objects are passed as parameters to web methods.

When you send a request, you have two options.

You can set a default namespace in the parameter you pass, as shown on lines 9 and 24. This option is preferable because it's shorter and easier to read by a human for troubleshooting/diagnostics.

  1. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
  2. <soapenv:Header>
  3. <ns:AuthorizationToken>
  4. <ns:Token>?</ns:Token>
  5. </ns:AuthorizationToken>
  6. </soapenv:Header>
  7. <soapenv:Body>
  8. <ns:WEBCentralizedShoppingCartGetEventFees>
  9. <oRegistration xmlns="http://www.avectra.com/2005/">
  10. <CurrentKey>?</CurrentKey>
  11. <Registrant>
  12. <reg_prod_qty>?</reg_prod_qty>
  13. <reg_key>?</reg_key>
  14. <reg_cst_key>?</reg_cst_key>
  15. <!-- additional elements omitted for brevity -->
  16. </Registrant>
  17. <Individual>
  18. <ind_cst_key>?</ind_cst_key>
  19. <ind_prf_code>?</ind_prf_code>
  20. <ind_first_name>?</ind_first_name>
  21. </Individual>
  22. <!-- additional Data Object nodes omitted for brevity -->
  23. </oRegistration>
  24. <oCOE xmlns="http://www.avectra.com/2005/">
  25. <CurrentKey>?</CurrentKey>
  26. <Invoice>
  27. <inv_key>?</inv_key>
  28. <inv_proforma>?</inv_proforma>
  29. <inv_code>?</inv_code>
  30. <!-- additional elements omitted for brevity -->
  31. </Invoice>
  32. <!-- additional Data Object nodes omitted for brevity -->
  33. </oCOE>
  34. </ns:WEBCentralizedShoppingCartGetEventFees>
  35. </soapenv:Body>
  36. </soapenv:Envelope>

Alternately, you can provide a namespace for every element, for example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>?</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBCentralizedShoppingCartGetEventFees>
<ns:oRegistration>
<ns:CurrentKey>?</ns:CurrentKey>
<ns:Registrant>
<ns:reg_prod_qty>?</ns:reg_prod_qty>
<ns:reg_key>?</ns:reg_key>
<ns:reg_cst_key>?</ns:reg_cst_key>
<!-- additional elements omitted for brevity -->
</ns:Registrant>
<ns:Individual>
<ns:ind_cst_key>?</ns:ind_cst_key>
<ns:ind_prf_code>?</ns:ind_prf_code>
<ns:ind_first_name>?</ns:ind_first_name>
</ns:Individual>
<!-- additional Data Object nodes omitted for brevity -->
</ns:oRegistration>
<ns:oCOE>
<ns:CurrentKey>?</ns:CurrentKey>
<ns:Invoice>
<ns:inv_key>?</ns:inv_key>
<ns:inv_proforma>?</ns:inv_proforma>
<ns:inv_code>?</ns:inv_code>
<!-- additional elements omitted for brevity -->
</ns:Invoice>
<!-- additional Data Object nodes omitted for brevity -->
</ns:oCOE>
</ns:WEBCentralizedShoppingCartGetEventFees>
</soapenv:Body>
</soapenv:Envelope>

Either of these requests will work. The major difference between the two is that in the first request, we default the namespace in the parameter, and we omit the namespace for the elements within each parameter. This line will default the namespace for all elements within the parameter:

<oRegistration  xmlns="http://www.avectra.com/2005/">

You must do this for each parameter.

Namespaces in xWeb Responses

When most xWeb web methods return a response, the response provides a default namespace, as shown here in the <AuthorizationToken> node on line 4 and the <WEBCentralizedShoppingCartGetEventFeesResponse> node on line 9.

  1. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3. <soap:Header>
  4. <AuthorizationToken xmlns="http://www.avectra.com/2005/">
  5. <Token>d5aa344e-5688-4490-a8b8-d1e85066f04d</Token>
  6. </AuthorizationToken>
  7. </soap:Header>
  8. <soap:Body>
  9. <WEBCentralizedShoppingCartGetEventFeesResponse xmlns="http://www.avectra.com/2005/">
  10. <WEBCentralizedShoppingCartGetEventFeesResult>
  11. <Results recordReturn="2">
  12. <Result>
  13. <prd_key>d07e434d-4544-4a8d-9a90-fc97b58dc1ee</prd_key>
  14. <Product>Event Fund</Product>
  15. <prd_short_description/>
  16. <prc_key>1d976e24-5661-4aa8-84d6-50915f43ebd2</prc_key>
  17. <prc_display_name>Event Fund</prc_display_name>
  18. <ptp_key>1a8be41b-7e30-4d45-b3ab-c290ae1e73a6</ptp_key>
  19. <ptp_online_code>Fundraising Activities</ptp_online_code>
  20. <pat_prc_key/>
  21. <Price>200</Price>
  22. <prc_available>0</prc_available>
  23. <prc_membertypeapplies>1</prc_membertypeapplies>
  24. <prc_status/>
  25. <Category/>
  26. <cur_key/>
  27. <prc_qty_min/>
  28. <prc_qty_max/>
  29. </Result>
  30. <Result>
  31. <prd_key>d07e434d-4544-4a8d-9a90-fc97b58dc1ee</prd_key>
  32. <Product>Gold Table</Product>
  33. <prd_short_description/>
  34. <prc_key>173938d9-0521-44e2-9358-e1f37dd69131</prc_key>
  35. <prc_display_name>Gold Table</prc_display_name>
  36. <ptp_key>1a8be41b-7e30-4d45-b3ab-c290ae1e73a6</ptp_key>
  37. <ptp_online_code>Fundraising Activities</ptp_online_code>
  38. <pat_prc_key/>
  39. <Price>500</Price>
  40. <prc_available>0</prc_available>
  41. <prc_membertypeapplies>1</prc_membertypeapplies>
  42. <prc_status/>
  43. <Category/>
  44. <cur_key/>
  45. <prc_qty_min/>
  46. <prc_qty_max/>
  47. </Result>
  48. </Results>
  49. </WEBCentralizedShoppingCartGetEventFeesResult>
  50. </WEBCentralizedShoppingCartGetEventFeesResponse>
  51. </soap:Body>
  52. </soap:Envelope>