Home Forums WPF controls Xceed DataGrid for WPF Can XBAP call web service ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25150 |

    Hi all

    As testn adviced me, I tried to create a very simple web service and call it from XBAP but I met an error that states:

    “Cannot create instance of ‘Page1’ defined in assembly ‘XAMLWebServiceTest, Version=1.0.2852.35330, Culture=neutral, PublicKeyToken=null’. Exception has been thrown by the target of an invocation. Error in markup file ‘Page1.xaml’ Line 1 Position 7.”

    the page.xaml have no controls and all the written code in the page.xaml.cs is as the following:

    localhost.Service serv = new localhost.Service();
    string strMessage = serv.HelloWorld();

    so, can XBAP call web service? if yes, how? and what is my way problem ?

    Regards,
    NAHR ELGANNAH

    Imported from legacy forums. Posted by NAHR_ELGANNAH (had 629 views)

    User (Old forums)
    Member
    Post count: 23064

    Your web services must be hosted on the same location as your XBAP file

    Imported from legacy forums. Posted by nat (had 289 views)

    User (Old forums)
    Member
    Post count: 23064

    thanks, man

    the XBAP file is already on my machine and the service is hosted on the localhost.

    but XBAP file is a file syste location. how to make it hosted on the localhost ?

    Imported from legacy forums. Posted by NAHR_ELGANNAH (had 400 views)

    User (Old forums)
    Member
    Post count: 23064

    other question

    is it available to call a service method (method in other solution) that in its order calls the DB ?

    i tried to do that and i recieve the same result if i tried to call the DB directly from XBAP file.

    Imported from legacy forums. Posted by NAHR_ELGANNAH (had 724 views)

    User (Old forums)
    Member
    Post count: 23064

    sorry, i mean service method (method in the solution in other project)

    Imported from legacy forums. Posted by NAHR_ELGANNAH (had 408 views)

    User (Old forums)
    Member
    Post count: 23064

    You can just copy it to the web server and browse it from http://localhost/blabla/Something.xbap.

    Further question should be asked at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1. You will get much better answer there.

    Imported from legacy forums. Posted by nat (had 4843 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.