jagan raja

Ranch Hand
+ Follow
since Jan 29, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by jagan raja

Hi All,

After some debugging I found out that the usage of <xs:choice/> in one of my referred xsd (crm:zzzInput) was creating the problem.

But still havent found a workaround.
12 years ago
Hi All,

I am trying to create client jar using the following snippet,



My wsdl refers to the below xsd,



When I try generating the jar I get the warnings as,

[clientgen] WARNING: Unable to fully map ['http://url']:zzzInput using javax.xml.soap.SOAPElement
[clientgen] WARNING: Unable to fully map ['http://url']:xxxInput using javax.xml.soap.SOAPElement
[clientgen] WARNING: Unable to fully map ['http://url']:yyyInput using javax.xml.soap.SOAPElement
[clientgen] WARNING: Unable to fully map ['http://url']:request using javax.xml.soap.SOAPElement

In my jar the classes gets generated with javax.xml.soap.SOAPElement as the argument and I dont find the classes based on xxxInput,yyyInput and zzzInput.

Is there any way to specify or do a mapping to get the desired classes.

On the other hand everything works fine with the below task,


But for reasons we are supposed to use the clientgen task as given in the snippet.

Could any one please help me out in this.
12 years ago
Hi Vijitha,

Please find the build snippet,
12 years ago
Hi All,

I am trying to invoke webservices through DII approach and followed some samples which are provided.

Most of the samples provided passes String datatype as input and recieves the same datatype as output.

In my case I want to pass a request bean object and get back a response bean object.

I was able to invoke the wsdl using the classes provided in SAAJ api but not using rpc.Call class.



SampleInput and SampleOutput are the request response classes which has got only the getters and setters. When using the SAAJ classes these classes were not used.

When I execute the above snippet I faced a error as below,

javax.xml.rpc.JAXRPCException: failed to invoke operation 'getDefaultRechargeValues' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize class com.sample.SampleInputweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}]StackTrace[

javax.xml.soap.SOAPException: failed to serialize class com.sample.SampleInputweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:339)
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:304)
at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:651)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:209)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:146)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:473)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:459)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:569)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:422)
at com.sample.SampleDynamic.testService(SampleDynamic.java:112)
at com.sample.SampleDynamic.main(SampleDynamic.java:55)
Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}


I am not sure where I have gone wrong.

Thanks
12 years ago
Hi Vijitha,

I have gone through that link a lot number of times.

The top down aproach works fine for me, wsdlc task generates the necessary artifacts into a jar file.

The problem is when I try the bottom up approach.

Eclipse makes everything easier, I created the java file in a webservice project included it into the ear project and gave run on server which creates those artifacts automatically in the build folder.Also, I am not able to figure out how eclipse creates those classes.

But not while using the build script(jwsc task). Jwsc task creates a war file with deployment descriptors and the implementation class.

How do I generate the Request, Response classes which eclipse creates by default when run on server?

Thanks
12 years ago
Hi All,

Just to add info.

I googled out and tried out the "apt -XPrintFactoryInfo -XPrintAptRounds -XListAnnotationTypes <mypackage/implementation_file.java>" and it generated all the artifacts as java files in the package mypackage.jaxws.

I am not able to figure out whats happening.

I am trying to get the exact classes(artifacts) using my build script as i mentioned above.

Thanks in advance.
12 years ago
Hi All,

I am trying to create a webservice using bottom up approach.

So, I gave the implementation file as input to jwsc task and executed the ant script.

The war file is generated and the build script din't throw any errors.

The warnings which were thrown were,

[jwsc] warning: Specified AnnotationProcessorFactory, 'com.sun.istack.ws.AnnotationProcessorFactoryImpl', not found on search path.
[jwsc] warning: No annotation processors found but annotations present.


The build script gives me only the implementation class. The artifacts are not generated.

I am using weblogic jar for jwsc task. I tried with wsgen from command prompt and got the below error,

Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.NullPointerException
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalType(WebServiceVisitor.java:770)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalMethod(WebServiceVisitor.java:618)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.methodsAreLegal(WebServiceVisitor.java:588)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalImplementation(WebServiceVisitor.java:506)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.shouldProcessWebService(WebServiceVisitor.java:309)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.visitClassDeclaration(WebServiceVisitor.java:112)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(Clas
sDeclarationImpl.java:95)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.b
uildModel(WebServiceAP.java:315)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.p
rocess(WebServiceAP.java:256)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.
process(AnnotationProcessors.java:60)
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.ja
va:204)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:112)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)
error: compilation failed, errors should have been reported


