Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Ketan KC Chachad

Ranch Hand
+ Follow
since Nov 23, 2003
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 Ketan KC Chachad

I am also getting the same error even after using Spring 3.0.5.RELEASE and Hibernate 3.3.2.GA.

My appContext is as follows:
3 years ago
Also I tried executing the same client program by giving the proxy settings, this time only the client side gave the following exception message
{http://xml.apache.org/axis/}HttpErrorCode:502


(502)Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). )
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at itemsearch.ItemSearchSoapBindingStub.getItemsByCategory(ItemSearchSoapBindingStub.java:239)
at itemsearch.ClientSearch.main(ClientSearch.java:22)
Exception in thread "main"



Please help me understand what the actual issue is.
12 years ago
Hi tried executing the program to get the details of the java.net.ConnectException but now everytime the client program invokes the service the following exception is thrown at the server side and the client program thus throws the following message

I understand by the above message(s) that the Item class is giving a serialization exception but the class on the server side does implement the [b]java.io.Serializable interface[b] and so does the Item class that gets generated using the WSDL2Java utility.

Can anyone figure out the reason behind this exception being thrown?
12 years ago

Do the other local Java programs actually use the DNS-based address of the machine (causing it to go out on the network pass through the firewall(s) and come back) or are they actually using a "localhost" or 127.0.0.1 (loopback) based address (i.e. they never leave the local machine)?



The other local Java programs do use the DNS-based address of the machine but since the client programs and the server are residing on the same physical machine I do not think they go out on the network.

Also in the other Java programs I have not made any proxy settings but they still work fine. And if I do the same for the current program that is returning me the error code 502, a java.net.ConnectException is thrown.
12 years ago
I have published a web service on my local machine and am trying to consume it locally too. When I access the WSDL no errors are generated but when I execute a client program to consume the same web service the following exception message is thrown.

{http://xml.apache.org/axis/}HttpErrorCode:502

(502)Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). )
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at service.search.item.ItemSearchSoapBindingStub.getItemsByCategory(ItemSearchSoapBindingStub.java:239)
at service.search.item.SearchItemClient.main(SearchItemClient.java:30)


Can anyone tell me as to why a proxy error is thrown, when I have already done the necessary proxy settings in the client code and also when the other client Java programs to consume other locally published web services work without any errors.
12 years ago
Hi,

I want to know if there is any method for accessing a file uploaded in a JSP and sent to a servlet in an HttpResponse object. I have seen the code using the org.apache.commons.fileupload.* package classes.

My problem is that using the org.apache.commons.fileupload.FileItemFactory or org.apache.commons.fileupload.FileItem object, the uploaded file gets temporarily stored onto the disk. Is there any other method by which I can access the file stream from the HttpResponse object directly?
12 years ago
Hi Balaji,

Thanks for the links... I got to know about the web service throught www.xmethods.net website... and hence I have no clue how the web service is actually implemented...
12 years ago
Hi Balaji,

Can you suggest some book or site that can tell me more about Axis or Web Services programming in greater detail? Please give me the reference of a book or link that is freely available on the internet.
12 years ago
Thank you very much for your solution ... it worked!!!
12 years ago
Hi,

I just wrote a code where in I invoke an operation on an external webservice using the org.apache.axis.client.Call object. The operation I am intending to invoke takes no parameters, hence I called the call.invoke() method that takes no parameters but this threw a java.lang.NullPointerException. But if try calling the invoke() method that takes an Object array and pass it an uninitialized array like call.invoke(new Object[]{}), a org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. message is given.
The operation called takes no parameters but returns an Object array. What should be done in the code? The code written by me is as follows:
12 years ago
Hi,
I am trying to access a webservice but my machine has to route the request to create a service through a proxy. I can execute WSDL2Java at command line by giving the -Dhttp.proxyHost and -Dhttp.proxyPort for the JVM and -U and -P options for WSDL2Java.
I want to do the same for a client program and so I tried setting the System properties with http.proxyHost, http.proxyPort, http.proxyUser and http.proxyPassword but that gives a IOException with message Server returned HTTP response code: 407 for URL <a href="http://....</b rel="nofollow">" target="_blank">http://....
I have also tried using Authenticator.setAuthenticator(MyAuthenticatorClass) and that gives the following response javax.xml.rpc.ServiceException: Error processing WSDL document: java.net.ConnectException: Connection timed out: connect[/B]
I also have tried using TransportClientProperties class and using the -Dorg.apache.axis.components.net.TransportClientProperties=MyTransportClientProperties
command line VM option but this too results in the same output as given above.

Can anyone tell me what else can I do to get through the proxy to access the service/wsdl?

12 years ago
Hi,
I am trying to access a webservice but my machine has to route the request to create a service through a proxy. I can execute WSDL2Java at command line by giving the -Dhttp.proxyHost and -Dhttp.proxyPort for the JVM and -U and -P options for WSDL2Java.
I want to do the same for a client program and so I tried setting the System properties with http.proxyHost, http.proxyPort, http.proxyUser and http.proxyPassword but that gives a IOException with message Server returned HTTP response code: 407 for URL <a href="http://....</b rel="nofollow">" target="_blank">http://....
I have also tried using Authenticator.setAuthenticator(MyAuthenticatorClass) and that gives the following response javax.xml.rpc.ServiceException: Error processing WSDL document: java.net.ConnectException: Connection timed out: connect[/B]
I also have tried using TransportClientProperties class and using the -Dorg.apache.axis.components.net.TransportClientProperties=MyTransportClientProperties
command line VM option but this too results in the same output as given above.

Can anyone tell me what else can I do to get through the proxy to access the service/wsdl?

12 years ago
The error messages listed below are those caught and stored in a SAXParserException object
  • cvc-type.3.1.3
  • cvc-enumeration-valid
  • cvc-complex-type.2.4.a
  • cvc-datatype-valid.1.2.1
  • cvc-pattern-valid
  • I would also like to know where I can find out the complete listing of all possible validation error messages that are thrown by the validator class.
    What does one need to specify in an XSD element tag to ensure that the corresponding XML tag cannot contain null/blank values? For example if I have the following XML document

    Then in XSD what do I write for the name element so that it cannot contain a null/blank values. My current XSD looks like as follows:
    Hi,

    I want to know if I can write a code to validate an XML document against my own XSD in J2SE 1.4.2. I have a requirement of validating an XML document with an XSD and displaying all the errors that were encountered while the document was validated, can an error handler be written to continue validating a document even if 1 error in encountered? Also can anyone please tell me what jars are required for the enabling the above requirement.