M Streit

Greenhorn
+ Follow
since Jan 16, 2004
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 M Streit

These 2 very recently published books have been very helpful:

Java Web Services: Up and Running
A quick, practical, and thorough introduction
By Martin Kalin
http://oreilly.com/catalog/9780596521127/


and

Java SOA Cookbook
SOA Implementation Recipes, Tips, and Techniques
By Eben Hewitt
http://oreilly.com/catalog/9780596520724/
14 years ago
I am hoping someone else has seen this issue before.

I have JAX-WS endpoint service that has a method:



The hand coded BookOrder class looks like this:




We want to be able to compile our Java Bean objects into a "shared jar" that can be used by both the Client and Service sides of the wire - this is unusual, but in this case, the project owns both ends of the wire so they want to enforce consistent use of these objects. In the case of custom java classes, this approach works fine as we have done it w/o a problem as long as none of the classes use Map types (like HashMap).


The generated version of BookOrder.java looks like this (below) - (after running wsimport pointing at the WSDL served back from the running endpoint service). Of course the generated ObjectFactory.java file is based on this "generated" version of the Java bean classes. Now the BookOrder.java in the shared jar file and this generated BookOrder.java are different in that wsimport and JAXB have created a class w/ some inner class constructs to handle the ORIGINAL HashMap defined. This is where the problem occurs because when attempting to compile the client side code, we run into issues all resulting from this DIFFERENCE in mapping.