With the weblogic server running and using eclipse I was able to generate those artifacts, but not with ant build or using wsgen.

Please help me out if I have missed out something.

Thanks.
12 years ago
Hi All,

I have created a singleton service class by implementing "weblogic.cluster.singleton.SingletonService" and deployed this as an ear in weblogic 10.3.

Deployment is done on a cluster(ManagedServer1,ManagedServer2).

The activate method gets invoked on only of the server ManagedServer1 and necessary actions are taking place. When ManagedServer1 is brought down how to migrate this action to ManagedServer2.

When ManagedServer1 is down, the ear is in ManagedServer2 and the activate method is called and its running as infinite loop.

When ManagedServer1 is up everything works fine.

Not sure where I have gone wrong.Could anyone please help me out
13 years ago
Hi All,

I am new to JSF and I am trying to create a simple JSF application.

I have created a UserBean. But when I try to compile it, I get the following error.

src\com\register\UserBean.java:5: cannot access javax.faces.application.FacesMes
sage
bad class file: C:\Documents and Settings\jagan\JSFReg\web\WEB-INF\lib
\jsf-api.jar(javax/faces/application/FacesMessage.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
import javax.faces.application.FacesMessage;
^
1 error



My CLASSPATH is C:\Documents and Settings\My Documents\Downloads\servlet-api-2.5-6.1.4.jar;C:\Documents and Settings\jagan\MyStruts\struts.jar;C:\Documents and Settings\My Documents\Downloads\jarrrrrr\sqlitejdbc-v056.jar;C:\Documents and Settings\jagan\JSFReg\web\WEB-INF\lib\jstl.jar;C:\Documents and Settings\jagan\JSFReg\web\WEB-INF\lib\standard.jar;C:\Documents and Settings\jagan\JSFReg\web\WEB-INF\lib\jsf-impl.jar;C:\Documents and Settings\jagan\JSFReg\web\WEB-INF\lib\jsf-api.jar;

My PATH is C:\Program Files\j2sdk1.4.2_02\bin

My JAVA_HOME is C:\Program Files\Java\jre1.6.0_04

I faced similar kind of problem while trying to deploy my servlet application. I simply changed the servlet-api jar and it works fine.

Can any one say where I have gone wrong?

Thanks in advance!
14 years ago
JSF
Hi Bibeault,


So using isNew() doesn't confirm if a client has joined the session.

Thanks for your information.

14 years ago
JSP
Hi Clark / Bibeault ,

Thanks for your info. I shall try using Filter for authentication.

And Bibeault, can I know why I shouldnt be using isNew()?

And authentication token in the sense do I want to set a attribute in a session and check for that in my jsp?

14 years ago
JSP
Hi All,

I have got Login.jsp and Index.jsp in my application.

When I enter the URL for Index.jsp it redirects me to the Login page.

I have included the following lines in my Index.jsp



Once I login, I create a session in my LoginServlet.java.

Now I have got a Logout link in my Index.jsp which when clicked takes to the Login page.



How to invalidate the session once I click the Logout link?

Thanks in advance!

14 years ago
JSP
Hi Maneesh / Lorance,

I dint use ant to create my .war file.

I created the War file using \jagan\MyServlet>jar cvf MyServlet.war .

I just want to exclude my .java files.

I have created the directory structure correctly as mentioned by Lorance.

Is there any way for excluding .java files ? If so help me out!
14 years ago
Hi All,

I had successfully created a .war file and deployed it in the JBOSS server.

When I open my WAR file I am able to view all my .class, .java, .jsp files.

Is there any way to include only my .class files and is it appropriate doing so?

If it can be done and if my approach is correct can any of you help me out in this.

Thanks in advance!

14 years ago
Hi All,

I have created a simple application.

It asks for an username password, once given it takes me to the Index Page.

Now I wish to learn & use session in my application.

For a given period of time as specified in web.xml, I should be logged in. Then the session should get invalidated.

I wish to know the usage of session.

How to effectively use sessions in my application?

Thanks in advance.
14 years ago