Click here to Skip to main content
16,016,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to get similar code in c# any one can help me to resolve this issue


XML
package com.xyz.international.clients;


import java.io.IOException;

import org.apache.commons.httpclient.HttpClient;

import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;

import org.apache.commons.httpclient.methods.PostMethod;


public class availabilityWebserviceClientNew {


    public static void main(String[] args) throws IOException {

        HttpClient client =null;
        PostMethod method =null;

    String url="http://59.162.33.102:9301/Avalability";

        String response = "";

String request_str = "<AvailRequest>
<Trip>ONE</Trip>
<Origin>BOM</Origin>
<Destination>JFK</Destination>
<DepartDate>2014-02-15</DepartDate>
<ReturnDate>2014-02-20</ReturnDate>
<AdultPax>1</AdultPax>
<ChildPax>0</ChildPax>
<InfantPax>0</InfantPax>
<Currency>INR</Currency>
<PreferredClass>E</PreferredClass>
<Eticket>true</Eticket>
<Clientid>Given by Arzoo</Clientid>
<Clientpassword>Given by Arzoo</Clientpassword>
<Clienttype>ArzooINTLWS1.0</Clienttype>
<PreferredAirline></PreferredAirline>
</AvailRequest>";



MultiThreadedHttpConnectionManager connmngr=null;



connmngr = new MultiThreadedHttpConnectionManager();

        client = new HttpClient(connmngr);

        method = new PostMethod( url );

    method.addParameter("xmlRequest",request_str);

        client.executeMethod( method );

    response=method.getResponseBodyAsString();

        System.out.println("response "+response);
    }
}
Posted

1 solution

 
Share this answer
 
Comments
Kornfeld Eliyahu Peter 13-Jan-14 6:00am    
For the rest of the code you should pay them :-(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900