As part of developing a project I created a Cross-Domain Proxy to consume the payment service. My Cross-Domain Proxy, Payment.asmx, is exposed via the JavaScript end point. Any ASP.NET web service can open the JavaScript endpoint by uncommenting line #7 in the asmx file.

image

 

Once the ScriptService line is uncommented you can test that your service is exposing the JavaScript endpoint by calling a URL similar to:

   1:  ~/WebService.asmx/JS

In the master page I pull the service in.

   1:  <asp:ScriptManager ID="ocScriptManager" runat="server">
   2:      <Services>
   3:            <asp:ServiceReference Path="~/WebServices/Payment.asmx" />
   4:       </Services>
   5:  </asp:ScriptManager>

At this point everything works. I can write JavaScript to call back to the web service methods as such:

   1:  WebService.AddItem('item', CallBackFunction, FailFunction);
   2:   
   3:  CallBackFunction = function(){
   4:       alert('everything worked');
   5:  }

Now, I pull dojo into this project.

   1:  <script type="text/javascript">djConfig = { parseOnLoad: false, usePlainJson: true };</script>
   2:  <script type="text/javascript" src="http://dojopath/dojo.js"></script>

Here is where we start to run into problems. Due to, what I believe, is having both JavaScript APIs in the same project.

image

If we change the order of API loading we can get a, somewhat, clearer error message.

image

Now looking at line 1175 we see:

image

Conclusion:

I believe that I have exhausted my troubleshooting efforts. although I am not sure if this is enough information to validate the existence of a bug I opened a ticket with Dojo. Then again, I am not sure who can or should fix it.

http://trac.dojotoolkit.org/ticket/7353

I blogged about this once before.

http://eric.polerecky.com/archives/dijitformvalidationtextbox-and-aspnet-ajax/

Workaround:

In my project I use dojo.xhr to make calls back to the server.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2012 eric.polerecky.com Suffusion theme by Sayontan Sinha