Lavanya Halliwell

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

Recent posts by Lavanya Halliwell

I've got a strange issue that is stumping me, so am interested to know what you guy think of this.

I have a wsdl file that I know works, and my goal is to rebuild the webservice without changing the wsdl file such that it deploys on weblogic 10.3.0.

when I create the web service "test" using test.wsdl, I specify a package name "com.test"

it creates com.test, with ready for my personal coding....but it also creates "generated sources" with 2 folders:

1. com.bea.examples.test -> for all web service specific files
2. java.com_test -> for all bean classes needed for the wsdl file

it builds fine.

when I deploy it on weblogic 10.3.0 I get a security exception because of the package name "java.com_test". I have tried to make sure that the project uses the same version of java that the weblogic 10.3.0 has, but still no success. I think it has to do with that funny underscore in the name, this doesn't appear like this in other projects which work just fine. but it won't let me rename the directory, or refactor the files. (I think because it is a generated code)

does anyone have experience seeing this sort of thing before? or is this a netbeans bug....(it shouldn't create a package name that causes a security exception)
my questions is about the wsdl file, because when I use my wsdl file to create an ejb jar project in netbeans 1 of the 3 wsdl operations gets ignored....


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl=""
<xsd:schema targetNamespace="urn:com:test:service">
<xsd:import namespace="urn:com:test" schemaLocation="test.xsd"/>
<wsdl:message name="t1Request">
<wsdl:part name="inputPart" element="ns:testInput"/>
<wsdl:part name="attachment" type="xsd:base64Binary"/>
<wsdl:message name="t2Request">
<wsdl:part name="inputPart" element="ns:test2Input"/>
<wsdl:message name="t1Response">
<wsdl:part name="outputPart" element="ns:testOutput"/>
<wsdl:message name="t2Response">
<wsdl:part name="outputPart" element="ns:test2Output"/>
<wsdl:message name="testFault">
<wsdl:part name="faultPart" element="ns:testFault"/>
<wsdl:portType name="testPortType">
<wsdl:operation name="t1">
<wsdl:input name="inputt1Request" message="tns:t1Request"/>
<wsdl:output name="outputt1Response" message="tns:t1Response"/>
<wsdl:fault name="faulttestResponse" message="tns:testFault"/>
<wsdl:operation name="t2">
<wsdl:input name="inputt2Request" message="tns:t2Request"/>
<wsdl:output name="outputt2FilePathResponse" message="tns:t2Response"/>
<wsdl:fault name="faulttestResponse" message="tns:testFault"/>
<wsdl:binding name="testBinding" type="tns:vtestPortType">
<soap:binding style="document" transport=""/>
<wsdl:operation name="t1">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="inputt1Request">
<mime:part name="bodyPart">
<soap:body use="literal"/>
<mime:part name="attachmentPart">
<mime:content part="attachment" type="*/*"/>
<wsdl:output name="outputt1Response">
<soap:body use="literal"/>
<wsdl:fault name="faulttestResponse">
<soap:fault use="literal" name="faulttestResponse"/>
<wsdl:operation name="t2">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="inputt2Request">
<soap:body use="literal"/>
<wsdl:output name="outputt2Response">
<soap:body use="literal"/>
<wsdl:fault name="faulttestResponse">
<soap:fault use="literal" name="faulttestResponse"/>
<wsdl:service name="test">
<wsdl:port name="testPortTypePort" binding="tns:testBinding">
<soap:address location="PUT ACTUAL ADDRESS HERE"/>


netbeans has this warning:

[WARNING] name attribute on wsdl:part in Operation "t1" is ignored. Its not allowed as per WS-I AP 1.0.
line 49 of file:/C:/NetBeansProjects/sample_projects/VS/src/conf/xml-resources/web-services/VS/wsdl/test.wsdl

[WARNING] name attribute on wsdl:part in Operation "t1" is ignored. Its not allowed as per WS-I AP 1.0.
line 52 of file:/C:/NetBeansProjects/sample_projects/VS/src/conf/xml-resources/web-services/VS/wsdl/test.wsdl

[WARNING] Check the abstract operation "t1" binding, part "attachment" has multiple binding. Will try to generated artiffacts anyway...
line 17 of file:/C:/NetBeansProjects/sample_projects/VS/src/conf/xml-resources/web-services/VS/wsdl/test.wsdl

[WARNING] Ingoring operation "t1": more than one part bound to body
line 15 of file:/C:/NetBeansProjects/sample_projects/VS/src/conf/xml-resources/web-services/VS/wsdl/test.wsdl

if i take away the attachment part of the t1 operation and make this like the t2 operation it builds all operations just fine, is there something different I need to do in order to use attachments?

Srini - thanks for all the tips and that sample code you sent me. As for my code, the handler isn't the issue, but I think my Sun Java AppServer 8.2 has some incorrect soap library. (so I will have to look into that)

I did try to implement the J2EE version 5 with Annotations, and a handler web service using weblogic 10.3.2 and I can successfully build/deploy/and run my web service.
I can even view SOME aspect of the header info, although I still have to make it print the correct data. (have to manipulate the soap message methods...painful...oh well)

I have projects that deal with both sun app server AND weblogic, so it's good for me to try both ways.

if you all know of some good tutorials for reading parts of a soap header for authentication purposes, it would be wonderful if you'd post them.
(but if not i'm just shouting out a thank you for all the tips reguarding this)

Cheers! Lavanya
13 years ago
ok, so I think I'm going in the right direction now....

in my handler class:

apparently this is where if gets the header from your soap request, however header.toString() returns null....
(by the way, I added writeOut(test4), it just creates a file so I can see where the program is getting to)

SO...header is null, which as I read the tutorial site posted I have to register each header and assign it to a qname.
(see "Adding a SOAP Header Block To a Handler" in

any ideas how to do this? the editor I use is netbeans 6.8 so slightly different then the one in the tutorial...

starting to get there....Lavanya
13 years ago
Thanks for posting those links Srini, I think from them I need to just creat my handler class and configure it in webservice.xml file.

when I do this I get an error at run time. (after I post request to service using soapUI)
this happens after I add the handler entry in the webservice.xml file. (the handler class itself builds)

do we have any sun java app server 8.2 experts that have seen something like this before?

error is:

Log Level: SEVERE
Logger: com.sun.xml.rpc.server
Name-Value Pairs: _ThreadID=25;
Record Number: 3099
Message ID: Can't overwrite cause java.lang.IllegalStateException
Complete Message
Can't overwrite cause at java.lang.Throwable.initCause( at com.sun.enterprise.webservice.EjbContainerPreHandler.handleRequest( at com.sun.xml.rpc.client.HandlerChainImpl.handleRequest( at com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers( at com.sun.xml.rpc.server.StreamingHandler.preHandlingHook( at com.sun.xml.rpc.server.StreamingHandler.handle( at com.sun.enterprise.webservice.EjbWebServiceDispatcher.handlePost( at com.sun.enterprise.webservice.EjbWebServiceDispatcher.invoke( at com.sun.enterprise.webservice.EjbWebServiceValve.dispatchToEjbEndpoint( at com.sun.enterprise.webservice.EjbWebServiceValve.invoke( at org.apache.catalina.core.StandardPipeline.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.core.StandardPipeline.invoke( at org.apache.catalina.core.StandardEngineValve.invoke( at org.apache.catalina.core.StandardPipeline.invoke( at org.apache.catalina.core.ContainerBase.invoke( at org.apache.coyote.tomcat5.CoyoteAdapter.service( at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess( at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process( at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask( at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask( at at

notes: I am using netbeans 6.8, I right click the webservice, click "configure handlers", click "add" and select my handler class that I have put in it's own src folder next to the src folder for the code for the webservice.

13 years ago
so I'm still exploring this, looks like Srini's code for the sample webservice using Annotations via j2ee 5 or higher is the way to go.

Instead of using this...arguably better...approach, is there a way to add a handler to a webservice deployed to sun java app server 8.2 using j2ee 1.4. No annotations, jdk 1.5. In the form of an ejb jar file.

I have a small webservice working which takes in a string, appends text to it, and prints the resulting string. (this I am trying to add the handler to)

if anyone knows of good tutorials for this, please post one, thanks.
13 years ago
srini thanks for the reply!

my goal, for now that is, is to print the soap username/password to a file.

sounds like you have figured this out, is this just a small webservice example for printing out text such as Hello World?

could you send me the code so I can take a look at how you did it?
It would be helpful to see how your sample project is layed out, do you just add the handler stuff to the web service project?

if I get you correctly, once I have a web service (and I have one that simply takes in 2 numbers and addes them and returns the result), there are ONLY 2 things required?

1. the handler class file

2. the handler xml file

thanks! Lavanya
13 years ago
I am having troubles creating a handler to intercept the header information in my soap message.

my service works fine without the handler, but when I add the handler I get errors in the sun java app server 8.2 logs.

the service takes 2 numbers in the soap request, and adds them, and then prints the result in the response.

then I put in the webservices.xml file:

and I add my handler class to the project: (just a lot of print statements for now)

a snap shot of the log is here: (this occurs when I try to submit a soap request in soapUI to the service)

2012 SEVERE caught exception while preparing response: java.lang.ClassCastException: com.sun.xml.internal.messag...
(details) com.sun.xml.rpc.server Aug 19, 2010 15:44:10.328 _ThreadID=22;
2011 SEVERE caught exception while handling request: java.lang.ClassCastException: com.sun.xml.internal.messagin...
(details) com.sun.xml.rpc.server Aug 19, 2010 15:44:10.328 _ThreadID=22;
2010 SEVERE caught exception while handling request: java.lang.IllegalStateException: Can't overwrite cause
(details) com.sun.xml.rpc.server Aug 19, 2010 15:44:10.312 _ThreadID=22;
2009 SEVERE Can't overwrite cause
at java.lang.Throwable.initCause(
at com.sun.enterprise.w...
(details) com.sun.xml.rpc.server Aug 19, 2010 15:44:10.296 _ThreadID=22;
13 years ago
I have a small jsp for weblogic 10.3.2, it needs to upload whatever jar file I choose onto the server on my jsp page. but the upload corrupts the file.

for example the DynamicProperties.jar that you can get on the web is 2.45kb and weblogic or my code is corrupting this and the size is 2.47kb.

this same program works on sun java app server 8.2, and in standalone mode where I copy the jar from location A to location B

anyone have any ideas on how weblogic might be adding stuff to the jar file?

13 years ago
Hi all, if any of y'all have suggestions, let me know cause i'm stuck here.

I have a greek word "Σεπτέμβριος" (= "September" fyi), my goal is to use each character in the string to match it to the the first character in a line from the file (which will be stored in an array)

example: i hit the "Σ" in the string, after reading file I iterate through the array and find the line that matches, in this case "Σ=\u03a3".

I then use the string part from the array (example "\u03a3") to create the encoded version of the greek word for "September".

once I make this, I write it to a file and I will see "Σεπτέμβριος" in the file.

I have already proved that if I write "\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2", I will get the output I need.

the issue: it has a problem comparing the greek letters read from the file. I can write UTF-8 form, how can I read in it? how can I successful read a greek character?

13 years ago

thanks for the tip. systimestamp is obviously what I needed to use.

you're right, I didn't need to be converting the format using TO_CHAR.

my query was not right either, but after some extensive analysis I managed to get one that works I think. (only time and debugging will help me know)

13 years ago
Christophe, thanks for the reply, PM obviously works great for both. what I had read was that you could append 'TT' or 'tt' or 'AM (or PM)' or 'am/pm', but none of those seemed to work.

your post helps me print our ALL records in the given format:

select TO_CHAR(processing_starttm, 'MM/DD/YYYY HH:MI:SS.FF PM') from SRVC_TXN_DATA

But when I create the statement below I get a date format error.
do you know why I would be getting a date format error when I use the same format as yours but in a "between" clause?
I am trying to get all records between timestamp of sysdate and 7 days prior.

SELECT operaton_name,user_id,message_id,status,processing_time FROM SRVC_TXN_DATA WHERE TO_CHAR(processing_starttm, 'MM/DD/YYYY HH:MI:SS.FF PM') BETWEEN TO_CHAR(sysdate, 'MM/DD/YYYY HH:MI:SS.FF PM') AND TO_CHAR((sysdate-90), 'MM/DD/YYYY HH:MI:SS.FF PM')

13 years ago
what is the format for this kind of date: 12/13/2010 17:14:23.220000 PM ?

I can't seem to find any chart with that on it?


ps - I can do this: MM/DD/YYYY HH:MI:SS:FF but how do you get the AM/PM on it?
13 years ago
for this soap request body:

how do I set the attributes/properties "SourceID" & "Source" & "schemaVersion" in the code below?
I see how to specify attributes like name/type/maxOccurs/etc...but not how to set a custom attribute that my soap request needs.

thanks, Lavanya