I have a pre-existing web service that I'm creating a new client reference for. It's been a long while since I worked with web services and I can't get it to work. I'm not sure if it because I'm having a brain fart and overlooking something extremely basic and simple or if there's some new web service functionality in VB 2008 where I have to add some stuff into.
The web service is a simple one called eFulfillmentWebService and has two functions:
I have it running on my local machine and inside of a VB.NET 2008 client project, I added a service reference to it called TestService.Code:FulfillPolicyXML(fulfillmentRequest as String) as String OperationStatusXML(status as String) as Boolean
This created a section with the app.config file as follows:
There's also a reference file that was generated which seems to have an interface in it and a bunch of other crap:Code:<system.serviceModel> <bindings> <basicHttpBinding> <binding name="EFulfillmentWebServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:1618/EFulfillmentWebService.asmx" binding="basicHttpBinding" bindingConfiguration="EFulfillmentWebServiceSoap" contract="TestService.EFulfillmentWebServiceSoap" name="EFulfillmentWebServiceSoap" /> </client> </system.serviceModel>
Now, I tried making a class which implements the autogenerated code there and I've tried accessing the service directly (which I think is how I remember doing it). Neither of those work. I can go to the endpoint address in the app.config file and all the methods come up and I can type some strings into them and get a valid response, but I can't seem to access any of the methods from within the VB client.Code:'------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. ' Runtime Version:2.0.50727.3615 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' </auto-generated> '------------------------------------------------------------------------------ Option Strict On Option Explicit On Namespace TestService <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0"), _ System.ServiceModel.ServiceContractAttribute([Namespace]:="http://xxx.xx/services/efulfillment/", ConfigurationName:="TestService.EFulfillmentWebServiceSoap")> _ Public Interface EFulfillmentWebServiceSoap 'CODEGEN: Generating message contract since element name fulfillmentXML from namespace http://xxx.xx/services/efulfillment/ is not marked nillable <System.ServiceModel.OperationContractAttribute(Action:="http://xxx.xx/services/efulfillment/FulfillPolicyXML", ReplyAction:="*")> _ Function FulfillPolicyXML(ByVal request As TestService.FulfillPolicyXMLRequest) As TestService.FulfillPolicyXMLResponse 'CODEGEN: Generating message contract since element name status from namespace http://xxx.xx/services/efulfillment/ is not marked nillable <System.ServiceModel.OperationContractAttribute(Action:="http://xxx.xx/services/efulfillment/OperationStatusXML", ReplyAction:="*")> _ Function OperationStatusXML(ByVal request As TestService.OperationStatusXMLRequest) As TestService.OperationStatusXMLResponse End Interface ... 'A lot of other stuff here which makes it too long to post End Namespace
Does anyone have an idea what it is that I'm missing or can point me in the right direction? I have a feeling that I'm just overlooking a simple step two in a basic three step process.




Reply With Quote