5 Replies Latest reply on Jan 31, 2005 6:24 AM by thomas.diesler

    ws4ee-deployment vs jaxrpc-mapping

    osataken

      i confuse with complex type so long(maybe i'm newbie with this T^T).
      i want a conclusion about these two files and how to manage it???

      the question is if i generate wsdl and mapping file with wscompile i have to generate server artifact (eg. tie class : RequestStruct) and don't worry about ws4ee-deployment.xml, am i right???


      i tried all examples in wiki. they work well but all xml document are generate from axis-ant task. Can anyone give me examples of custom type mapping with wscompile step by step??

      any help would be appriciate.
      thank you very much...

        • 1. Re: ws4ee-deployment vs jaxrpc-mapping
          kanno

          Actually, here's what I've been doing, but I'm sorta debugging as we speak... so maybe this might clear up somethings for yah (or me for that matter).

          - I first generate my Java interface/implementation classes

          - I use an ant task to generate the wsdl / jaxrpc-mapping file

          - From what I can garner, sometimes you have to override the type mappings as supplied by the mapping file generated by wscompile, so you can use a w4ee-deployment.xml file to do custom types, etc. [For arrays, etc]

          - I then war everything up making sure the wsdl, web.xml, jaxrp-mapping, and the webservices.xml file are in the appropriate locations along with any other libs.

          - Copy to deploy directory;

          - Start up JBoss.

          ========================

          As for where I am now, I've done all the above, but it appears that I have an OperationDesc out of sync whenever I try to add a custom type to the w4ee-deployment.xml.

          _RK


          • 2. Re: ws4ee-deployment vs jaxrpc-mapping
            osataken

            thank you kanno,

            i generate wsdl, jaxrpc-mapping and server artifact with wscompile option gen:server and set werb service style as document literal. Anything go well (i can get wsdl from wsdl URL). i can invoke service (business logoc done!!!) via dii client but return type is missing.it still need Client artifacts like "xxxEndpoint_xxx_ResponseStruct" . how can solve this problem. do i need ws4ee-deployment.xml for addittional serialize and remove java-type-mapping tag in jaxrpc-mapping.xml or gen:Client Artifact and deploy it with Client side???

            • 3. Re: ws4ee-deployment vs jaxrpc-mapping
              thomas.diesler

              The reason why ws4ee-deployment.xml is sometimes needed is that the underlying Axis implementation does not look at the XML schema definition of complex types. There is no schema parser in Axis, which I think is a fundamental problem especially with document style webservices where the entire payload is defined by schema.

              ws4ee-mapping.xml tries to breach that gap by telling the marshalling layer exactly how to put complex types on the wire.

              Its best practice to stick to wscompile, the Axis toolset (ant tasks) should be be used.

              • 4. Re: ws4ee-deployment vs jaxrpc-mapping
                osataken

                thank you again Thomas,

                As i understand ,if i don't want to use server and client artifacts (stub and tie class) ... i have to override type-mapping in jaxrpc-mapping.xml with mapping in ws4ee-deployment.xml to serialize custom java bean class.

                am i closing the right way???

                • 5. Re: ws4ee-deployment vs jaxrpc-mapping
                  thomas.diesler

                  wscompile should generate the beans that are used in endpoint operation parameters and map them in jaxrpc-mapping.xml. It should be sufficient.