[ASP.NET/Ajax] WebService in JavaScript aanroepen

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Beste allemaal,

Op de website waarmee ik bezig ben heb ik altijd pagemethods gebruikt om ajax requests te doen, maar nu heb ik de zelfde methoden nodig op verschillende pagina's. Het leek me wel een oplossing om het te doen via een webservice.

Nu gebruik ik een scriptmanager met een service reference daarin, volgens msdn moet er dan automatisch een javascript gegenereerd worden waarmee de webservice kan worden aangeroepen. Deze file wordt wel gegenereerd op het moment maar hij blijft verder leeg, een gegenereerde lege javascript file dus.

TestService.asmx
C#:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
namespace WebInterface
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ScriptService]
    public class TestService : System.Web.Services.WebService
    {
        [WebMethod]
        public string GetTest()
        {
            return "hello from server";
        }
    }
}



Default.aspx
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="NTFRWebInterface._Default" %>
<!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 runat="server">
    <title>Untitled Page</title>
</head>
<body>

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/TestService.asmx" />
        </Services>
    </asp:ScriptManager>

    <input type=button value="Press" onclick="clientClick();" />
</form>

<script type="text/javascript"> 

function onSuccess(value, ctx, methodName) { 
    alert(value); 
} 

function onFailed(ex, ctx, methodName) { 
    alert(ex.get_exceptionType());
} 

function clientClick()
{
    WebInterface.TestService.GetTest(onSuccess, onFailed, ctx); 
}

</script>

</body>
</html>


WebInterface.TestService.GetTest zou door .net gegenereerd moeten worden maar de file waarin dat zou moeten komen blijft leeg.

Iemand een idee wat het probleem kan zijn?

Acties:
  • 0 Henk 'm!

  • Gadgets
  • Registratie: Juni 2006
  • Laatst online: 09-09 00:33
Zet eens EnablePageMethods="true" aan op de scriptmanager

Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Thanks, maar het werkt niet, volgens mij zijn dit ook geen pagemethods meer omdat het in een webservice staat

Acties:
  • 0 Henk 'm!

  • Gadgets
  • Registratie: Juni 2006
  • Laatst online: 09-09 00:33
<asp:ServiceReference InlineScript="true" Path="~/TestService.asmx" />

Acties:
  • 0 Henk 'm!

  • Niemand_Anders
  • Registratie: Juli 2006
  • Laatst online: 09-07-2024

Niemand_Anders

Dat was ik niet..

Kun je in je web.config de volgende configuratie stukjes vinden:
XML:
1
2
3
4
5
6
<httpHandlers>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>

Als je nog niet de asp.net extensions hebt geinstalleerd (beta) dan zul je hier Version=3.5.0.0 moeten gebruiken. De PublicKeyToken blijft hetzelfde.

Roep daarna via je browser je http://localhost:xxxxx/TestService.asmx/js (Letop '/js' achter de extensie) aan. De website zou dan een javascript bestand moeten genereren.

