5 Replies Latest reply on Jun 25, 2007 5:45 AM by keerthi b

    JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it rea

    Unknown Unknown Newbie

      Here is what I did, I followed the guide in creating java classes from wsdl. I used the wsconsume tool.

      The xml to be sent has a body something like this, I just made up the element names, but the structure is the same.

      <requestsender>
       <stype></stype>
       <content>
       <name></name>
       <age></age>
       <listaddress>
       <listname></listname
       </listaddress>
       </content>
      </requestsender>
      
      <responsesender>
       <Status></Status>
      </responsesender>
      


      Everything worked fine during deployment. I also had an existing client which works in the actual web service environment. What I'm doing is trying to replicate that environment. The client communicates by creating and sending an xml, and not by using a port. The client uses castor, but it should not matter since an xml is created and sent. I should not create a new client as I need to make it work with the existing client module.

      There are 3 problems. The first is ignorable but I still want to put it here.
      1. There is no wsrunclient in JBoss 4.0.5, so the guide does not work for JBoss 4.0.5.
      2. There is no problem with communication, the xml is sent to JBoss. Problem is that all contents of RequestSender object is null. It always does not have a value, it seems something is wrong with the unbinding or deserializing of the xml.
      3. I can return a response to the client, problem is in the case of the returned xml. For example, "Status" is returned as lowercase "status", which raises an error in the client by castor during unbinding. It should not be in lowercase.

      Did the guide miss something else? Take note that the generated ObjectFactory does not contain much, just a simple new XXX class. But I think this is not related right?

      Can you advise on what to do? Does JBossWS 1.2 really work? or this is a bug?

        • 1. Re: JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it
          Heiko Braun Master

           


          Does JBossWS 1.2 really work?


          No, it doesn't. It's an april fool's joke...

          • 2. Re: JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it
            Unknown Unknown Newbie

            Seriously, anything obvious that I may have missed?

            I asked the question since I want to make sure if it really works as mentioned in the guide or is it not yet really ready? I really want to use it since it is very easy to create a webservice, but I want to know if I need to wait for the next release. What I am doing right now is figuring out how to make it work, but I may just be wasting my time or I may be really doing something wrong.

            Please help here.

            To heiko.braun@jboss.com, I really don't know what your point is. If you are one of jboss developers, then help me out. Tell me if I need to wait for the next release.

            • 3. Re: JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it
              Heiko Braun Master

              OK, let's put that joke aside.
              Regarding your questions:

              1.) Did you run the install script? It should copy wsrunclient to 'JBOSS_HOME/bin'. See http://jbws.dyndns.org/mediawiki/index.php/Install_JBossWS for details..

              2.) What exactly does castor send? Why don't you use a JBossWS client in conjunction with the Dispatch API? See http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#Dispatch

              3.) The last point is a JAXB issue. Make yourself familiar with the way JAXB works.

              Please keep in mind that community support is delivered at free will and should actually be driven by JBossWS users.

              • 4. Re: JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it
                Unknown Unknown Newbie

                 

                1.) Did you run the install script? It should copy wsrunclient to 'JBOSS_HOME/bin'.


                As far as I can remember, yes I did, but I just checked the build.xml file, seems it should be copied whatever version of JBoss AS. Anyway, this can be a mistake on my part. I used the JBoss 1.2 SP1 and seems the wsrunclient.bat is there now.

                Btw, stax-api.jar and wstx.jar are not present in JBoss 4.0.5 and JBoss 4.2 CR1.


                2.) What exactly does castor send? Why don't you use a JBossWS client in conjunction with the Dispatch API?


                The actual xml string. OK, will check dispatch.

                The last point is a JAXB issue. Make yourself familiar with the way JAXB works.


                Ah yes, JAXB 2.0 is really something, that is why I wanted to use it. But in this case, seems JBoss should have handled unmarshalling and marshalling properly. I just followed the guide and was able to send messages properly. Problem was that they were not unmarshalled properly on receiving end and not marshalled properly on response side. Btw, I turned on logging in debug mode, and didn't see any problems. Well actually, no errors were thrown.

                Please keep in mind that community support is delivered at free will and should actually be driven by JBossWS users.


                Yes, you have a good point there. Maybe I will take a look at the source if I had time. Anyway, using axis right now since I really need to make it work. Will migrate to jboss if I finally solve the problem.

                • 5. Re: JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it
                  keerthi b Newbie

                  i am getting following error can anybody tell what would be cause,

                  Caused by: org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://wb1-329:8080}validateUser
                  at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:451)
                  at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
                  at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:208)
                  at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
                  at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
                  at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
                  at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
                  at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
                  at client.UserBean.loginUser(UserBean.java:90)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)



                  thanks in advance