11 Replies Latest reply on May 11, 2009 6:23 AM by Roberto Tajada

    no SOAPAction header!

    Roberto Tajada Newbie

      hi
      i'm testing a webservice proxy with jboss esb.
      I've make the test with a lot of WebServices. But one of them fails.

      The error is "no SOAPAction header!"

      If i test the original WebService with soapUI it works fine.
      but if i test the esb service then i got this error.

      the rest of the services i test works fine, only this one.

      I use jboss developer studio with an esb project to make the proxy.

      Any idea?

        • 1. Re: no SOAPAction header!
          Tom Fennelly Master

          Sorry... you'll need to provide more info than this.

          What is your setup (versions etc)?
          How are you creating the WS endpoint on the ESB?
          How are you proxying the request to the "original Webservice"?

          • 2. Re: no SOAPAction header!
            Roberto Tajada Newbie

            SOA-P 4.3
            JBoss Developer Studio 2.0

            I implement this sample and with 5 webservices it works fine
            http://www.jboss.org/community/wiki/SOA-P43SimpleWebServiceProxy

            • 3. Re: no SOAPAction header!
              Tom Fennelly Master

              OK... can you post the actual details of the service that is failing and also post details of the actual failure (server logs etc).

              • 4. Re: no SOAPAction header!
                Roberto Tajada Newbie

                it's a webservice that is deployed in a tomcat 5.0.28 with axis 1.3 (i think this is the reason)

                In the original wsdl the soapAction is ""

                I've other WS with the same soapaction and it works fine.

                • 5. Re: no SOAPAction header!
                  Roberto Tajada Newbie

                  please it's very urgent.

                  • 6. Re: no SOAPAction header!
                    Scott Dawson Apprentice

                    If you're using the HttpRouter, then you can add the header like this:

                    <action name="httprouter" class="org.jboss.soa.esb.actions.routing.http.HttpRouter">
                     <property name="endpointUrl" value="http://localhost:9000/Hello"/>
                     <property name="method" value="POST" />
                     <property name="responseType" value="STRING" />
                     <property name="headers">
                     <header name="SOAPAction" value="whatever" />
                     </property>
                     </action>
                    


                    Regards,
                    Scott

                    • 7. Re: no SOAPAction header!
                      Roberto Tajada Newbie

                      It doesn't work.
                      If i put like you say i get an IllegalArgumentException: null or empty 'value' arg in method call.

                      If i put the value="" and then the header like you say it doesn't work.

                      And if i put the header tag inside the value it also doesn't work.


                      I search on the internet for a solution and i find that this error is very common with tomcat 5, but i don't find a solution.

                      • 8. Re: no SOAPAction header!
                        Tom Fennelly Master

                        rtajada, you really need to provide better information if you expect people to be able to help you!! Just saying it "doesn't work" is next to useless... saying that you got an exception without providing the stacktrace is also useless... telling us the "the error" (whatever that is) is very common on tomcat5 is also useless without providing a link to what you're talking about. Pleas look at some of the other posts on the forum and see how other people explain their problem clearly and provide info that helps people to help them.

                        Anyway... what Scott has shown should enable you to set a HTTP header on the outgoing request from the HttpRouter. If you're getting an error from that, I suspect you've messed it up some way. Let us see *exactly* how you've configured your HttpRouter. In fact copy your full config in here inside a code block.

                        There's also another option on the HttpRouter, whereby you can set a "MappedHeaderList" property. It's a comma separated list of header names to be mapped from the incoming request. It will require the incoming headers to be in the ESB Message as named properties.

                        You might also get the ESB code and try hooking up a debugger so as to get familiar with how the HttpRouter works.

                        • 9. Re: no SOAPAction header!
                          Roberto Tajada Newbie

                          in my last post i said that the error i got was
                          " IllegalArgumentException: null or empty 'value' arg in method call."

                          I can write the entire stacktrace, but i think is a nonsense.

                          with the rest of tests i've done i said that it doesn't work, and you're right, i could have write that the error was the same.
                          " IllegalArgumentException: null or empty 'value' arg in method call."

                          Finally i made it with scott help, but i've to pass the following:

                          <action name="httprouter" class="org.jboss.soa.esb.actions.routing.http.HttpRouter">
                           <property name="endpointUrl" value="http://localhost:9000/Hello"/>
                           <property name="method" value="POST" />
                           <property name="responseType" value="STRING" />
                           <property name="headers" value="anyValue">
                           <header name="SOAPAction" value="whatever" />
                           </property>
                           </action>
                          
                          


                          The thing is that in property headers it's necessary pass any value.
                          And in the SOAPAction header i pass any value also, no matter if it's not the real soapaction... it seems the webservice only validates that there is a value..

                          Thank you very much ScottDawson

                          • 10. Re: no SOAPAction header!
                            Kevin Conner Master

                            The issue is, almost certainly, caused by the lack of quotes in the value.

                            SOAPAction is a specific header that must be included in SOAP invocations, should be quoted for interop and may have an empty value. Some SOAP stacks use it to determine the target of the request whereas others ignore it.

                            HttpRouter is not SOAP aware so does not realise that the value of SOAPAction should be quoted, you must therefore handle it within your configuration.

                            It would appear, from the rest of the discussion, that the value is being ignored and just 'has to exist', but the correct configuration is likely to be the following

                            <header name="SOAPAction" value="\"\"" />




                            • 11. Re: no SOAPAction header!
                              Roberto Tajada Newbie

                              thank you very much