Win a copy of Rust Web Development this week in the Other Languages forum!

Rajiv Arora

Greenhorn
+ Follow
since Mar 25, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Rajiv Arora

I am also facing a similar issue, so could anyone help here?

Thanks!
12 years ago
Hi all,

We have been using the class - "sun.security.krb5.internal.tools.Kinit" on Java 5, but now it seems to have been omitted from Java 6 on Linux & Solaris. On Windows java 6, it's still there. So can anyone suggest me a workaround to get it working on Java 6 Linux/Solaris platforms?

Thanks a lot in advance!!
12 years ago
Hi all,

We have been using the class - "sun.security.krb5.internal.tools.Kinit" on Java 5, but now it seems to have been omitted from Java 6 on Linux & Solaris. On Windows java 6, it's still there. So can anyone suggest me a workaround to get it working on Java 6 Linux/Solaris platforms?

Thanks a lot in advance!!
12 years ago
We have certain codebase already written in .Net and now want to re-use the same within another application�s domain which is Java based. Instead of going with the native method invocation directly, we would like to explore the possibility of any packages/applications that can do this easily. There�s one at - http://jnbridge.com/ , that is available but would like to have your opinion if anyone has tried any such tools.

Any inputs in this regards would be appreciated.

Thanks a lot !!
13 years ago
Redircting the output would not be a good option as in our system there will be thousands of commands running. So I would definitely prefer an approach where I can get hold of the I/O Streams of a process in a sub-shell.
13 years ago
Thanks a lot everyone for your responses !!

I have tried using ProcessBuilder also and the present issues that I am facing to execute all the commands in the same session are:

1) I am trying to go to a subshell first of all - using the "command" command as first thing, by spawning the process as:
cmd.exe /K command

2) Now with this my process goes into a subshell and that I know by the data that I get in the parent Process's InputStream ("Command" command's outputstream sends it to Parent process's inputstream).

3) Next I send the command "cp c:\1.txt C:\test\1.txt" to my parent process's outputstream which ultimately goes to my "command" command's inputstream and gets executed. This I know because the file is actually copied. But even then I do not get the "1 file(s) copied" output back in my Parent process's Inputstream; but my requirement is to capture that.

The reason I believe for this is that - the "cp" command that we executed in the "command" command's subshell sends back the response in "command"'s InputStream. But we do not have any handle to it. The only handle that we have is Parent process, i.e. "cmd.exe"'s I/O streams.

So is there any way that I can use to capture the output of the commands executed in a subshell?

Thanks a lot everyone for your help !!
13 years ago
I need to invoke native Processes in a session using Java.

To summarize the problem, I am using ProcessBuilder class to invoke commands. But challenge is can I invoke subsequent commands in the same session?

i.e. once you have got an instance of Process from ProcessBuilder, we want to execute a series of commands in the same process (session).

Just to explain by this with an example:

Say, we are in C:\
And we execute �dir� command. It will list the directories in C:\
Now we want to execute �cd C:\test� and then do �dir� again so that we get the listing of �C:\test� and not �C:\�

The problem that I am facing with this is that:
- On execution of first command I get the result back in the Process's Inputstream but when I write the second command to the Outputstream of the same process to be executed in the same session, then I do not get the result back in the Process's InputStream.

is there anything that I am doing wrong? Please help me understand this.

Thanks a lot.
13 years ago
Hello,

I am searching for a good Eclipse plugin which can help in the application design & UML generation process. I googled a bit and found many useful links but one of my requirements is that it should be free to use. So can anyone suggest me any such good tools/plugins?

Thanks,
Kamal
14 years ago
The "==" operator simply checks for the reference equality. i.e it simply compares whether the reference variables point to the same objects in the memory or not. Whereas .equals() is meant to actually compare the object values rather than comparing their references.
As a very simple explanation - In the case of storing a child class object in a base class reference, overridden method definition from child class shall be called as JVM deciphers in runtime that it is actually a child class object wrapped in a parent class reference. Whereas variables are something which are referred as per their compile time binding. That's the reason you see this behavior. Hope that helps you Rex (Amit)..
I see that in the wsdl that you specified, the namespace "ns" points to the XSD and there are complex elements within your wsdl (like ItineraryFlightSegment)which use this namespace for their definition. So I believe even if the definition of these elements lies within the same WSDL, its searching them in the referenced XSD as they are bound by the namespace "ns". So just try modifying your wsdl by removing this "ns" namespace from the elements which refer it like below:

Before modification:
-------------------
"<xsd:element maxOccurs="1" minOccurs="0" name="ArrivingFlightSegment" type="ns:ItineraryFlightSegment" />"

After modification
-------------------
"<xsd:element maxOccurs="1" minOccurs="0" name="ArrivingFlightSegment" type="ItineraryFlightSegment" />"

(Namespace "ns" removed from type definition)
This is a tedious job, but I think this should help you.

-Kamal
14 years ago
I had faced this issue once earlier and the cause for it was that the XSDs referenced from my WSDL were different from the ones that should have been there. So try checking the referenced schemas within your WSDL and whether they really contain the element definitions that it is throwing error for.

-Kamal
14 years ago
Hi,

I am trying to invoke a webservice which has some elements in the SOAP Body that seem to be causing the problem:

<acb:value>
<acd:InternalUniqueId>?</acd:InternalUniqueId>
<acd:InternalSelfDescription>?</acd:InternalSelfDescription>
<acd:InternalState>?</acd:InternalState> </acb:value>

The first two parameters are of String type and the third one is a Base64Binary data. If I remove this complete element "value", then the request works fine; but if I provide any of the three child elements in it, then the below mentioned Exception is thrown. I would really appreciate if I could have some help on this as it is a showstopper for my current assignment

Thanks,
Kamal

----------------------------------------------------------
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname ev2

java.lang.NullPointerException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
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:1910)
14 years ago
If you refer the API, then you will find something like:

"asList() - Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.)"

That's the reason the changes you make to the List shall be propagated back to the array as well.

-Kamal
Thanks Ulf !! It seems I will have to go for a custom implementation as I need lot of 3D content.

-Kamal
14 years ago