7 Replies Latest reply on Jan 14, 2005 12:16 AM by Thomas Diesler

    wrapped document/literal

    Yevgen Bushuyev Newbie

      Hi.

      Did i understood correctly from

      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=56424and

      http://www.jboss.org/?module=bb&op=viewtopic&p=3858513

      that JBoss supports only pure document/literal (not wrapped) with single parameter per method only?
      And it is impossible to make it work with messages with several parameters in docl/literal mode?

      wbr, eugen.

        • 1. Re: wrapped document/literal
          Jason Greene Master

           

          "ebu" wrote:

          Did i understood correctly that JBoss supports only pure document/literal (not wrapped) with single parameter per method only?


          Yes wrapped is not supported

          "ebu" wrote:

          And it is impossible to make it work with messages with several parameters in docl/literal mode?


          Yes you can only get one parameter, but that one parameter can be a complex object with the same information you would have in multple parameters.

          So instead of
          public void doSomething(int a, String b, MyObject c){...}
          


          you would have
          public void doSomething(MyMessageObject o) {
           int a = o.getA();
           String b = o.getB();
           MyObject c = o.getC();
           ...
          }
          


          -Jason

          • 2. Re: wrapped document/literal
            posselt Newbie

            Hi there,

            What's that? I cannot implement webservices with more than one parameter? This cannot be true!

            At the moment we're using JBoss-3.2.3-RC1 very heavily in production with plenty of SLSBs exposed as SOAP services for our perl and php clients. In order to migrate to JBoss-4.0.1, we cannot change all of these webservices to use a complex wrapping type. There must be a way to use several (complex) parameters in JBossWS. Any hints?

            Thanks and greetings,
            Dietmar

            • 3. Re: wrapped document/literal
              Ole Matzura Novice

              Hi!

              as far as I understand, doc/literal web-services can only have one in/out complex message part (in accordance with basic profile). If you need multiple in-parts you should use rpc/literal style web-services instead (which should work fine with jboss in accordance with j2ee 1.4).

              correct?

              regards!

              /Ole

              • 4. Re: wrapped document/literal
                Thomas Diesler Master

                 


                What's that? I cannot implement webservices with more than one parameter? This cannot be true!


                The strong point about doc/literal is, that the message receiver can validate the payload of the message against a given schema. Business entities that exchange complex documents have this requirement.

                You should first assess whether you want a RPC kind of communication or whether you want to exchange documents. RPC style may feel more natural to technical people whereas DOC style may feel more more natural to people that model business processes are not concerned about the implementation details, like method signatures.

                In fact, as jason points out, whether your endpoint receives the message in a wrapping complex type or unwrapped as individual parameters is an implementation detail which the client of the web service does not see.

                • 5. Re: wrapped document/literal
                  posselt Newbie

                  Hi again,

                  omatzura wrotes that rpc/literal style web-services should work fine with JBoss.

                  From jasong I understand, that only document/literal works with JBoss so far.

                  I'd like to use rpc/literal but got some problems when I tried it. If it should work in general, I'll give it another try and will post any problems here.

                  So my question is: Does JBoss-4.0.1 support rpc/literal style web-services?

                  Thanks,
                  Dietmar

                  • 6. Re: wrapped document/literal
                    Mohammad Rahin Newbie

                    Working with JBoss 4.0.0 I can confirm that you can do rpc/encoded, rpc/literal and document/literal with JBossWS.

                    Windows .NET however, does not support rpc/literal. So, you will encounter problem interoperating JBossWS rpc/literal web service with .NET clients.

                    Hope this helps.

                    - Mohammad

                    • 7. Re: wrapped document/literal
                      Thomas Diesler Master

                      rpc/encoded works, but should not be used for reasons given by the BasicProfile-1.0

                      Both literal styles are supported