• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1096
  • 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?
thanks
-Brian
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()
        MyService.performAction(stXML)
        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/">
  <wsdl:types>
    <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" />
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="performActionResponse">
    <wsdl:part name="performActionReturn" element="impl:performActionReturn" />
  </wsdl:message>
  <wsdl:message name="performActionRequest">
    <wsdl:part name="xmlMessage" element="impl:xmlMessage" />
  </wsdl:message>
  <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:operation>
  </wsdl:portType>
  <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:input>
      <wsdl:output name="performActionResponse">
        <wsdlsoap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="CWOrderInService">
    <wsdl:port name="CWOrderIn" binding="impl:CWOrderInSoapBinding">
      <wsdlsoap:address location="http://192.168.30.145:8080/CWDirectCPService/services/CWOrderIn" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Open in new window

0
CousinDupree
Asked:
CousinDupree
  • 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.
0
 
CousinDupreeAuthor Commented:
I realize this is difficult without knowing the exact methods available. Thanks!
0
 
CousinDupreeAuthor Commented:
the solution was as accurate as possible given inforamtion provided.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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