Suresh Appagundi

Ranch Hand
+ Follow
since Sep 22, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suresh Appagundi

Hi All,

Iam using Netbeans mobility pack to create mobile applications.

I took CurrencyConverter mobile application from the samples and tried to run the same.

Emulator appears and doesn't show anything on display. Seems like it hangs.

Help me out in resolving this issue.

thanks in advance.
19 years ago
Hi All,

Is there any java browser component to fetch the contents of any url (for example http://javaranch.com)

I dont want any UI to show like browser, but i just want to get the final content (html text) and final url.

very urgent.

thanks in advance
Hi all,

i type the following url in the browser

"http://dreamadream.org/"

and got redirected to below

http://dreamadream.org/dreams/avs/home/

In the browser its been taken care

but same action i need it using java net package.

I am using URL and HttpURLConnection to connect to "http://dreamadream.org/"

but i should get redirect to "http://dreamadream.org/dreams/avs/home/
".

HOW TO DO THAT IN JAVA PROGRAM USING NET PACKAGE OR ANY OPENSOURCE LIKE

HTTPCLIENT FORM COMMONS.

VERY URGENTLY REQUIRED.

THANKS IN ADVANCE
Hi all,

I need to get the proxy setting details before accessing any url using URL class (java net package).

In jdk 1.5 there is a class called ProxySelector, which is supposed to do the job. But it is failing.

Below is source code iam trying

package com.httpclient;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.lang.reflect.Type;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;

public class testURL {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
BufferedInputStream in;

HttpURLConnection conn;
BufferedReader bin;
URL u;
String fileContents="";
try {
ProxySelector ps = ProxySelector.getDefault();
URL url = new URL("http://google.com");
URLConnection connection = url.openConnection();
List proxyList = ps.select(connection.getURL().toURI());


int len = proxyList.size();
System.out.println("size : "+ len);
for (int i = 0; i < len; i++) {
Proxy p = (Proxy) proxyList.get(i);
InetSocketAddress addr = (InetSocketAddress) p.address();
if (addr == null) {
System.out.println("MANUAL");
}

else {
InetAddress ip_addr = addr.getAddress();

int tcp_port = addr.getPort();
// Use the specified IP and port number as the proxy

System.out.println("IP ADDR " + ip_addr + "tcp_port " + tcp_port);
}
}

} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}

Please help on solving this issue. Immediate response will be of very useful.

thanks in advance.
19 years ago
But i want to use JAX-RPC
19 years ago
I have a WSDL url.

I need to invoke the webservice with serviceName, portName and operation using simple java standalone program.

Can any one give me some example or some site which gives these details.

Can be any type of client.

i.e. Static stub, Dynamic proxy or DII

thanks in advance
19 years ago
Hi

I want to create a XML from the folder specified.
For example if i give c:\\ to my xml generator, the generator should generate an xml file containing all the folders and files recursively in the c:\\.

It will look some thing like this.


<?xml version="1.0" encoding="utf-8" ?>

<folder_root name="Passed folder name with complete path">

<folder name="A">

<folder name="B">

<folder name="C">

<file name="file2" />

</folder>

<file name="file3" />

</folder>

<file name="file1" />

<file name="file3" />

</folder>

</folder_root>

Originally posted by Jesper de Jong:
Wrap them in the corresponding wrapper classes (int -> Integer, char -> Character, etc.) and the reflection API will automatically unwrap them.


--------------------------------------------
Suppose i have

public void set(int i){
}

public void set(Integer i){
}

And if i wrap the primitive int into Integer wrapper, which of the above methods will be considered. Actually the second one. But i want the first method to invoke. Now how do i do it.
19 years ago
Hi,

How to pass primitive types, Array types and user define type to a method, when invoking method using Java reflection api.

Any sample code or any related links will be very helpful

thanks in advance.
19 years ago
JAX-RPC version 1.1 comes in J2EE 1.3 specification or J2EE specification 1.4

and

JAX-RPC 1.1 supports which version of SOAP, WSDL and XML

I wanted this information because, i have to use JAX-RPC 1.1, SOAP 1.1, WSDL 1.1 and XML 1.0 version

Please reply back in urgent.

Thanks in advance
19 years ago
Hi

How to Create LogHandler to be operated in both the Web service itself(provider) and the client applications(consumer) that invoke the Web Service

Anybody knows the answer for this please reply back immediately.


Thanks in advance.
19 years ago
Whais is message handler and how to implement them on both client side and server side of the webservice using JAX-RPC API.

Iam fresher to this, Please help me in giving some samples or reference to some sites.

thanks in advance.
19 years ago
Service service = (Service) ic.lookup(java:comp/env/service/SDFWs);
servicePort = service.getPort(com.sdf.SDFWsSEI.class);

String targetNameSpace = "urn:SDFWs/wsdl"; // This target namespace from WSDL
// <definitions name="SDFWs" targetNamespace="urn:SDFWs/wsdl"

QName portName = new QName(targetNameSpace,"SDFWs");
HandlerRegistry registry = service.getHandlerRegistry();
if(registry != null){
List handlerList = new ArrayList();
handlerList.add(new HandlerInfo(ClientHandler.class,null,null));
registry.setHandlerChain(portName, handlerList);

cache.put(jndiHomeName, servicePort);
}


In the above snippet of code, iam getting NullPointerException at line

HandlerRegistry registry = service.getHandlerRegistry();

Not able to HandlerRegistry.

What could be the problem?

Please let me know if there is some problem the way oam registering the Handler.

thanks in advance.
19 years ago
Hi,

I am using Message Handlers for example LogHandler.

Now in the handleRequest(MessageContext context) method, i need to get
entire SOAPMessage

For example

<SOAP-Envelope>
Other Elements
</SOAP-Envelope>

Entire message as XML.

Please let me immediately how to achieve this using JAX-RPC API.

And also how to use Message Handlers on the client side using JAX-RPC API

Thanks in advance
19 years ago
java.rmi.ServerException: JAXRPCSERVLET28: Missing port information

When i try to run the webservice i am getting above exception.

Please let me know if there is any solution to this.

Iam using NetBeans 4.1

And i also wanted to know how to add Weblogic 8.1 server to netbeans 4.1 IDE.


thanks in advance
19 years ago