Shailesh Welankar

Ranch Hand
+ Follow
since Dec 30, 2002
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 Shailesh Welankar

We are using Maven and Jenkins for our automated Build and Deployment needs. Our Build Engineer has left and it is now up to me (not a build engineer) to implement a few remaining stuff. I tried a lot of things to resolve this issue we are having. The problem statement is -

We have made a separate project in Eclipse to store properties files. The Developers check-in the properties file into SVN once they make any changes to it. Now we want that Maven, when triggered to do a deploy, to do the following -
1. Take the latest properties files from the SVN from the project used to store properties files.
2. Copy the same onto the Linux based JBoss App Server's /conf/ folder
3. Carry on with its deployment task.

We would like to have solution to point 1 and 2 above.
12 years ago

Further to Ulf's explanation, to answer your specific question, Web Services can publish their services (and methods / contracts) using UDDI. This contains information like the Organization hosting the services, the service names, method names, description of services and the WSDL URLs. The clients who want to access this have to query the UDDI registry (clients of course do need to have knowledge of the registry itself) and get to the required service.
That said, this is not at all compulsory. Many time, what happens is that once the service is found out (by physically locating it OR by sharing it across teams) clients stubs are generated and the method calls are given - All that matters then is the WSDL / URL to the WSDL.

Hope I have answered your question there.

13 years ago
Hello Fellow Ranchers

I am trying to generate client stubs using Axis2 wsdl2java (with v1.4, v1.5 as well as v1.5.1) for a Web Service WSDL that is hosted on Linux machine over SSL (https). The JDK am using for this is JDK5.0_22

