blob: 5547957bcf5ea2d11ea017190808519347347401 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License") + you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.openmeetings.test.sip;
import org.junit.Test;
public class TestConnection {
@Test
public void main() {
try {
// System.out.println("Test Connection");
//
// // Get target URL
// String strURL = "http:///manager/xml_rpc_server.php";
// // Get file to be posted
// String fileToPost = "createUser.xml";
//
// File f = new File(fileToPost);
//
// // Prepare HTTP post
// PostMethod post = new PostMethod(strURL);
// // Request content will be retrieved directly
// // from the input stream
// RequestEntity entity = new FileRequestEntity(f, "text/xml; charset=UTF-8");
// post.setRequestEntity(entity);
//
//
// // Get HTTP client
// HttpClient httpclient = new HttpClient();
//
// // Execute request
// int result = httpclient.executeMethod(post);
// // Display status code
// System.out.println("Response status code: " + result);
// // Display response
// System.out.println("Response body: ");
// System.out.println(post.getResponseBodyAsString());
} catch (Exception err) {
err.printStackTrace();
}
}
}