• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

read response from webservice - vb.net

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="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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="http://schemas.xmlsoap.org/wsdl/">
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 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="http://schemas.xmlsoap.org/soap/http" />
    <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

  • 2
1 Solution
Bob LearnedCommented:
I see where the SOAP defines performActionResponse.  I would imagine that the method has a return type that you are just ignoring.
CousinDupreeAuthor Commented:
I realize this is difficult without knowing the exact methods available. Thanks!
CousinDupreeAuthor Commented:
the solution was as accurate as possible given inforamtion provided.
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.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now