HomeHome Product Discus... Product Discus...SmithCartSmithCartOnCheckout Complete Event Web Service Return DataOnCheckout Complete Event Web Service Return Data
Previous
 
Next
New Post
4/29/2011 12:23 AM
 

Greetings,

I've created a simple REST web service that is successfully receiving the OrderID and OrderDetailID querystring params after an order is placed.  I send return values formatted as shown on page 84 of the PDF manual version 4.27 (newest I could find).  I have verified that only the return values are being sent back (I call Response.Clear() before I write them to the Response stream)  looking like:

8, TestDetailId8, 9, TestDetailId9

But the "TestDetailId8" and "TestDetailId9 values never get stored in the Smith_StoreOrderDetails.WebServiceData field.  

Also, I added the [WebServiceData] token to the user confirmation email but it is not getting replaced with the return data.

I'm seeing this error in the DNN Event Log immediately after this process:  "There was an error deserializing the object of type System.String. The data at the root level is invalid. Line 1, position 1."  This leads me to believe there is something wrong with the format of my return value.

I looked through the forums to try to find some help and found this post which seems to conflict with the PDF manual: http://www.smith-consulting.com/Forum... .  The post says there are three return value fields (OrderId, OrderDetailId, and WebServiceReturnField).  It also says the email token is [WebServiceReturnField] which conflicts with the PDF docs.

Am I correct in assuming that the return value should be in the body of the response and not somewhere in the header?  Is there an up-to-date return value example or some way to test why my simple test case isn't working?

I'm running this on SC 4.28, DNN 5.6.1 and SQL 2008 Express

Thanks for your help!

Dave

 
New Post
4/29/2011 10:40 PM
 
Do you see any errors in your dnn event viewer?

At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
5/2/2011 2:40 AM
 

The only error in my DNN Event Log after completing a test order is the one I mentioned:

"There was an error deserializing the object of type System.String. The data at the root level is invalid. Line 1, position 1." 

I cleared out the event log and did it again to be sure.

Thanks

Dave

 
New Post
5/2/2011 12:59 PM
 
Can you cut and paste the full error from your dnn event viewer I need to see the page and method that the error is generated from.

Thanks,
Scott

Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
5/5/2011 10:47 PM
 
Hi ,

Can any one please send me dummy of this web service as i created a web service at my end.
But it seems that it is not working.
The problem seems in calling web service.



Many-Many thanks in advance.
 
New Post
5/6/2011 12:27 AM
 

Hi,

 

Could you please send me demo code for this web service if it is written in wcf?

 

Many-2 thanks to you in advance....

 
New Post
5/8/2011 3:25 PM
 
The information in the cart manual is correct in regards to the return parameters for the OnCheckOut Complete WebService. The OnCheckOut Complete WebService returns the following 2 parameters:

1. OrderDetailID
2. WebServiceData

When the OnCheckOut Complete WebService was first released it programmed to accept 3 return parameters but we determined that the OrderID was not needed since the WeServiceData token is at the line item level so the the OrderID return parameter was removed and the cart pdf manual correctly describes the return parameters. I will see if I can have one of our programmers post a sample web service project for you tomorrow.

At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
5/8/2011 11:00 PM
 

Thank you very much for your reply..

Please send me dummy web service as i am having problem to call that service..

 

Many-2 Thanks to you...

 
New Post
5/10/2011 7:15 AM
 

Hi Dave,

Hope you are well.

Please send me dummy web service . I am waiting for your reply.

 

Thx,

Praveen

 

 
New Post
5/12/2011 4:10 AM
 
Hi Dave

Am really struggling with this and would reallllyyy appreciate you sending the sample web service

Look forward to your reply

Thanks, Praveen
 
New Post
12/1/2011 6:11 AM
 

Hi support,

 

Have you any update about this error. I am currently trying to implement the web service and met the same error (pasted from the event viewer):

Error : There was an error deserializing the object of type System.String. The data at the root level is invalid. Line 1, position 1. (Log Type: Admin Alert)

There is no other message (no stack trace) for this event.

 

The 2 events below are (of Admin Alert type too):

