Re: Need C# Web Services Consumption example.

2007-07-20 Thread Darren Clarke
Hi Srini

I don¹t have an example I can give you, but I¹m in the middle of doing the
same.  Once your service is up and running, go to your project in MSVS.NET
and add a new Web Reference.

In the New Web Reference dialog, enter the URL to the WSDL and click Go.
The dialog will then show you a list of operations supported by the
webservice and ask you for a Web Reference Name.  Ensure you enter a
sensible name here (certainly more sensible than the provided default) as
this will become the namespace.

Once you¹ve done this and clicked Add Reference, using it within the C# is
fairly straightforward ­ start typing the namespace and auto-completion
should help you with the rest.

If auto-completion isn¹t giving anything for the new namespace, try a build
first.  If you get build errors, the build output error messages aren¹t
usually very good and you¹ll get the full detail of the errors if you use
the wsdl.exe tool at the command prompt.

Darren



On 20/7/07 14:48, Srinivasa Rao K [EMAIL PROTECTED] wrote:

 Hi,
   
  
   
 I am looking for a C#, Visual Studio 2005, Web Services Consumption example.
 The Web Service Provider is Axis. I appreciate your help.
   
  
   
 thanks,
   
 Srini
   
 
 Be a better Heartthrob. Get better relationship answers
 http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5M
 Gx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawN
 Qcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=listsid=396545433 from someone who knows.
 Yahoo! Answers - Check it out.




Re: Need C# Web Services Consumption example

2007-07-20 Thread Srinivasa Rao K
Thanks Darren,
   
  I wrote a Consol Application and compiled well. But, I am trying to access 
HTTPS service so there is some SSL exception, any idea how to add certificate 
for the Console Application? For java client I was using jks file. Do we need
  to create a new certificate for .Net/C# client? 
   
  By the way, any idea how change HTTPS serive into HTTP Service ? Its on
  WebSphere 6.
   
  Exception:
   
  Unhandled Exception: System.Net.WebException: The underlying connection was 
clos
ed: Could not establish trust relationship for the SSL/TLS secure channel. ---
System.Security.Authentication.AuthenticationException: The remote certificate i
s invalid according to the validation procedure.
   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken messag
e, AsyncProtocolRequest asyncRequest, Exception exception)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToke
n message, AsyncProtocolRequest asyncRequest)
  
Thanks,
  Srinivas.

   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.

Re: Need C# Web Services Consumption example.

2007-07-20 Thread Martin Gainty
Re: Need C# Web Services Consumption example.ok
You have a service
therefore you have pub'ed your WSDL

so the namespaces came from the original WSDL Doc
e.g.
[WebMethod]
public bool SomeMethod(string xml)
{
try
  { //start try...
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
XmlNamespaceManager nsManager = new
XmlNamespaceManager(doc.NameTable);

//acquire the Category node
 XmlNode categoryNode =  
doc.DocumentElement.SelectSingleNode(catNS:Category, nsManager);

//GET CURRENT NAMESPACE of selected node
string ns = categoryNode.GetNamespaceOfPrefix(bk);

  } // end try
catch(SQLException sqle)
{
  System.out.println(The exception has been produced is +sqle.getMessage());
}

--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
  - Original Message - 
  From: Darren Clarke 
  To: axis-user@ws.apache.org 
  Sent: Friday, July 20, 2007 10:07 AM
  Subject: Re: Need C# Web Services Consumption example.


  Hi Srini

  I don't have an example I can give you, but I'm in the middle of doing the 
same.  Once your service is up and running, go to your project in MSVS.NET and 
add a new Web Reference.

  In the New Web Reference dialog, enter the URL to the WSDL and click Go.  The 
dialog will then show you a list of operations supported by the webservice and 
ask you for a Web Reference Name.  Ensure you enter a sensible name here 
(certainly more sensible than the provided default) as this will become the 
namespace.

  Once you've done this and clicked Add Reference, using it within the C# is 
fairly straightforward - start typing the namespace and auto-completion should 
help you with the rest.

  If auto-completion isn't giving anything for the new namespace, try a build 
first.  If you get build errors, the build output error messages aren't usually 
very good and you'll get the full detail of the errors if you use the wsdl.exe 
tool at the command prompt.

  Darren



  On 20/7/07 14:48, Srinivasa Rao K [EMAIL PROTECTED] wrote:


Hi,
  
 
  
I am looking for a C#, Visual Studio 2005, Web Services Consumption example.
The Web Service Provider is Axis. I appreciate your help.
  
 
  
thanks,
  
Srini
  


Be a better Heartthrob. Get better relationship answers  
http://us.rd.yahoo.com/evt=48255/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=listsid=396545433
 from someone who knows.
Yahoo! Answers - Check it out.