Bugs item #594137, was opened at 2002-08-12 19:13
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594137&group_id=22866

Category: JBossSOAP
Group: v3.0 Rabbit Hole
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Marius Kotsbak (mkotsbak)
Assigned to: Dr. Christoph Georg Jung (cgjung)
Summary: SOAPAction not set

Initial Comment:
The auto-generated wsdl-file is missing soapAction,
whch should be th e same as "<wsdl:operation name".
This is neccesary for M$ Soap toolkit to work, and
maybe other SOAP implementations like for perl.

   <wsdl:operation name="insertPerson">  HERE -> V
***HERE->***      <wsdlsoap:operation soapAction=""/>
      <wsdl:input>

        <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="xxx"/>
      </wsdl:input>
      <wsdl:output>
        <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="xxx"/>
      </wsdl:output>
    </wsdl:operation>

----------------------------------------------------------------------

>Comment By: Dr. Christoph Georg Jung (cgjung)
Date: 2003-03-28 13:58

Message:
Logged In: YES 
user_id=175199

the proposed solution has been integrated into 3.2
EJBProvider and MBeanProvider are now sensitive to this 
issue.




----------------------------------------------------------------------

Comment By: Dr. Christoph Georg Jung (cgjung)
Date: 2003-03-27 13:02

Message:
Logged In: YES 
user_id=175199

Ok, this is how we are going to resolve this issue today 
(which should IMHO be addressed in Axis, I will send them a 
notice):

Soap-Action is a property of the transport chain, not the 
service itself. That means that, ideally, the action handler 
itself should include this into the wsdl, or better, into the 
service description meta-data. 

Since the service descriptions will only be accessible in the 
service and not from the transport chain, we will invent a new
org.jboss.axis.server.WsdlAwareHttpActionHandler which will 
set a flag in the message context when wsdl should be 
generated.

The disadvantage of this approach is that any provider, such 
as the org.jboss.net.axis.server.EJBProvider, needs to test 
this flag in order to include the correct soapaction into its 
meta-data. If you use something else than EJBProvider, you 
need to subclass it and do a similar postprocessing of the 
operations that I will commit in a few hours



----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2003-01-15 21:15

Message:
Logged In: YES 
user_id=366650

BTW: perl clients works without "soapaction"

----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-09-11 12:03

Message:
Logged In: YES 
user_id=366650

OK. I can try with the new version 3.0 of the soap toolkit
first.

----------------------------------------------------------------------

Comment By: Dr. Christoph Georg Jung (cgjung)
Date: 2002-09-11 10:46

Message:
Logged In: YES 
user_id=175199

Now, here we are. Thatīs a bug in the MS-SOap Toolkit, if 
you ask me:

>From AxisServlet:

    private String getSoapAction(HttpServletRequest req)
        throws AxisFault
    {
        String soapAction =(String)req.getHeader
(HTTPConstants.HEADER_SOAP_ACTION);

        if (soapAction == null) {
            AxisFault af = new AxisFault("Client.NoSOAPAction",
                                         JavaUtils.getMessage
("noHeader00",
                                                              "SOAPAction"),
                                         null, null);
                  }


Which means that the call will fault when there is no such 
soapAction header. It will not fault (and be further processed), 
if your soapAction header is "" (and that is what the 
generated wsdl is saying, if you ask me).







----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-09-11 10:30

Message:
Logged In: YES 
user_id=366650

Here is the error when using the wsdl-file directly with
empty soapAction from MS Soap toolkit:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultcode
xmlns:ns1="http://xml.apache.org/axis/";>ns1:Client.NoSOAPAction</faultcode>
   <faultstring>no SOAPAction header!</faultstring>
   <detail>
    <ns2:stackTrace
xmlns:ns2="http://xml.apache.org/axis/";>no SOAPAction header!
        at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:509)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:344)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:313)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:554)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.handle(WebApplicationHandler.java:199)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1572)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1522)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:795)
        at org.jboss.jetty.Jetty.service(Jetty.java:531)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:784)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:941)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:799)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:186)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:322)
        at
org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:713)
        at java.lang.Thread.run(Thread.java:536)
</ns2:stackTrace>
   </detail>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>)

I will send a question about this to the axis-list with
reference to this bug

----------------------------------------------------------------------

Comment By: Dr. Christoph Georg Jung (cgjung)
Date: 2002-09-09 12:25

Message:
Logged In: YES 
user_id=175199

I looked again at the Axis Emitter code and there is the 
following line in writeBindingOperation:

        // If the soapAction option is OPERATION, force
        // soapAction to the name of the operation. If NONE,
        // force soapAction to "".
        // Otherwise use the information in the operationDesc.
        String soapAction = "";
        if (getSoapAction().equals("OPERATION")) {
            soapAction = oper.getName();
        } else if (getSoapAction().equals("NONE")) {
            soapAction = "";
        } else {
            soapAction = desc.getSoapAction();
            if (soapAction == null) {
                soapAction = "";
            }
        }

I guess it should not be up to the provider meta-data (the 
adapter code that ties Axis to various target services, such 
as EJB, MBean and the like) but up to the invocation chain 
(i.e., whether there is an HTTPActionHandler) to set the 
emitter to mode "Operation" or whatelse. I find the Axis meta-
data interface sometimes very obscure anyway.

You could report it to Axis, but since SOAP1.2 SOAPAction 
is no more mandatory as I understand. Iīm not sure whether 
this will give you any satisfactory answer. 

What about the following: You will get the possibility to 
subclass jboss.net.axis.server.EJBProvider in order to set the 
emitter to mode "operation"?



----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-09-09 09:45

Message:
Logged In: YES 
user_id=366650

>Which provider do you refer to?
Provider? I use MS soap toolkit on the client side.

>If this is a bug, then it would be an Axis bug, because we 
>fully rely on, e.g., the EJBProvider and the embedded wsdl-
>Emitter. 
OK. I wasn't sure, so I posted it here first. Could you post
this on the axis bug list?


>IMHO, they do not use setSoapAction(Operation) simply 
>because in the usual transport chain, the soap action is not 
>necessarily evaluated (most of the time you use a urlmapper 
>and encode the target service via a url-suffix).

>Furthermore, I have no problems with the .NET wsdl.exe even 
>when soapAction is not defined (which is reasonable, 
>because it is not needed in this case).
The problem is that MS toolkit (at least in 2.0, haven't
tried 3.0 yet) relies on only soapAction, and fails when
it's empty, maybe because it uses soap, and net .net or
webservice. And if the field is supposed to be empty,
couldn't it just have been removed?

>What do you want me to do about this issue. Include an 
>(IMHO wrong) default into complete jboss.net that behaves 
>different from Axis?
If this field is missing in the newest jboss (newest cvs
with the newest axis integrated), can you post a bug report
like this on the axis list?

--Marius


----------------------------------------------------------------------

Comment By: Dr. Christoph Georg Jung (cgjung)
Date: 2002-09-09 09:36

Message:
Logged In: YES 
user_id=175199

Which provider do you refer to?

If this is a bug, then it would be an Axis bug, because we 
fully rely on, e.g., the EJBProvider and the embedded wsdl-
Emitter. 

IMHO, they do not use setSoapAction(Operation) simply 
because in the usual transport chain, the soap action is not 
necessarily evaluated (most of the time you use a urlmapper 
and encode the target service via a url-suffix).

Furthermore, I have no problems with the .NET wsdl.exe even 
when soapAction is not defined (which is reasonable, 
because it is not needed in this case).

What do you want me to do about this issue. Include an 
(IMHO wrong) default into complete jboss.net that behaves 
different from Axis?

CGJ
 




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594137&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to