Web Services Reference Tool problem

I am trying to use the Web Services Reference Tool in Office 2003. The tool is supposed to "create a VBA proxy class encapsulating all of the XML Web service's publicly exposed methods and input and output parameters".  The service is at URL https://frsponlinestg.fahcsia.gov.au/FRSPOnlineWebservice/Service.svc?wsdl and is called FRSPOnlineWebService.  It's methods appear in the list under that service correctly.  When I click the Add button I see the code flash on the screen for each method, but then I get the message "The Web Services Reference Tool could not generate the requested code. Any changes that were made to your project have been rolled back".  I searched the web and was advised to use a tool called wsdl.exe but this is not on my PC even after installing .NET Framework.  I do not have Visual Studio.  Can anyone help me - perhaps this works for you and you can paste the class code in your reply.
kmuntzAsked:
Who is Participating?
 
kmuntzConnect With a Mentor Author Commented:
I never resolved the problem of the web services reference tool not creating the proxy classes.  However I have found another way using the SOAP library MSOSoap30 and code like this:
 Set mobjConn = New MSOSOAPLib30.HttpConnector30
' Define the endpoint URL. You can find it in the WSDL's <soap:address> tag's location attribute.mobjConn.Property("EndPointURL") = _
    "https://frsponlinestg.fahcsia.gov.au/FRSPOnlineWebservice/Service.svc"
' Define the SOAP action. You can find it in the WSDL's
' <soap:operation> tag's soapAction attribute for the matching <operation> tag.
mobjConn.Property("SoapAction") = mstrActionURL  'string contains the URL to the service action
mobjConn.BeginMessage
Set mobjSerial = New MSOSOAPLib30.SoapSerializer30
' Initialize the serializer to the connector's input stream.
mobjSerial.Init mobjConn.InputStream
With mobjSerial
  .StartEnvelope , "s"     'start envelope
  .SoapNamespace "s", mcNS_URL_soapenv
  lngErrNum = WriteSoapHeader(vintOrgId)
  If lngErrNum = 0 Then
    .StartBody
    .startElement "SearchClient"
    .SoapNamespace "", mcNS_URL_ser2010
      .startElement "searchCriteria"
      .SoapNamespace "a", mcNS_URL_data2010
      .SoapNamespace "i", mcNS_URL_inst
        .startElement "DateOfBirth", , , "a"
        .WriteString Format(Year(datDOB), "0000") & "-" & Format(Month(datDOB), "00") & "-" _
        & Format(Day(datDOB), "00") & "T00:00:00"
        .endElement
        .startElement "FirstName", , , "a"          'first name
        .WriteString strFirstName
        .endElement
        .startElement "LastName", , , "a"           'last name
        .WriteString strLastName
        .endElement
        .startElement "SLK", , , "a"
        .WriteString strSLK
        .endElement
      .endElement                             'search criteria
    .endElement                               'search client
    .EndBody
    .EndEnvelope
  End If
End With
mobjConn.EndMessage
Set mobjSerial = Nothing
Set mobjRead = New MSOSOAPLib30.SoapReader30

' Initialize the SOAP reader to the connector's output stream.
mobjRead.Load mobjConn.OutputStream
Set mobjReplyNodes = mobjRead.Dom.childNodes
Set mobjReplyDom = mobjRead.Dom
'
'Write code to decode the XML returned  (I have posed another question re this)
0
 
Máté FarkasDatabase Developer and AdministratorCommented:
Here are the codes generated by Visual Studio (VB and C#):
FRSPOnlineWebService.cs
FRSPOnlineWebService.vb
0
 
kmuntzAuthor Commented:
I think this is ok but before I award full points do you know why I get so many syntax errors when this pasted into a class module in Microsoft Access?
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Máté FarkasDatabase Developer and AdministratorCommented:
MS Acces use VBA (wich is like VB6) but this project is in VB .NET which has defferent syntax. So this code can not be used in Access directly.
0
 
kmuntzAuthor Commented:
Is there any way I can get the code as it should be for MS Access?
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
There is no equivalency for the code produced in VBA, so the short answer is no, you cannot use that code in Access.

You generally use SOAP in Access/VBA to work with Web Services. Here's an article that describes this pretty thoroughly:

http://www.databasejournal.com/features/msaccess/article.php/3567511/Consume-Web-Service-from-Access.htm
0
 
kmuntzAuthor Commented:
The above is not really a solution.  I know how to use SOAP to talk to the web service from Access - what I need to know is why I get the error "Cannot Create Class"  when trying to use the Web Services Reference Tool to create the proxy classes.  Without the proxy classes I have a lot more work; in fact I may not even be able to work out what to do.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Then it would seem that my suggestion to use SOAP would have at least assisted you in resolving this matter.

0
 
kmuntzAuthor Commented:
I already knew about using SOAP when I posted the problem.  I wanted to get the classes code created for me automatically by the Web Services Reference tool.  The link you gave used such code; however since I could not get the import tool to work I used completely different code at a lower level.  I found examples of this elsewhere on the web.  I could not honestly say you answered my question or even helped me find a working method.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.