views:

2681

answers:

1

Hi all --- have been given a URL to a WSDL, a piece of it is here..not sure if this is a pertinent piece or not. I know how to add the web reference and import the namespace in Visual Studio 2005.

Questions...how do I pass my values to it? How do I encode for binary-64? I have the methodname (GETP)...not sure how to invoke it as a function to pass parameters, or if that is even the correct way to do it with this type of reference. Have only consumed .asmx files previously.

Many thanks for any input!

<wsdl:message name="GETPResponse">
  <wsdl:part name="GETPReturn" type="xsd:string" /> 
  </wsdl:message>
- <wsdl:message name="GETPRequest">
  <wsdl:part name="BASE64DATA" type="xsd:base64Binary" /> 
  </wsdl:message>
- <wsdl:portType name="Dist">
- <wsdl:operation name="GETP" parameterOrder="BASE64DATA">
  <wsdl:input message="impl:GETPRequest" name="GETPRequest" /> 
  <wsdl:output message="impl:GETPResponse" name="GETPResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
A: 

Just use "Add Service Refrence" and point it to the WSDL. See "How to Consume a Web Service".

John Saunders
What's the reason for the downvote? What did I miss?
John Saunders
I failed to mention i am still on ASP.NET 2.0. Are WCF extensions compatible? Is there a way to do this that more closely mimics the .asmx file?
If you're stuck with ASP.NET 2.0, then you should use "Add Web Reference" instead. It's similar.
John Saunders
Yeah, i got that. WHen I import the namespace it tacks on "CompletedEventArgs" to the web reference. I would like to know how to call the function and set parameters in base64binary encoding as well. thanks.
OK..i figured out the encoding. Now just need to call the function. Still get =CompletedEventArgs on namespace declaration. ???
I can't tell why your Web Reference comes out that way, since I don't have the WSDL.
John Saunders
Read that "How to consume" link. Although things are slightly different, you should be able to find the Reference.vb class by using the same directions (or similar). **BTW** are you using a Web Site (created with File->Add New Web Site), or a Web Application Project (File->New Project)? That's very important, since Web Sites are not projects, and are therefore different from anything else in Visual Studio.
John Saunders