(removed most of the generated COMMENTs to shorten this post - it's already long enough :-) )




The XML schema generated when the service endpoint was deployed (in addition to its WSDL) had the following definition for BookOrder:




Is there any way, using a custom binding file passed to wsimport to force the client-side generation process to end up with consistent classes such that the generated ObjectFactory.java can still work w/ our "shared" compiled JAR file containing our hand-coded BookOrder.java class? In other words, can we get the client-side generated BookOrder.java to match the original? I'd appreciate any suggestion or example where someone may have done this...assuming it is even possible.

In general, if we have Arrays or List types, none of this is a problem...but w/ Map types, it falls apart.

Thanks in advance.

14 years ago
I will check that out...but I don't think those are factors. So... is it safe to say that YOU have seen this actually work yourself. I can deploy to every other server except WAS 6.1 w/o errors.

Thanks
[ October 01, 2008: Message edited by: M Streit ]
I am testing some development options using Netbeans 6.1. I have WebSphere 6.1.0.19 installed on this machine and have configured a new server within NB 6.1 that "points" to the Websphere instance. It is based on choosing the "IBM Websphere Application Server V6.1" connector (server). I am able to start and stop the server without any issues - and open a browser outside of NB 6.1 to access the Admin console. At first I was doing a Web Service project and thought the issue was with it specifically - so I created a brand new project - simple Hello World web application w/ just an index.jsp. I set the Run property to use the newly configured IBM Webspher App Server 6.1 instance. I started up the server. I can right click on the Project and choose Clean and Build ... build is successful. However as soon I choose Run or Undeploy and Deploy...all I get is a Deployment failure. (so it was not specific to my previous web service project either). The errors in the console output in NB 6.1:




I did find the following in the IDE log (Netbeans):

SEVERE [com.ibm.ws.management.application.j2ee.deploy.spi.factories.DeploymentFactoryImpl]: ADMJ1002E
INFO [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]
java.lang.IllegalStateException: This operation is not possible on a disconnected deployment manager
at org.netbeans.modules.j2ee.websphere6.WSDeploymentManager.getTargets(WSDeploymentManager.java:938)
[catch] at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargetMap(ServerInstance.java:517)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargets(ServerInstance.java:490)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.initCoTarget(ServerInstance.java:1499)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.access$200(ServerInstance.java:101)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance$1.run(ServerInstance.java:383)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

This implies that the server is not running - but it is...

I have spent hours on Google, finding nothing...

Any ideas would be appreciated...Thanks
There is an outstanding book out there by Richard Monson-Haefel:

http://www.awprofessional.com/title/0321146182

and you can get a sample chapter at: http://www.awprofessional.com/articles/article.asp?p=169106

http://www.amazon.com/gp/product/0321146182/103-4176329-2569462?v=glance&n=283155&n=507846&s=books&v=glance

I have a handful of WS books and this one is by far THE best
18 years ago
There is an outstanding book out there by Richard Monson-Haefel:

http://www.awprofessional.com/title/0321146182

and you can get a sample chapter at: http://www.awprofessional.com/articles/article.asp?p=169106

http://www.amazon.com/gp/product/0321146182/103-4176329-2569462?v=glance&n=283155&n=507846&s=books&v=glance

I have a handful of WS books and this one is by far THE best
18 years ago
I'm not sure that I'm understanding the question...but there are a number of articles on how to map WSDL to UDDI registries.

http://www-128.ibm.com/developerworks/webservices/library/ws-udmod1/
http://www-128.ibm.com/developerworks/webservices/library/ws-wsdl/
http://www.systinet.com/download/wp_WSDL_to_UDDI.pdf
http://www.burtongroup.com/promo/downloads/pdf/AnneManes0804.pdf
http://webservices.sys-con.com/read/39868.htm

AND finally the technical note that started all of this:

http://www.oasis-open.org/committees/uddi-spec/doc/tn/uddi-spec-tc-tn-wsdl-v2.htm

Not sure this is what you are looking for but figured I would post it...
18 years ago
You might also check out:

http://www.nabh.com/

for info on open source portal solutions.
18 years ago
WAS server is not the issue. The question is again, running Axis client stub classes from within a simple servlet that is part of the client application talking to a web service running somewhere else, possibly WAS. The server end is not in question. It is the CLIENT side of the equation that may be at issue.

Thanks
18 years ago
I have a web service deployed in WAS on one machine and I have used the WSDL file to generate Axis 1.1 client classes using the Axis WSDL2Java tool. I want to run a client app from another machine where the client will be a servlet running in Tomcat or possibly JRun. The generated code includes the usual *ServiceLocator and *ServiceBindingStub classes. If I wanted to instantiate these classes, say from inside a servlet (the client using the service) can these generated client classes be instantiated once in the init() of the servlet and used in a thread-safe manner?


Thanks in advance for any input.
[ August 20, 2005: Message edited by: M Streit ]
18 years ago
Sue,

You might find the following useful as well:

http://www.coreservlets.com/Apache-Tomcat-Tutorial/

And there are probably no better books on the subject of servlets/jsp (tutorial type) than Kathy Sierra and Bert Bates' book: http://www.amazon.com/exec/obidos/ASIN/0596005407/qid=1108089062/sr=2-1/ref=pd_ka_b_2_1/104-2470500-1671162
and Marty Hall's book:
http://www.coreservlets.com/#CWP2

Also check out:


Hope you find these helpful...

Mark
19 years ago
Here is a really good book on Java Web Services...very detailed and covers quite alot of material.

http://www.amazon.com/gp/product/customer-reviews/0672326418/ref=dp_item-information_0/102-1777325-8897722?%5Fencoding=UTF8&n=283155&s=books

The SECOND edition is the one to get. Some of the review comments about material being dated refer to the FIRST edition. The link above is for the 2ed.

Also the J2EE 1.4 Tutorial UPDATE 3 at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html covers alot of WS ground...keep in mind that the latest Tutorial for JWSDP 1.5 from Sun only covers some added technologies (JAXB, WS-Security, etc) that are not explicitly covered by J2EE 1.4's Tutorial. In fact JWSDP 1.5's tutorial is referred to as an adjunct to the J2EE 1.4 Tutorial's Web Services content.

Hope this helps...
Here is a really good book on Java Web Services...very detailed and covers quite alot of material.

web page

The SECOND edition is the one to get. Some of the review comments about material being dated refer to the FIRST edition. The link above is for the 2ed.

Also the J2EE 1.4 Tutorial UPDATE 3 at web page covers alot of WS ground...keep in mind that the latest Tutorial for JWSDP 1.5 from Sun only covers some added technologies (JAXB, WS-Security, etc) that are not explicitly covered by J2EE 1.4's Tutorial. In fact JWSDP 1.5's tutorial is referred to as an adjunct to the J2EE 1.4 Tutorial's Web Services content.

Hope this helps...