read response from webservice  -

Posted on 2009-02-23
Last Modified: 2012-05-06
I need to view the results of a web serivce.  How do I reference that in VB.NET 2005.
The XML file is correct. The server is behaving as though it's getting correct data.  I opened a port sniffer and can see xml data coming back to me.  How do I capture what's being returned into a variable?
Imports System

Imports System.ComponentModel

Imports System.Diagnostics

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.Xml.Serialization

Module Module1

    Sub Main()

        Dim stXML As String = ""

        Dim myResult As String = ""

        stXML = ' some valid XLM file

        Dim MyService As WebReference.CWOrderInService = New WebReference.CWOrderInService()


        MsgBox("myresult = " & myResult)

    End Sub

End Module


the wsdl is:

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:wsdlsoap="" xmlns:apachesoap="" xmlns:xsd="" xmlns:intf="http://com.cwi.framework.webservice.javabean" xmlns:impl="http://com.cwi.framework.webservice.javabean" targetNamespace="http://com.cwi.framework.webservice.javabean" xmlns:wsdl="">


    <xsd:schema xmlns="" elementFormDefault="qualified" targetNamespace="http://com.cwi.framework.webservice.javabean">

      <xsd:element name="xmlMessage" type="xsd:string" />

      <xsd:element name="performActionReturn" type="xsd:string" />



  <wsdl:message name="performActionResponse">

    <wsdl:part name="performActionReturn" element="impl:performActionReturn" />


  <wsdl:message name="performActionRequest">

    <wsdl:part name="xmlMessage" element="impl:xmlMessage" />


  <wsdl:portType name="CWOrderIn">

    <wsdl:operation name="performAction" parameterOrder="xmlMessage">

      <wsdl:input name="performActionRequest" message="impl:performActionRequest" />

      <wsdl:output name="performActionResponse" message="impl:performActionResponse" />



  <wsdl:binding name="CWOrderInSoapBinding" type="impl:CWOrderIn">

    <wsdlsoap:binding transport="" />

    <wsdl:operation name="performAction">

      <wsdlsoap:operation soapAction="" />

      <wsdl:input name="performActionRequest">

        <wsdlsoap:body use="literal" />


      <wsdl:output name="performActionResponse">

        <wsdlsoap:body use="literal" />




  <wsdl:service name="CWOrderInService">

    <wsdl:port name="CWOrderIn" binding="impl:CWOrderInSoapBinding">

      <wsdlsoap:address location="" />




Open in new window

Question by:CousinDupree
    LVL 96

    Accepted Solution

    I see where the SOAP defines performActionResponse.  I would imagine that the method has a return type that you are just ignoring.

    Author Comment

    I realize this is difficult without knowing the exact methods available. Thanks!

    Author Closing Comment

    the solution was as accurate as possible given inforamtion provided.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
    While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now