I've programmed to two other service references, but it is still a little new to me. I received the WDSL and loaded the reference and the objects were created. I can see everything in the object browser. This is in VS 2010. Before I tried this in 2010 I accessed the service with soupUI 3.5, so I'm sure service works. In soapUI I did have to add in my p12 certificate, which is something I've never worked with in VS 2010, but I'm not sure if that is what is causing my problem. It might be, but I'm just not sure. It seems I should be able to create all of the objects, but if it was the cert it would fail at a later point.
I create 3 objects defined by the WDSL. There is a request object, a response object and a ServiceClient.
On the second line I get an exception that says, "Object reference not set to an instance of an object". If I comment out the 'NewRequest.PayLoad.EBSHeader.clientID = "XX-XXXXX"' the rest of the code runs without exception, including the other 2 WDSL objects. I have the New keyword in there and 'MCPRequest' is in cyan. I use Option Explicit On and Option Strict On at the top and the root service reference has an Imports call.
Any idea what I'm doing wrong?
Greg
I create 3 objects defined by the WDSL. There is a request object, a response object and a ServiceClient.
VB.NET:
Dim NewRequest As New MCPRequest
NewRequest.PayLoad.EBSHeader.clientID = "XX-XXXXX"
On the second line I get an exception that says, "Object reference not set to an instance of an object". If I comment out the 'NewRequest.PayLoad.EBSHeader.clientID = "XX-XXXXX"' the rest of the code runs without exception, including the other 2 WDSL objects. I have the New keyword in there and 'MCPRequest' is in cyan. I use Option Explicit On and Option Strict On at the top and the root service reference has an Imports call.
Any idea what I'm doing wrong?
Greg