Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.NET equivalent of a URL object?

 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Servlet that I need to do a POST to from a .NET web service client.

The problem was that I had to write the client in .NET since the JAX-WS client had trouble with the .NET web service's wsdl.

So, I'm in a regular .NET web service client class and have retrieved the String from the .NET web service. Now, I just need to POST it to the Servlet running under Tomcat.

Anyone know how to do in .NET what's easy with a Java URL object?

Thanks in advance.

-mike
 
John Schretz
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In C# I have used something like this:

 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Schretz wrote:In C# I have used something like this:



Awesome!!!

Thanks very much.

-mike
 
John Schretz
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im at work now. That is just from memory. I have the code for both at home. If you are still stuck tonight i can post both my C# code and Servlet code when i get home later.
Let me know how it works out.
 
Mike London
Ranch Hand
Posts: 1208
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Schretz wrote:Im at work now. That is just from memory. I have the code for both at home. If you are still stuck tonight i can post both my C# code and Servlet code when i get home later.
Let me know how it works out.


Nope, got it working fine. Thanks again very much.

- mike
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic