6 Replies Latest reply on Aug 25, 2008 11:15 AM by Alessio Soldano

    More soap:address problems

    Justin Waugh Newbie

      I am having two specific problems with the auto generated/replaced soap:address element in the wsdl.

      1. I cannot get it to say https:// instead of http://.

      Some suggestions I've seen on the forums here are deprecated (Use of annotations that don't exist anymore) and all are related to setting the transport guarantee (which doesn't seem to have any effect anyway). My setup is apache talking to jboss through jkmount, and i'm using a POJO endpoint. I really love the idea of the address rewriting as configured in the jboss-ws.sar/META-INF/jboss-beans.xml but it does not rewrite the protocol, only the hostname:port/path. I glanced at the code, and it plainly just ignores the incoming request protocol. Why is this? If I am accessing it via an https:// URL, why would it not rewrite it using https://?

      2. The path to the endpoint is plain wrong.

      I have a context root specified in the jboss-web.xml of my war, and that is all it uses no matter what. It simply ignores the servlet name and rewrites the path with just the context-root even when I specify my own WSDL in the @WebService annotation. My servlet is specified in the web.xml as follows..

      <servlet>
       <servlet-name>MyWebservice</servlet-name>
       <servlet-class>com.mycompany.webservices.MyWebservice</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>MyWebservice</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-mapping>
      


      My jboss-web.xml has the following:

      <jboss-web>
       <context-root>webservice</context-root>
      </jboss-web>
      


      The correct endpoint should be
      https://myhost:443/webservice/MyWebservice


      but no matter what I do, it rewrites it to just
      https://myhost:443/webservice


      Are there any configurations I've overlooked that can resolve these 2 problems?


        • 1. Re: More soap:address problems
          Zeeshan Javeed Newbie

          Hi,
          For your point 2, I can confirm that I am using the same settings and its working for me. There must be something which is over-riding ur settings. But if it as simple as it is there, It should work, as it working at my end. Check your annotatoin on Interace and implementation files.

          Regards,
          Zeeshan

          • 2. Re: More soap:address problems
            Alessio Soldano Master

             

            "justinkwaugh" wrote:
            I glanced at the code, and it plainly just ignores the incoming request protocol. Why is this? If I am accessing it via an https:// URL, why would it not rewrite it using https://?

            You might want to create a JIRA issue for this.


            2. The path to the endpoint is plain wrong.

            I have a context root specified in the jboss-web.xml of my war, and that is all it uses no matter what. It simply ignores the servlet name and rewrites the path with just the context-root even when I specify my own WSDL in the @WebService annotation. My servlet is specified in the web.xml as follows..

            <servlet>
             <servlet-name>MyWebservice</servlet-name>
             <servlet-class>com.mycompany.webservices.MyWebservice</servlet-class>
             </servlet>
             <servlet-mapping>
             <servlet-name>MyWebservice</servlet-name>
             <url-pattern>/*</url-pattern>
             </servlet-mapping>
            


            My jboss-web.xml has the following:

            <jboss-web>
             <context-root>webservice</context-root>
            </jboss-web>
            


            The correct endpoint should be
            https://myhost:443/webservice/MyWebservice


            but no matter what I do, it rewrites it to just
            https://myhost:443/webservice



            This is the right behaviour IMHO. You should use this to get the path /webservice/MyWebservice:
            <servlet>
             <servlet-name>MyWebservice</servlet-name>
             <servlet-class>com.mycompany.webservices.MyWebservice</servlet-class>
             </servlet>
             <servlet-mapping>
             <servlet-name>MyWebservice</servlet-name>
             <url-pattern>/MyWebservice</url-pattern>
             </servlet-mapping>
            


            • 3. Re: More soap:address problems
              Vishal Jain Newbie

              Is there a solution to issue 1? I am using jboss version 4.2.1.

              • 4. Re: More soap:address problems
                Alexandros Karypidis Novice

                Try using @WebContext. It works for me using JBossWS-Native 3.0.2 (which is the latest stable version).

                For example:

                @WebContext(authMethod = "BASIC", transportGuarantee=true, secureWSDLAccess = true)
                @WebService
                public class MyService ... {
                ...
                }


                Make sure to enable the "secureWSDLAccess" flag if you need HTTPS-only access for the published WSDL contract. I understand the "transportGuarantee" is for actual access to the service.


                • 5. Re: More soap:address problems
                  Vishal Jain Newbie

                  I tried setting transportGuarantee="true" and transportGuarantee="CONFIDENTIAL". It didn't work for me. I am using jbossws1.2. Forgive my ignorance but how is jbossws-native different from jbossws1.2?

                  • 6. Re: More soap:address problems
                    Alessio Soldano Master

                    JBossWS Native is the name we gave to our own stack implementation when JBossWS started supporting the Metro and CXF stacks too, see http://jbws.dyndns.org/mediawiki/index.php?title=WSF
                    JBossWS 1.2 is a really old version of JBossWS instead.