You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Eran Chinthaka <ch...@opensource.lk> on 2008/02/14 22:53:05 UTC

[Axis2] Possible problems with code generation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Last couple of weeks I was meddling a bit with Axis2 actually to *use*
it ;) Here are some of the problems I encountered while using it.

1. I code gen'ed for a WSDL and deployed a service using it. When I sent
an xml which doesn't adhere to the schema, I am getting a SOAP fault, as
expected. But the fault code of that message is Server and not the
Sender, which I think is wrong.
According to both the SOAP specifications, if the content of the body is
wrong, it is a problem with the client and the fault code should be
either Client (for SOAP 1.1) and Sender (for SOAP 1.2).
I implemented some of these logics sometime back and it was working
properly those days. So I presume this is an intentional change. Any
comments?

2. I was trying to use the generated bean code in a different client,
which doesn't use Axis2 to send requests. Basically I was just trying to
use ADB generated java beans. But internally, ADB is using
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter. This
is a barrier to me to use ADB generated code without Axis2 jars. Can we
either move this class to Axiom or to adb module? The reason is I don't
want to include any of the axis2 jars in my client project, which i
think is a fare statement if I am not gonna use Axis2  in client side.

3. I deployed a service and requested the wsdl, clicking on the Service
link on our Axis2 web app. Everything worked without a trouble until I
deployed the logging module (This logging modules was created using the
sample found in Axis2 distro). When I engaged this logging module, then
the port of the endpoint address suddenly changes to port 80 and not to
what I put in axis2.xml.
Strange thing is sometimes this work properly, but some times it changes
the port. This is problematic for me as I am using WSIF to invoke the
Web service and it retrieves the WSDL for each invocation.

I know I better create issues in JIRA out of these. But with some of the
work I have, it might take some time. So I thought perhaps our brilliant
devs might shed some light on these issues before that ;)

With Mettha,
Eran Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHtLhBjON2uBzUhh8RAtxtAJ9asJiEsNxmnqTHYSwaWzCLQ3hwrgCeIsFH
uk+p59lmeYOz3ix7vYhlixg=
=yjVM
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Possible problems with code generation

Posted by Amila Suriarachchi <am...@gmail.com>.
On Fri, Feb 15, 2008 at 3:23 AM, Eran Chinthaka <ch...@opensource.lk>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Last couple of weeks I was meddling a bit with Axis2 actually to *use*
> it ;) Here are some of the problems I encountered while using it.
>
> 1. I code gen'ed for a WSDL and deployed a service using it. When I sent
> an xml which doesn't adhere to the schema, I am getting a SOAP fault, as
> expected. But the fault code of that message is Server and not the
> Sender, which I think is wrong.
> According to both the SOAP specifications, if the content of the body is
> wrong, it is a problem with the client and the fault code should be
> either Client (for SOAP 1.1) and Sender (for SOAP 1.2).
> I implemented some of these logics sometime back and it was working
> properly those days. So I presume this is an intentional change. Any
> comments?


WSDL2java tool generates a custom message receiver extending the
AbstractInOutMessageReceiver for an inout operation.

public abstract void invokeBusinessLogic(MessageContext inMessage,
MessageContext outMessage)
            throws AxisFault;

it implements this method and that implemented method throws and AxisFault
if the xml is invalid.

So is it supposed to set an attribute to AxisFault or does this something to
handle at the kernel level?
Where did you fix this issue? could you please trace back the file and see
what has happen to this change. I was not aware of this requirement and I
did not do any intentional change.


>
> 2. I was trying to use the generated bean code in a different client,
> which doesn't use Axis2 to send requests. Basically I was just trying to
> use ADB generated java beans. But internally, ADB is using
> org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter. This
> is a barrier to me to use ADB generated code without Axis2 jars. Can we
> either move this class to Axiom or to adb module?


This class is already in adb module isn't?
Yes as you told to run adb generated code you only need axis2-adb.jar Axiom
and its dependent jars.


> The reason is I don't
> want to include any of the axis2 jars in my client project, which i
> think is a fare statement if I am not gonna use Axis2  in client side.




>
>
> 3. I deployed a service and requested the wsdl, clicking on the Service
> link on our Axis2 web app. Everything worked without a trouble until I
> deployed the logging module (This logging modules was created using the
> sample found in Axis2 distro). When I engaged this logging module, then
> the port of the endpoint address suddenly changes to port 80 and not to
> what I put in axis2.xml.
> Strange thing is sometimes this work properly, but some times it changes
> the port. This is problematic for me as I am using WSIF to invoke the
> eb service and it retrieves the WSDL for each invocation.




>
> I know I better create issues in JIRA out of these. But with some of the
> work I have, it might take some time. So I thought perhaps our brilliant
> devs might shed some light on these issues before that ;)
>
> With Mettha,
> Eran Chinthaka
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHtLhBjON2uBzUhh8RAtxtAJ9asJiEsNxmnqTHYSwaWzCLQ3hwrgCeIsFH
> uk+p59lmeYOz3ix7vYhlixg=
> =yjVM
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.