xWeb Troubleshooting
Abila recommends SoapUI and Fiddler. These are third-party developer tools that are essential tools for development and troubleshooting in xWeb. Abila has worked with both of these tools extensively and on these pages we share some tips for how to use these tools to get your integration working faster and more successfully.
xWeb Does Not Work on Browser
xWeb uses SOAP headers to get and set authentication tokens.
An ordinary browser cannot read SOAP headers or pass a token in a soap header.
In other words: xWeb will not work in a browser.
Although the auto-generated ASMX file will have an Invoke button, leading you to believe that you will see some result, you will not get a result.
xWeb will work only when called programatically with applications that can send and receive SOAP headers.
If you are testing xWeb, try using SoapUI as described in xWeb: Install.
Could not establish trust relationship
The full error message could be something like: The underlying connection was closed: Could not establish trust relationship with remote server.
If you get this error when trying to make a call to one of the xWeb methods, it may be as simple as changing your web reference to the xWeb. If you have multiple domains (one for netFORUM and one for other parts of the site), then you could have a security conflict. The error indicates you likely tried to reference the xWeb with an https:// link, so try removing the s and reference non-secure. This is different from using the /secure xWeb folder which allows you to do token authentication with the netFORUM server.
Account Used to Work, Now it Doesn't
If the account used to work fine, and then it stopped working, check the XWeb_User_Administration#Checking_xWeb_User_Status child form for possible problems.
Value not specified in Facet
Error Message: 'Value' not specified in Facet
When the error message refers to a "Facet" is referring to XML schema facet objects that are used to create the simple type definitions. Here's an example of a bad simple type definition that caused this error:
<xs:simpleType name="decimalLength20_Type"> <xs:annotation> <xs:documentation>Avectra netForum defined simpleType.</xs:documentation> </xs:annotation> <xs:restriction base="xs:decimal"> <xs:totalDigits /> <xs:fractionDigits /> </xs:restriction> </xs:simpleType>
The above schema was produced when the system tried to define the column type numeric. If you receive this error you should check the columns with the following types
- numeric
- smallint
Here is a SQL statement to update the datatypes for columns using the above data types. The application pool will need to be recycled and the cache cleared for the new data types to be seen by xWeb and the problem resolved.
UPDATE md_columnSET mdc_data_type = case mdc_data_type when 'numeric' then 'av_decimal4' when 'smallint' then 'av_integer' endFROM md_columnWHERE mdc_data_type IN ('numeric', 'smallint')
Mismatched Declarations
Error Message: Several mismatched declarations were found: Schema item 'complexType' named 'EventsRegistrant_Individual_DataObjectType' from namespace 'http://www.avectra.com/2005/'
Many netFORUM objects that are being serialized in xWeb contain the same data objects. This means that many duplicate schemas will be created by the dynamic schema generation. This is not normally a problem because all the schemas have the exact same structure and the duplicates are simply merged together. Sometimes one or more duplicate schema's will not match exactly and the above error message will be produced. The schemas produced didn't match exactly because the column sort order (mdc_sort_order) for two or more fields in the same table were the same. In the sample message above the mismatch occurred in the schema for the Individual DataObject that is based on the co_individual and co_individual_ext tables, so there are two or more columns associated with the co_individual or co_individual_ext tables whose column sort order (mdc_sort_order) is the same.
To correct the problem, simply change the sort order of the columns to ensure each column within the table has a unique sort order number. Once the sort order values have been updated clear the system cache and refresh the application pool to ensure xWeb is using the new sort order values. Below is a SQL script that can be used to update sort orders for all columns in the database to ensure they are unique:
declare @TableList nvarchar(MAX) SET @TableList = NULL--set @TableList = 'co_individual,co_customer,co_address' --Limit column update to specific object tables IF( object_id('tempdb..#t_duplicate_sort_order') IS NOT NULL ) DROP TABLE #t_duplicate_sort_order CREATE TABLE #t_duplicate_sort_order( t_mdc_key uniqueidentifier, t_mdc_name nvarchar(128), t_mdc_mdt_name nvarchar(128), t_mdc_sort_order integer) INSERT INTO #t_duplicate_sort_order (t_mdc_key, t_mdc_name, t_mdc_mdt_name,t_mdc_sort_order)( SELECT dup.mdc_key, dup.mdc_name, dup.mdc_mdt_name, dup.mdc_sort_order FROM md_column dup WHERE (@TableList IS NULL OR dup.mdc_mdt_name IN (SELECT Item FROM av_SelectStringFromString(@TableList,',') )) AND EXISTS( SELECT mdc_key FROM md_column mdc (nolock) WHERE mdc.mdc_name != dup.mdc_name AND mdc.mdc_sort_order = dup.mdc_sort_order AND mdc.mdc_mdt_name = dup.mdc_mdt_name ) ) BEGIN TRANSACTION DECLARE order_cursor CURSOR FORSELECT t_mdc_key, t_mdc_name, t_mdc_mdt_name, t_mdc_sort_orderFROM #t_duplicate_sort_orderORDER BY t_mdc_sort_order OPEN order_cursor DECLARE @mdc_key uniqueidentifier, @mdc_name nvarchar(128), @mdt_name nvarchar(128), @sort_order integer FETCH NEXT FROM order_cursorINTO @mdc_key, @mdc_name, @mdt_name, @sort_order WHILE @@FETCH_STATUS = 0BEGIN declare @counter integer SET @counter = 1 while EXISTS(SELECT mdc_key FROM md_column (nolock) WHERE mdc_key != @mdc_key AND mdc_mdt_name = @mdt_name AND mdc_sort_order = @sort_order) BEGIN SET @sort_order = @sort_order + 1 END --print @mdc_name + ' ' + @mdt_name + ' ' + isnull(cast(@sort_order as nvarchar(20)),'') UPDATE md_column SET mdc_sort_order = @sort_order WHERE mdc_key = @mdc_key AND mdc_sort_order != @sort_order FETCH NEXT FROM order_cursor INTO @mdc_key, @mdc_name, @mdt_name, @sort_orderEND CLOSE order_cursorDEALLOCATE order_cursor COMMIT TRANSACTION
Simple Types
A similar error for simple types may also occur if there are multiple columns with the same data type but different column widths. This error generally looks like:
Cannot merge schemas with targetNamespace='http://www.avectra.com/2005/'.Several mismatched declarations were found: Schema item 'simpleType' named 'av_url_long_Type' from namespace 'http://www.avectra.com/2005/'.
The solution is to review the md_column records for each column with that data type and confirm that they have the same width as each other.
A less common error caused by simple types is a mismatch in the pattern for small dates vs. regular dates. This occurs with datatypes that are of type smalldatetime, which is assigned an XML type of StringLength16, the same XML type as a datetime field. However, these two XML types are assigned different patterns for what the contents of the field should look like, causing the conflict. The stored procedure md_metadata_cleanup will change smalldatetime datatypes to av_date_small, which is given a different XML type, eliminating the error. Alternatively, the offending fields can be updated with the altered datatype on the md_column record.
IXmlSerializable is invalid
Error Message: Schema type information provided by IXmlSerializable is invalid: Type 'http://www.avectra.com/2005/:EventsRegistrantType' is not declared.
This message indicates that an object (EventsRegistrantType in the message above) does not correctly implement the IXmlSerializable class, which is probably caused by an overridden baseline static facade object. For further information on this, please see Static_Facade_Object_Override#Class_Declaration
This message could also mean that the .dll for an overridden object has not been deployed to xWeb.
Special Characters Do Not Work
Q. I have a customer with a password that includes the & character, but it does not work when calling certain methods such as WebLogin. Why?
A. Since xWeb uses XML, there are five characters that must be converted from their standard character to special characters. Those five characters are: " & ' < >. See those characters in the Character column below which must be converted to the value shown in the Name column:
Name | Character | Unicode code point (decimal) | Standard | Description |
---|---|---|---|---|
" | " | U+0022 (34) | XML 1.0 | (double)quotation mark |
& | & | U+0026 (38) | XML 1.0 | ampersand |
' | ' | U+0027 (39) | XML 1.0 | apostrophe(= apostrophe-quote) |
< | < | U+003C (60) | XML 1.0 | less-than sign |
> | > | U+003E (62) | XML 1.0 | greater-than sign |
Note: this table is taken from Wikipedia: List of XML and HTML character entity references.
So, in the example above, the & character should be converted to &.
Special Characters in User Names
Special characters in an xWeb user name can cause problems. For instance, a username with '@ACRONYM' will be able to authenticate and get a token, but may have trouble executing additional methods, such as WebValidate.
WEBCentralizedShoppingCartInsert throws an error - 'Please contact Abila for licensing information.'
This error is exactly as it appears, Abila must configure xWeb to be enabled for this method to work.
Namespace
For most xWeb methods, the response includes a default namespace. For most xWeb requests, you must include a namespace directive. See main article for more.
If you are running methods but getting back a general fault, this could be because your input is syntactically correct but does not include proper namespace directives.
Fault in method parameter
If you get an exception with a <faultstring> message containing Fault in method parameter like the example below, it is likely because your request does not have the proper namespace directives. See xWeb Namespace for more.
Although this failure can manifest itself in many ways, a telltale sign is when you see a <SQLCommand> showing a command that is trying to run with a lot of blank parameters, as shown in the example below. This occurs because the method cannot parse the request so critical values come up blank.
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring> System.Web.Services.Protocols.SoapException: Fault in method parameter. at Avectra.netForum.xWeb.xWebSecure.netForumXMLSecure.WEBCentralizedShoppingCartGetShippingOptions(OrderEntry oCentalizedOrderEntry) </faultstring> <faultactor>http://64.211.221.68/netforumiapptest/xweb/Secure/netFORUMXML.asmx</faultactor> <detail> <SystemExceptionInfo xmlns="http://www.avectra.com/2005/"> <XWebException xmlns="http://www.avectra.com/2005/"> <Message>Fault in method parameter.</Message> <MessageDetail>Error converting data type varchar to uniqueidentifier.</MessageDetail> <UserMessage /> <Number>-2147217913</Number> <Source>xWebClasses</Source> <Class /> <Library /> <Method /> <Line>0</Line> <StackTrace> at Avectra.netForum.xWeb.FacadeData.DataSetToXmlFacadeNode(OleDbDataReader oDR, DataSet inputDS, String szObjectName, String szQueryString, FacadeClass oParentFacade, String WithDescriptions, XmlDocument xElements) at Avectra.netForum.xWeb.FacadeData.GetQueryNode(String szObjectName, String szColumnList, String szWhereClause, String szOrderBy, Int32 nRecordReturnLimit, DataSet inputDS, Boolean bFromGetQuery) at Avectra.netForum.xWeb.xWebSecure.netForumXMLSecure.WEBCentralizedShoppingCartGetShippingOptions(OrderEntry oCentalizedOrderEntry) </StackTrace> <SQLCommand> exec dbo.sc_shipping_list @cst_key = '', @ptp_keys = '', @eweb = 0, @ptc_key = '', @prd_code = '', @pat_src_key = '', @ship_total = '', @weight = '', @prc_display_name='', @additional_param='', @cur_key='', @cxa_key='' </SQLCommand> <ErrorType>GeneralError</ErrorType> <ErrorKey>e7121d91-dbb5-4060-9a77-81d9820380cd</ErrorKey> <Errors /> </XWebException> </SystemExceptionInfo> </detail> </soap:Fault> </soap:Body></soap:Envelope>
Confirmation Emails Not Sending
Q. When a item is purchased, the shopper is not getting a confirmation email. How can we get netFORUM xWeb to send a confirmation email?
A. Ensure thatinv_send_email_confirmation is set to 1 in the CentralizedOrderEntryType that you pass to WEBCentralizedShoppingCartInsert. See Shopping_Cart_Object#Invoice for more.