• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

JBoss client to soap encoded operation

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to make a web service client call from a web app running in 4.2.3 JBoss. The web service uses soap encoding.

I have read that JAX-RPC from JWSDP is one of the only libraries that implements soap encoding so I have tried to use it.

I have included JWSDP JARs[1] in my EAR's lib directory, but when I call the JAX-RPC generated stub from my web app, my stub calls into StreamingSender and ultimately gets a ClassCast Exception:

Can anyone suggest how I can get JWSDP 1.6 JAX-RPC to work in JBoss 4.2.3?

Or failing that, is there some other way to call a SOAP encoded method from a web app running in JBoss 4.2.3?

Thanks!

[1]The jars from JWSDP 1.6 I included in my EAR's lib are: activation.jar, commons-beanutils.jar, commons-collections.jar, commons-digester.jar, commons-logging.jar, dom.jar, jaas.jar, jax-qname.jar, jaxp-api.jar, jaxrpc-api.jar, jaxrpc-impl.jar, jaxrpc-spi.jar, mail.jar, namespace.jar, relaxngDatatype.jar, saaj-api.jar, saaj-impl.jar, sax.jar, xercesImpl.jar, xsdlib.jar
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It may actually be easier to use Axis 1.x (Simple Webservice on JBoss using Axis - this article dicusses the server-side aspects on 4.0.4, not the client-side) - though it may not be entirely smooth affair either.
 
Glen Scott
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Peer for the suggestion. Assuming no-one else has a more direct suggestion/solution, I will take a look at using AXIS.
 
Glen Scott
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peer's idea was fruitful. With the guidance of another JavaRanch bartender's tutorial, Jaikiran Pai, at http://jaitechwriteups.blogspot.com/2006/12/simple-webservice-on-jboss-using-axis.html which admittedly was written for JBoss 4.0.4, but in comments seemed to indicate Axis 1.4 would work on JBoss 4.2.x, I was able to get a client web service running that uses soap encoding including for soap encoded arrays (particularly unsupported it seems, since some previous versions of JBossWS did support some elements of soap encoding, but not arrays).

For those following in my footsteps, to get a client to work, I simply put the following JARs from Axis 1.4 in my EAR's lib directory:
axis.jar, axit-ant.jar, commons-discovery-0.2.jar, jaxrpc.jar, saaj.jar, wsdl4j-1.5.1.jar

No modifications were necessary to the JARs included in JBoss libs nor to the configuration of any classloader.

Do take note that if one tries to use Axis 1.4 to implement the server for a web service, some extra configuration seem to be necessary. In my case, I only needed a client so the above JARs in the EAR's lib were enough. But since I was following Jaikiran's tutorial quite closely for the initial part, and it does take you down the path of enabling a server, I did encounter and come up with a solution for enabling a server. I found that the compiler was not able to find J2EE classes in the compiler's classpath, which I fixed by copying jboss-j2ee.jar and servlet-api.jar from the JBoss default server's lib directory to my EAR's lib. As to whether this is the "right" thing to do to enable a server, I'm not sure, but I didn't try too hard since it wasn't part of my goal.

Thank you Peer for the suggestion!
 
Water proof donuts! Eat them while reading this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic