Abhijit Durge

Greenhorn
+ Follow
since Oct 31, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhijit Durge

Hello James,

Lets say that I have json text files (e.g. customer.json) that reside on a filesystem...


Does customer.json reside on client machine or server machine.

Is it possible to process that json file from a Restful method which implements @GET?


If the file is a response to a GET request then processing of the JSON is possible on the @GET method.

Would I need to upload the file using Java's File I/O inside the @GET method?


If the file is on server machine/location which is accessible on the net, and the json is a response to be sent back to the client then its possible

--
Regards,
Abhijit
11 years ago

Meghana Reddy wrote:
baseUrl = com.order.process.gen.OrderService_Service.class.getResource(".");
//Here is where the CONNECT_TIMEOUT comes into picture
//since metro uses JDK's URLConnection class to obtain the WSDL.
//Since this is a generated class, we don't want to modify this and set a CONNECT_TIMEOUT here
url = new URL(baseUrl, "http://r8kmrzv:8080/orderweb/orderservice?wsdl");



1) Good to see now you are loading the WSDL from http instead of file.
2) Setting the following system properties will help you to provide timeouts when accessing the WSDL
sun.net.client.defaultConnectTimeout
sun.net.client.defaultReadTimeout

Meghana Reddy wrote:
Are you sure? I think when the web service client sends requests , the "com.sun.xml.internal.ws.request.timeout" (which is the BindingProvider.REQUEST_TIMEOUT) setting controls this.




Hope this gives you a better picture between the two:
CONNECT_TIMEOUT: It is the time taken to establish a (socket) connection
REQUEST_TIMEOUT: Maximum time between establishing a connection and receiving data from the connection.

--
Regards,
Abhijit.
11 years ago

Meghana Reddy wrote:
public static void main(String a[]) {
orderService = new OrderProcess(); //Service sub-class is instantiated which immediately tries to connect to the WSDL URL.
// We don't have the opportunity to let the JAX-WS RI to use the connection timeout.


since the Service class which opens the java.net.URLConnection to fetch the WSDL from the remote host, had already done so?
What I want to do is set a connection time out when the Service class attempts to get the WSDL.



As with the snippet in your post, not able to see where the URL objects openConnection() or openStream() method is being called or URLConnection is being used. Please share the associated generated stub.



Meghana Reddy wrote:
Now my question is - what is the point of setting, CONNECT_TIMEOUT in the above code,



This is used when webservice client sends requests(executes a method) to the webService.

--
Regards,
Abhijit.
11 years ago
Hi

Would like to know why would you require a connect timeout when the WSDL is at a file location.

--
Regards,
Abhijit
11 years ago
Hello,

To track/monitor which client has requested your webservice, you will need to trap and log the incoming request along with the client ip.
With this logged data you will be able to check the clients activity.
Further for non-repudiation, please see WS-Security.

--
Regards,
11 years ago
Hello Serkan,

The Nullpointer exception can occur due to following conditions.
a) Message object is null
b) Exchange Object is null
c) Endpoint Object is null

Please try the alternate way of providing configuration for logging



or




11 years ago
Hello Lucky,

To debug the problem of jar dependencies please provide the further details
What jar's are available in your web-app?
What version of Tomcat are you using?
11 years ago
Hello,

Hope the following helps:

xmlns means if any tags in your xml are not prefixed with namespace then they belong to the default namespace which is the value of xmlns="blah"

xmlns:xsi means you have defined a namespace "xsi" and xsi:schemaLocation is the location of XSD.

targetNamespace is the means through which you can refer an xml tags within your own xml.

To elaborate lets take an example

The <product> and <order> tags will belong to default namespace i.e namespace defined by xmlns

In the <order> tag's attribute refersTo requires to point to Product p1 this is done via tns:p1 (targetnamespace and tns)

--
Regards,


11 years ago
Hello, please see if the code snippet helps




PS: InnerExtended needs to be inside a class extending Parent. In this case Child.
11 years ago