Please I need people assistance in resolving this:

I'm try to send Some parameters to a remote web service and get parameters as response.
I'm just getting nothing in return below is my code:

'I Added the web service through Add Web Refrence on VS2005 and named it RemoteSite

Dim RequestNewCont(0) As RemoteSite.NewContributor
        Dim AnswerValue As RemoteSite.ResponseNewSON
        Dim CallService As New RemoteSite.wsReceptionResquestDeal()
 'I use below to send the parameters
' In debug mode it crashes at the next line
        RequestNewCont(0).ID = "222"
        RequestNewCont(0).MEMBERFIRSTNAME = "Adewale"
        RequestNewCont(0).MEMBERTITLE = "Mr"
        RequestNewCont(0).PRESENTADDRESS = "4, Samson Street"
		       
       CallService.wmReceptionResquestNEW(RequestNewCont, "MyUs", "MyFun")
' I use below variables to get the response       
	   Dim IDDE As String = AnswerValue.IDD
        Dim NameE As String = AnswerValue.Name
        Dim ClassE As String = AnswerValue.Class

'*****************************************************
'Below is the Webservice being called

<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal">
- <s:element name="wmReceptionResquestNEW">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="data" type="tns:ArrayOfNewContributor" /> 
  <s:element minOccurs="0" maxOccurs="1" name="usu" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="fun" type="s:string" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:complexType name="ArrayOfNewContributor">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="unbounded" name="NewContributor" nillable="true" type="tns:NewContributor" /> 
  </s:sequence>
  </s:complexType>
- <s:complexType name="NewContributor">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="ID" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="MEMBERFIRSTNAME" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="PRESENTADDRESS" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="MEMBERTITLE" type="s:string" /> 
  </s:sequence>
  </s:complexType>
- <s:element name="wmReceptionResquestNEWResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="wmReceptionResquestNEWResult" type="tns:ArrayOfResponseNewSON" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:complexType name="ArrayOfResponseNewSON">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="unbounded" name="ResponseNewSON" nillable="true" type="tns:ResponseNewSON" /> 
  </s:sequence>
  </s:complexType>
- <s:complexType name="ResponseNewSON">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="IDD" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" /> 
  <s:element minOccurs="0" maxOccurs="1" name="Class" type="s:string" /> 
    </s:sequence>
  </s:complexType>
- </wsdl:types>
- <wsdl:message name="wmReceptionResquestNEWSoapIn">
  <wsdl:part name="parameters" element="tns:wmReceptionResquestNEW" /> 
  </wsdl:message>
- <wsdl:message name="wmReceptionResquestNEWSoapOut">
  <wsdl:part name="parameters" element="tns:wmReceptionResquestNEWResponse" /> 
  </wsdl:message>
- 
- <wsdl:portType name="wsReceptionResquestDealSoap">
- <wsdl:operation name="wmReceptionResquestNEW">
  <wsdl:input message="tns:wmReceptionResquestNEWSoapIn" /> 
  <wsdl:output message="tns:wmReceptionResquestNEWSoapOut" /> 
  </wsdl:operation>
-
  </wsdl:portType>
- <wsdl:binding name="wsReceptionResquestDealSoap" type="tns:wsReceptionResquestDealSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
- <wsdl:operation name="wmReceptionResquestNEW">
  <soap:operation soapAction="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal/wmReceptionResquestNEW" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="wmReceptionResquestUPDATE">
  <soap:operation soapAction="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal/wmReceptionResquestUPDATE" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="wmTest">
  <soap:operation soapAction="http://localhost/wsDealsystem/wsDeal/wsReceptionResquestDeal/wmTest" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="wsReceptionResquestDeal">
- <wsdl:port name="wsReceptionResquestDealSoap" binding="tns:wsReceptionResquestDealSoap">
  <soap:address location="https://RemoteSite/wsDealsystem/wsDeal/wsReceptionResquestDeal.asmx" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

Any help will be highly appreciated

I'm not a VB person my self, but I have seen this problem in my college days. What I would suggest you tried is that replace 'localhost' in your soap methods with a proper URL. I had a similar problem trying to call the a service through sivlerlight and it din't work as it was set to localhost. give it a shot and let us know how it goes.

Thanks, I don't have control over the web service. Its own by an organisation to be consumes by customers. Some people are already consuming it particularly with Java.
Please help to resolve the issue

Ok, I think I can suggest one more thing, but you might have tried this already. If the service has more than one method, try to call on some other methods. If you get a similar response there are two reason:
a. The service is not compatible with VB (makes no sense to me either but you said people are using it with Java).
b. You might be having a typo somewhere when the service is called, maybe in the URL or someplace. this happens to everyone ;-)

Other than that, I would say that you try to put try-catch blocks, or I believe its On Error Goto <SUB> in VB. this way you will know if your VB is calling the service correctly without errors.

Thanks.

With Try and Catch method I got this exception "Object reference not set to an instance of an object"
The site is secured with SSL. Is there any special way of calling it via vb.net 2.0 different from above approach?Any help will be appreciated.

OK, I have a feeling that I know what you are doing. Try this. when you decalare:

RequestNewCont(0) As RemoteSite.NewContributor

try to call the contructor for RequestNewCount, maybe something like

RequestNewCount(0) = new RemoteSite.NewContributor

please pardon my horrible code as I'm not that well versed with VB. but the thing I'm trying to do is something similar to below (C#)

RemoteSite.NewContributor RequestNewCont(0) = new RemoteSite.NewContributor();

You must be getting the message because although you provide memory large enough to hold an object of RemoteSite.NewContributor, you do not initialise the variable to anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.