While the http version works perfectly fine, the https version gives me the following error (I HAVE got the respective security cert in Axis2's cacerts file, and thats NOT the issue).

I can see the Auth.xml reference at message level in the WSDL file as follows -

I have found this thread from Axis2 JIRA
which mentions the same doubts as I have stated above (no support for message level Security Policies in Axis2 as yet), but just wanted to confirm from anybody having faced similar issue that my claims are valid. And also if there is any work-around for this? Currently I am using XML payload based client interactions (SOAPMessage requests) to interact with the service, but wanted to to have dynamic interactions going forward as far as possible.

Thanks in advance. Please do let me know.
13 years ago

OK!! I have got a partial solution / workaround for this - I was using Eclipse Ganymede(v3.4), so I made a fresh installation of Eclipse Galileo (v3.5) which comes pre-installed with WTP plugins and JEE plugins. I added a new site for the JBoss Eclipse Tools for Galileo and pointed it to the URL :

When the sub-sections list appeared with selections to be made for installs, I ONLY selected the Hibernate Tool from the section named "All JBoss Tools - 3.1.0.v201003050540R-H56-GA" and installed only that tool. I was not needed to install any other plugin and once I did an Eclipse restart, I am now able to get the Hibernate perspective in Eclipse!! I am still navigating that and learning along the way.

So that has partially answered my question - listing this solution for anybody else having the same issue.
Still if you have any other Tools that you use for Hibernate3 auto-code generation, I would be glad to hear from you.

Hi Fellow Ranchers

I have worked extensively on Hibernate2 till about three years back. Now I am required to work on Hibernate again, but this time we are using the latest Hibernate v3.5.

We used to generate the schema, domain and hbm files by using Hibernate Tools in Hibernate2. But, now I am unable to find anything similar for Hibernate3.
The Eclipse JBoss (Hibernate is now a part of JBoss) plugins wont work for me - Some Eclipse issues.
My question was - Are there any Tools (command-line based) for auto code generation in Hibernate3 that any one of you use. If so, please let me know. I tried searching the net and this forum for the same but could not find it, so I am wondering how other guys go about writing their mapping classes and XMLs in Hibernate3?!!
I might be missing something - Do the annotations come into picture which somehow make auto-code generation useless in Hibernate3??

thanks in advance!

P.S.> I can refer to Hibernate3 book, but I don't have access to it as of now and it may or may not contain this. The online documentation on Hibernate website does mention Tools but thats with Eclipse / Ant, which is not working for me.

Hi Ivan

Thanks for the note - good observation!! I forgot to clarify that!!

You can buy the Whizlabs test ( I found their tests to be very useful and effective. They have some good number and quality of questions in their exam suite. Also, they have categorized their exam as Diagnostics, Practice, Objective wise and Final exam which helps in validating our knowledge level in each phase of the exam preparation.

All the best!!


You can certainly try the SCDJWS exam before SCWCD. But, I have encountered some EJB/Servlet/EAR,WAR packaging related questions in the SCDJWS exam and mock exams (to answer your exact questions - none on JSP though). As long as you are prepared to answer those without reading the material related to SCWCD / SCBCD exams, you should be OK.
Fellow Ranchers

I am pleased to announce that I cleared the SCDJWS 1.4 today with 79% score!!

Study pointers -
- Studied for 1 month (have 2+ years of experience developing JEE Web Service) for 2 hours each on weekdays and 4 hours over weekends.
- Read the books J2EE Web Services by Richard Monson-Haefel and the Buildling Java Web Services - making sense of XML, WSDL, UDDI, SOAP, SAAJ, JAX-RPC.
- Solved all the purchased exams on the SCDJWS site at least thrice each.

I had unbelievable number of JAXR and UDDI (probably like 15-20) questions!! Only couple of Design / Patterns questions.
Hope this helps other people planning to take this exam.
Cheers !!
13 years ago
OK!! I found out the solution to this on my own. Below is the listing for others to refer if they are having similar issues -

The solution is that, the <j2ee:param-type> tag will contain the value:

But, within the jaxrpc mapping XML file, have this entry to define the String Array:

while the WSDL will have the mapping for this as:

and the Request definition for the method will be defined as:

You can similarly have Array of objects (domain objects) defined, but instead of java.lang.String[], have the fully qualified class path for the domain class, like:[].

Hope somebody finds this useful - I had a hard time getting this information from the net, but did not find anything there.
This issue is faced if you use Eclipse (not BEA WorkShop with a WebService Project, which generates the mapping files automatically when you export the project as EAR for deployment), but do not have any tools like wstools, wsimport etc configured into your Maven/ANT within Eclipse and are stuck with writing the JAXRPC mapping file on your own and have complex objects like String/Object Arrays as the params.

14 years ago
I have never tried this, but most probably, because you have both the NS "qm" and "qbm" pointing to the same location there might have been an ambiguity with Axis2. When you specifically mentioned the NS "qm" to it, Axis2 was OK with it and it generated the Java code.
Go ahead and work out with the client stub generated - I dont think there will be any major issues just by changing the NS which are the same anyways.
So I guess your issue is resolved?
14 years ago

Just consider the "s0" that I mention as NS to be "wsdl" in your case (i did a copy-paste without find-replace)
What i wanted to say was change your code *based* on the entries in my point #2. So even the s1 NS prefix in my code should correspond to what you have.

Coming back to your issue, so the WSDL is definitely not validated, at least not to the liking of Axis2 v1.5.
We need to focus on that - But the WSDL validation error you are receiving certainly beats me!
One thing I can see in common with both the errors you have received is that some how v1.5 does not like the xsd defined externally ... can you try making the xsd declarations inline (as I have mentioned in my point#1) and give it a shot.
14 years ago

I am sorry, I overlooked the schemaLocation="../schema/QM.xsd" entry in your WSDL and assume that your type declarations in the xsd are proper.
In that case, disregard my point #1. You can have a look at point #2 and try it.
14 years ago

Your WSDL looks incomplete to me. You may try this and let me know -
1. Add (define) the elements QuoteConfigRequest and QuoteConfigResponse within your <wsdl:types> tags.
Something like :
<xs:element name="QuoteConfigRequest ">
<xs:element name="requestID" type="xs:long"/>

<xs:element name="QuoteConfigResponse">
<xs:element name="return" type="xs:string"/>

be sure to mention the targetNamespace value properly in the <xsd:schema> tag.

2. Your <wsdl:message> tags seem wrong (are you validating this WSDL file before running through wsdl2java??).
Change it to look something like:
<s0:message name="QuoteConfigRequest ">
<s0:part element="s1:QuoteConfigRequest " name="parameters"/>
<s0:message name="QuoteConfigResponse">
<s0:part element="s1:QuoteConfigResponse" name="parameters"/>

Hope this solves you issues and I was able to understand and explain your problems correctly.
Axis2 wsdl2java is pretty error proof for simple WSDLs like yours. Have your WSDL validated once before you send it to wsdl2java (if you are not already doing it) and you should not have any errors.
14 years ago

You will need to generate a client to access the service with the WSDL provided.

Use Axis2 or CXF to generate the client. I find Axis2 simple enough to jump start the client stub generation and web service access.
Download the Axis2 v1.5 binary distro from their Apache site [ ] and unzip on your local drive.
Set the JAVA_HOME and AXIS2_HOME path on your PC. Run the wsdl2java bat file in the bin folder of the Axis2 home directory.
You will need to provide the output directory and WSDL URL to it as parameters. The client stub would get generated in the specified directory.
Copy this files in your project (if not already there) and place in some logical project directory hierarchy (like a client sub-folder of your class files st6ructure).
Then you will need to create the ClientController class. This class will have the logic to give actual calls to the client stub and will be used from within your other classes that implement the business logic. The code in the ClientController class to give service calls follows the steps as below -
1. Get the request object from the generated client stub. This is usually named as <ServiceName>ServiceRequest. (make sure you have the generated client stub imported in this class).
2. Provide any request parameters to it by using setters.
3. Get the stub object in similar fashion as Request object and set the requestHeader object (can be null) and the request object to it.
4. Using this stub object, give a call to the remote service (you may want to set the URL of the service in the constructor firstly), and collect the return object in some variable with an appropriate datatype.
5. You now have the response - use it any way you like it !!! Its that simple !!

Hope this helps you and I have understood and answered you question properly.

14 years ago