If it isn't broken, fix it until it is..


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Inlinescript verhelpt het probleem ook niet :( als ik dat aan zit wordt er een leeg script block gegenereerd in de html pagina zelf, hier is de gehele html output met inlinescript op true:

HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!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>
    Untitled Page
</title></head>
<body>

<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEzMTg5MjA5NzVkZAOXRatU4CwI7wdf7opJa5xWyVyF" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/WebResource.axd?d=7Y6oD-NaCvpMn1grakwCCA2&amp;t=633324638633091956" type="text/javascript"></script>


<script src="/ScriptResource.axd?d=Y2z30D3ldh8aLoK8qFhRqakr4l-aNZnWx3dfnszdo7q15D2Av_SB7cYRunKYTvxOypFCWg2Yxq-0tuCSYjPPJQF2CwJt9hwKBQoVhIZq4j01&amp;t=788e81d6" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/ScriptResource.axd?d=Y2z30D3ldh8aLoK8qFhRqakr4l-aNZnWx3dfnszdo7q15D2Av_SB7cYRunKYTvxO79_l5_CIVfAe385_8Wt1Z6TTRbxWXizdDvVL-qTn6p7VDpPF5i0cCEhmOLbl8Gra0&amp;t=788e81d6" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
//]]>
</script>

    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>


    <input type=button value="Press" onclick="clientClick();" />


<script type="text/javascript">
//<![CDATA[
Sys.Application.initialize();
//]]>
</script>
</form>

<script type="text/javascript"> 

function onSuccess(value, ctx, methodName) { 
    alert(value); 
} 

function onFailed(ex, ctx, methodName) { 
    alert(ex.get_exceptionType());
} 

function clientClick()
{
    WebInterface.TestService.GetTest(onSuccess, onFailed, ctx); 
}

</script>

</body>
</html>

Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Niemand_Anders schreef op donderdag 13 maart 2008 @ 08:49:
Kun je in je web.config de volgende configuratie stukjes vinden:
XML:
1
2
3
4
5
6
<httpHandlers>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>

Als je nog niet de asp.net extensions hebt geinstalleerd (beta) dan zul je hier Version=3.5.0.0 moeten gebruiken. De PublicKeyToken blijft hetzelfde.

Roep daarna via je browser je http://localhost:xxxxx/TestService.asmx/js (Letop '/js' achter de extensie) aan. De website zou dan een javascript bestand moeten genereren.
De extensions heb ik geinstalleerd, die 2 dingen staan in mijn web.config, als ik naar http://localhost:xxxxx/TestService.asmx/js ga blijft die pagina leeg

hier is mijn volledige web.config:
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0"?><!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
--><configuration>
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
            <section name="dynamicData" type="System.Web.DynamicData.DynamicDataControlsSection" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
    </configSections>
    <appSettings/>
    <connectionStrings/>

    
    <system.web>    
        <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
    -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
    -->
        <authentication mode="Windows"/>
        <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
    -->
        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.SilverlightControls" assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.DynamicData" assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" tagName="DynamicFilter" src="~/App_Shared/DynamicDataFields/FilterUserControl.ascx"/>
            </controls>
        </pages>
        <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="DynamicDataModule" type="System.Web.DynamicData.DynamicDataHttpModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="UrlRoutingModule" type="System.Web.Mvc.UrlRoutingModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>
    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="OptionInfer" value="true"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="8000000"/>
      </webServices>
    </scripting>
        <!--
        <dynamicData
            // Type of the data context to be used
            dataContextType="[type]"
            enableTemplates="[bool]"  // whether to enable templates or not
            >
        
          <mappings
            queryStringKeyPrefix=""   // the prefix used for query string parameter keys
            pattern=""           // the pattern used in forming paths. must contains {table} and {viewName} identifiers
            >
            <add
              actions="list|details" // can be comma-separated list
              viewName=""       // string used in path pattern.
              templateFile=""     // template to use if actual file does not exist. File path relative to App_PageTemplates
              tables="[table names]"  // make these settings only apply to a list of tables (can be a comma-separated list)
              path=""          // override the default path generated from the pattern. must be app relative
              />
          </mappings>
        </dynamicData
    -->
        <dynamicData dataContextType="" enableTemplates="false">
            <mappings queryStringKeyPrefix="" pattern="~/{table}/{viewName}.aspx">
                <add actions="list,details" viewName="ListDetails" templateFile="ListDetailsTemplate.aspx"/>
                <!--
          <add actions="list" viewName="List" templateFile="ListTemplate.aspx" />
          <add actions="details" viewName="Details" templateFile="DetailsTemplate.aspx" />
        -->
                <!--
          Special overriding cases
          <add actions="list,details" tables="Products,Categories" viewName="SpecialName" templateFile="ListTemplate.aspx"/>
          <add actions="list" tables="Products" templateFile="DetailsTemplate.aspx" path="~/customPath.aspx"/>
          <add actions="list" tables="Orders" viewName="MyListViewName"/>
        -->
            </mappings>
        </dynamicData>
    </system.web.extensions>
    <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
  -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="ScriptModule"/>
            <remove name="DynamicDataModule"/>
            <remove name="UrlRoutingModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="DynamicDataModule" preCondition="managedHandler" type="System.Web.DynamicData.DynamicDataHttpModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="UrlRoutingModule" type="System.Web.Mvc.UrlRoutingModule, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="MvcScriptMap" preCondition="classicMode" verb="*" path="*.mvc" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"/>
            <add name="MvcHandler" preCondition="integratedMode" verb="*" path="Mvc.axd" type="System.Web.Mvc.MvcHandler, System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-3.6.0.0" newVersion="3.6.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>


Denk nu wel dat ik de oorzaak van het probleem gevonden heb, als ik de webservice aanroep in me browser krijg ik een foutmelding, namelijk:
SOAP 1.1-binding is niet aangetroffen: Het Basic Profile 1.1 van WS-I bevat implementatierichtlijnen waarin wordt aanbevolen hoe een set kernwebservices samen kunnen worden gebruikt om compatibele webservices te ontwikkelen. Voor het 1.1-profiel betreft het de specificaties SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 en XML Schema.

Acties:
  • 0 Henk 'm!

  • Niemand_Anders
  • Registratie: Juli 2006
  • Laatst online: 09-07-2024

Niemand_Anders

Dat was ik niet..

Werkt je toevallig nog met VS2008 beta 2? Daarin had ik een aantal weken geleden ook problemen met webservices. Achteraf bleek dat asp.net extensions beta 1 en .net 3.5 beta 2 niet goed samen gaan. Nadat ik de final 3.5 framework had geinstalleerd was het probleem bij ons opgelost.

Als je met VS2008 RTM werkt, dan is het misschien mogelijk het project te starten op een PC van iemand anders. Dan kun je in elk geval een installatie fout uitsluiten. Als je http://localhost:xxxxx/TestService.asmx (zonder /js) aanroept, kun je dan wel je webservice uitvoeren of krijg je dan ook een foutmelding?

If it isn't broken, fix it until it is..


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Ik werk met VS2008 RTM, als ik de webservice benader zonder /js krijg ik die "SOAP 1.1-binding is niet aangetroffen" melding.

Vanaf een andere PC kan ik op het moment niet doen, zal dat later vandaag is proberen.

De wsdl van de service ziet er overigens zo uit:
XML:
1
2
3
4
5
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types />
  <wsdl:service name="AjaxService" />
</wsdl:definitions>

[ Voor 61% gewijzigd door Verwijderd op 13-03-2008 11:36 ]

Pagina: 1