Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get HTML output from *.asmx file

How to get HTML output from *.asmx file

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++htmlwcf
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pankaj Jain
    wrote on last edited by
    #1

    Hi I am preparing an .asmx file that calls a c++ class using its .dll and generates output in .xml format.But I want output in HTML format. To ganarate HTML output I have used wsdl "useService" and "callService" functions in html file. But when i run this from from localhost it gives error "Client Service unavailable" Can anyone tell me plz how to resolve this problem.::sigh: I m giving my html file //CPPWebService.html var n = 10; var iCallID; var callObj; function init1() { s.useService("http://localhost/MyWebServices/CPPWebService.asmx?WSDL","yyy"); var headObj = new Object(); callObj = s.createCallOptions(); callObj.async = false; callObj.funcName = "MyMethod"; callObj.SOAPHeader = new Array(); callObj.SOAPHeader[0] = headObj; oSPAN.innerText = "Number returned is"; iCallID = s.yyy.callService(MyResults, callObj); MyResults(iCallID); alert("Over"); alert(iCallID.value); } function MyResults(result) { alert(result.value); if(result.error){ var xfaultcode = result.errorDetail.code; var xfaultstring = result.errorDetail.string; var xfaultsoap = result.errorDetail.raw; oSPAN.innerText = xfaultcode + " " + xfaultstring + " " + xfaultsoap; alert(xfaultcode +xfaultstring +xfaultsoap); } else{ // Show the arithmetic oSPAN.innerText += result.value; alert(result.value); } } function aaa() { alert(event.result.value + ' ' + event.result.id); } Equation : //CPPWebService.asmx <%@ WebService Language="C#" Class=CPPWebService.MyService %> it use c++ class that is as follows #include "stdafx.h" #using #using "System.Web.dll" #using "System.Web.Services.dll" using namespace System; using namespace System::Web; using namespace System::Web::Services; #include "CPPWebService.h" namespace CPPWebService { int MyService::MyMethod() { return 42; } }; Thax in advance

    Pankaj Jain

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups