Pushkal Mishra

Greenhorn
+ Follow
since Sep 17, 2003
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 Pushkal Mishra

I checked, it does persist it in the webapps folder.
16 years ago
Thank you.

Would this uploaded jar actually persist in some directory (like webapp) automatically upon upload? Or in some cryptic temp structure inside Tomcat?
16 years ago
Hi All,

Is it possible to source a remote WAR file (hosted on an Apache Web Server inside the htdocs folder as a resource) into an Apache Tomcat 6.x server? The idea is for the Tomcat to source in the latest WAR file during boot time.


<Host name="mydomain.com" unpackWARs="false" autoDeploy="true" appBase=""><Context path="" docBase="jar:http://mydomain2/someapp.war!/" debug="1" reloadable="true" crossContext="true">
...
...

I'd appreciate any lead.

Thanks,
Pushkal
16 years ago
Pooja,

I take it that you have also modified the necessary element in web.xml (<resource-ref>).

Thanks,
Pushkal

Originally posted by pooja jain:


okay. its mentioned. and it can be mentioned at following places:



1. context.xml already have a context element. should i replace it?
2. in 2nd and 3rd option, there is no engine name and host name folder in my system.
3. in 4th, i dont have META-INF folder in my application.
4. in 5th, isn't it modifying host tag is equivalent to modifying context tag? both are common for all application deployed on this tomcat.

16 years ago
Hi,

Just an update on this -- I basically used alternate approaches to create the soap message:
1. Parse the read XML message node by node and create an envelope, header, body and action elements incrementally
2. Use SOAP::Lite APIs (I did not try this, but I theorize that this will circumvent the problem) - I basically used some other perl APIs to create the SOAP message and make the SOAP call, but soon found that SOAP::Lite does the same thing
3. Use Axis (http://ws.apache.org/axis/). I was able to use it successfully.

Thanks,
Pushkal
19 years ago
Hi Friends,

I am parsing an XML file and making a SOAP call using Axis APIs:

Document document = builder.parse("portfolio.xml");
DOMSource domSource = new DOMSource(document);

MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
SOAPPart sp = message.getSOAPPart();
sp.setContent(domSource);
SOAPEnvelope se = sp.getEnvelope();
System.out.println("envelope: " + se);

The above SOP prints (among other things):
<Service>
etsGateway </Service>
<Version>
5.0 </Version>
<UserID>
scam </UserID>
<ReturnType>
SOAP </ReturnType>

Basically, a new line is added before each tag value read from the xml file. If I parse the xml file using DOM and print out each node, each node prints fine (implying that no extra white space exists inadvertently in the xml file). Because of this extra space and newline added to each tag, the SOAP call fails (on server-side, the code must not have trimmed the tag field - otherwise it might have worked fine).

I am able to implement the same thing in perl just fine and thus I infer that DOMSource is somehow to blame. I was wondering if anyone has experienced this. Please advise.

Thanks,
Pushkal
19 years ago
Normally, you always do something like this in your servlet class:
--------------------------------
public void doGet(HttpServletRequest request, HttpServletResponse response) {
// do Something
}
public void doPost(HttpServletRequest request, HttpServletResponse response) {
doGet(request, reponse);
}
--------------------------------
meaning keep both the doGet() and doPost() methods and let one call the other. This way, the both the get and post requests may be handled. Of course, this holds true provided there is no distinction in your Servlet code on the basis oof request method.
Thanks,
Pushkal
20 years ago
Ya you are right, it is invoked by the container only. My oversight!!
I don't know any other way. Let me know if you find something.
Pushkal
unsetEntityContext()
this is the best we can do. After that it is over to the container to garbage collect the object.
Please correct me if I am wrong.
Thanks,
Pushkal