Discussions

XML & Web services: weblogic webservice with user defined exceptions

  1. I want to hear from someone who's used weblogic's webservice technology to create a web service.
    I have got one up and running using weblogic 8.1 by using the servicegen and clientgen ant tasks on top of a stateless session bean.

    I can't get user defined exceptions to work however.
    The obvious first step was to throw a user defined exception from my ss-bean method & run servicegen.
    An ear file is successfully created.
    I deploy the ear file, and look up the WSDL file on the server.

    The WSDL file does not contain a complex type corresponding to my exception and the message refering to my exception has it's part with a String type.

    At this point, I know it's not going to work.
    I run clientgen, it does show my method throwing my user defined exception, however the bean properties are missing.

    Can anyone help me?
    If anyone has an ear file that works in this way, can you please send it to me? de_bone_ranger@yahoo.com

    Threaded Messages (1)

  2. Try WSDL first ?[ Go to top ]

    Maybe if you write WSDL first (properly referencing schemas you want for fault messages) and then generate both proxy and service they will both have right bean properties. I haven't tried it for WLS but it works for WAS.

    Either way if you are doing everything correctly it's a bug in WLS. The JAX-RPC compliant implementation should map exception properties to comlex type elements both ways.