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 Rajith Attapattu <ra...@gmail.com> on 2006/12/15 20:42:33 UTC

[axis2] Using aspecj for the clustering implementation

Hi Folks,

I was experimenting using aspects using aspectj for implementing clustering.
The idea is to use aspect to capture context creation/deletion and property
settings w/o manully adding code in the kernal module to explicitly do so.

Here are some advantages and disadvantages and I would like to see some
comments about this before I go any further.

advantages
---------------------
This is non-intrusive and there want be any code anywhere in the kernal
module that delegates operations to the cluster manager
Simple as there is a central piece of code that managers capturing of events
that needs to be clustered.
aspectj jars are only required in your runtime if u want to use clustering
aspects could be used to develop other functionality too

disadvantages
----------------------
If we use complie time weaving we need to have the aspectj compiler to
compile the kernal and the cluster module to do the weaving.

If we use load time weaving then the end user needs to have the
aspectjweaver.jar  in their classpath and also provide a java agent as a jvm
argument.
Ex: -javaagent:pathto/aspectjweaver.jar

Comments are greatly appreciated.

Regards,

Rajith

Re: Problem creating Java files from WSDL

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
I think the actual problem with this WSDL is that the name used on the 
<wsdl:fault> element within the <wsdl:binding>/<wsdl:operation> doesn't 
match that used on the corresponding 
<wsdl:portType>/<wsdl:operation>/<wsdl:fault>. Here's the former 
<wsdl:portType>/<wsdl:operation>:

    <wsdl:operation name="SDD2TransportReplyOp">
      <wsdl:input message="tns:SDD2TransportReplySoapIn" />
      <wsdl:output message="tns:SDD2TransportReplySoapOut" />
      <wsdl:fault name="SDD2ErrorFault" message="tns:SDD2Error" />
    </wsdl:operation>

Here's the <wsdl:binding>/<wsdl:operation>/<wsdl:fault>:

      <wsdl:fault name="SDD2Error">
        <soap:fault use="literal" name="SDD2ErrorFault" namespace="" />
      </wsdl:fault>

Note "SDD2ErrorFault" name on the first <wsdl:fault>, vs. "SDD2Error" 
name on the second. The use of a name attribute on a <soap:fault> is 
required by the BP (not by WSDL), but according to BP it must always 
match that of the enclosing <wsdl:fault> element - so the WSDL is not 
BP-compliant in any case.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Amila Suriarachchi wrote:
> this is an axis2 problem. please feel free to log a jira.
>
> Here is the problem.
> In your wsdl contains a fault element and its soap binding as follows.
>
> <wsdl:fault name="SDD2ErrorFault" message="tns:SDD2Error" />
>
> in binding
>     <wsdl:fault name="SDD2Error">
>         <soap:fault use="literal" name="SDD2ErrorFault" namespace="" />
>       </wsdl:fault>
>
> according to the wsdl 1.1 specification and the ws-basic profile your 
> wsdl is correct.
> see
> http://www.ws-i.org/Profiles/BasicProfile-1.1.html#name_Attribute_on_Faults 
> <http://www.ws-i.org/Profiles/BasicProfile-1.1.html#name_Attribute_on_Faults>
> http://www.w3.org/TR/wsdl#_soap:fault
>
> i.e. we have to pick the wsdl:fault,  using the soap:fault element 
> (using the name attribute) in the soap binding. and this name is an 
> manadatory field.
> but in axis2 it picks the wsdl:fault, using the  wsdl:fault element 
> (using the name attribute).
>
> therefore if you interchange the names as follows it will work.
>
>      <wsdl:fault name="SDD2ErrorFault">
>         <soap:fault use="literal" name="SDD2Error" namespace="" />
>       </wsdl:fault>
>
> Amila.
>
>
> -- 
> Amila Suriarachchi,
> Software Engineer,
> WSO2 Inc. 

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


Re: Problem creating Java files from WSDL

Posted by Amila Suriarachchi <am...@gmail.com>.
this is an axis2 problem. please feel free to log a jira.

Here is the problem.
In your wsdl contains a fault element and its soap binding as follows.

<wsdl:fault name="SDD2ErrorFault" message="tns:SDD2Error" />

in binding
    <wsdl:fault name="SDD2Error">
        <soap:fault use="literal" name="SDD2ErrorFault" namespace="" />
      </wsdl:fault>

according to the wsdl 1.1 specification and the ws-basic profile your wsdl
is correct.
see
http://www.ws-i.org/Profiles/BasicProfile-1.1.html#name_Attribute_on_Faults
http://www.w3.org/TR/wsdl#_soap:fault

i.e. we have to pick the wsdl:fault,  using the soap:fault element (using
the name attribute) in the soap binding. and this name is an manadatory
field.
but in axis2 it picks the wsdl:fault, using the  wsdl:fault element (using
the name attribute).

therefore if you interchange the names as follows it will work.

     <wsdl:fault name="SDD2ErrorFault">
        <soap:fault use="literal" name="SDD2Error" namespace="" />
      </wsdl:fault>

Amila.


-- 
Amila Suriarachchi,
Software Engineer,
WSO2 Inc.

Problem creating Java files from WSDL

Posted by Robert Chilvers <ro...@mtlehman.com>.
Hi All;


I am VERY new to Axis 2 so please be kind.


Here is a little background info.

I have been given a WSDL and XSD by another company in which I need  
to create Java classes for and eventually a web service.  The other  
company uses WebLogic for their web services and have successfully  
been able to get the WSDL working with several different companies  
that use .NET.  I will be using Axis 2, Java and Tomcat for mine.  I  
have been in contact with the developer at the other company with my  
problem, and he was looking into it, but told me to try the mailing  
list for Axis as well, and that is why I am here.

When I try to create the java classes from the WSDL using  
wsdl2java.sh I get an error.  I am not sure why this happens and I  
was wondering if someone could shed some light on the problem.  I  
have included the WSDL, the XSD and the output from the command line  
with the error in it.  The developer at the other company believes it  
was something to do with the response, his code generators create a  
response directly from the http-response, and he believes Axis is  
creating a callback method for handling the response.

Any thoughts here to help me get going would be great.


Rob