Showing posts from November 7, 2011

How to create a java SOAP Client to test a .Net web service

This is how you can test your web service in Java without creating any SOAP Client. Using this you can access Web Services created using any technology, in specific .Net.

 * To change this template, choose Tools | Templates
 * and open the template in the editor.

package com.fugoconsulting;


 * @author pandi
public class sendRequest {

    public String sendRequestToIRDA(String request) {

    String response = "";
    try {
            String soapXml = request;
            URL url = new URL(""); //for testing .Net Service
   conn = ( url.openConnection();
            conn.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
   conn.setRequestProperty("SOAPAction", "http://test/Service/Test");