Stacktrace: : at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at Smith.DNN.Modules.BuyNow.Confirm.b() at Smith.DNN.Modules.BuyNow.Confirm.a(PaymentStatusInfo A_0) at Smith.DNN.Modules.BuyNow.Confirm.Submit() at Smith.DNN.Modules.BuyNow.Confirm.btnSubmit_Click(Object sender, EventArgs e)

And below :

PayPal Post URL https://www.sandbox.paypal.com

But the 2 event occurs more than 30 seconds before...

 

I have enabled the web service call feature and the URL is : http://localhost:8000/Default.aspx?oid=[ORDERID],odids=[ORDERDETAILIDS]

 

My service is a VB dotNet web application like (interresting code only):

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            ' Get order details ids and create a response string like "5,Key1,6,Key2"

            HttpContext.Current.Response.Write(response)

    End Sub
 

I tried to add the statement "HttpContext.Current.Response.End()" after the Response.Write call, but it throws an exception saying "The thread was beeing aborted".

 

As a result, the client has finished the purchase and the confirmation page is displayed. There is nothing in the webServiceData fields of the database and the email contains an empty table rows below the product names.

 

How can I fix the error ?

Thanks.

 
New Post
12/21/2011 4:37 AM
 

Hi,

 

Has anyone any update about this error ? Has support succeeded to reproduce it ?

Note that when I call the web service by entering the url in a browser, a blank page is displayed with a string in the format specified in the user manual. The  page source shows:

4,SerialNumber0,5,SerialNumber1,6,SerialNumber2

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title></head>
<body>
    <form name="form1" method="post" action="Default.aspx?oid=123%2codids%3d4%2c5%2c6" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZHnoudzKiwiP+iWM+Po7X1abnfJY" />
</div>

    <div>
    
    </div>
    </form>
</body>
</html>

Note that there are some html tags added too (added by the browser or is this that is returned by the web service ?)

 

My service returns data by calling (VB .Net):

HttpContext.Current.Response.Write(response)

Where response is a string and equals to "4,SerialNumber0,5,SerialNumber1,6,SerialNumber2"


And the error in the DNN event viewer is still:

There was an error deserializing the object of type System.String. The data at the root level is invalid. Line 1, position 1.

 

What is wrong with my implementation ?

 
New Post
1/9/2012 6:49 AM
 

up

 
New Post
1/12/2012 3:57 AM
 

Hi support,

 

The problem still occurs. I have tested with a simple dotNet web application (see errors above) and now with a dotNet web service. It produces the following error in the event viewer:

Error : Error in line 1 position 7. Expecting element 'string' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/'.. Encountered 'Element' with name 'html', namespace ''.

My web service declaration signature is:

    _
    Public Function SmithCartService(ByVal args As String) As String

And at the method end: Return "4,SerialNumber0,5,SerialNumber1,6,SerialNumber2" (the orderDetailIds 4 5 6 are replaced by the values passed in the request)

 

EDIT for web service application call: In fact, my web service is not called. The Web Service URL (in the Store settings) is "http://myWebSite/Service1.asmx?op=SmithCartService?oid=[ORDERID],odids=[ORDERDETAILIDS]". When I enter this URL in a browser, it returns 'Method not found' and the page source code starts with a "

" element (as it is not the correct way to invoke a web service). That explains the error message above.

 

 

I have modified the web application to return (throught Response.write) the string "4,SerialNumber0,5,SerialNumber1,6,SerialNumber2"  and now the error meesage in the event viewer is:

Error : Error in line 1 position 9. Expecting element 'string' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/'.. Encountered 'Element' with name 'string', namespace ''.

Note that it would be usefull to write the web service response in the event viewer.

 

I have seen many post regarding web service use problem in the Smith Shopping Cart forum. It would be nice if your development team could write & post a very simple web service sample written in dotNet. It would save time for your customers, and for you as it will avoid you to respond to user posts in this forum.

 

 

Please give an answer (even a simple yes - no will be appreciated).

Thanks.

 

 

 
New Post
1/16/2012 12:54 PM
 
Hi Rico,
We need to setup a working demo of the web service on a public site to demonstrate the onCheckOutComplete call web service function. It may take a bit of time to setup the demo for this but we will work on it and postback when its ready.

Thanks,

Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartOnCheckout Complete Event Web Service Return DataOnCheckout Complete Event Web Service Return Data