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 Jason Weinstein <Ja...@Sun.COM> on 2008/10/15 05:56:36 UTC

I would like to utilize the axis framework to generate java code for wsdls which are not soap based.

I would like to utilize the axis framework to generate java code for 
wsdls which are not soap based.

I am looking to generate java classes which implement the wsdl operations.

The arguments/return to the operations could be jaxb/xmlbeans objects 
for instance or some axis variant.

The interfaces generated by axis are likely largely correct for my uses, 
but it would be the implementation of the java interface methods which i 
want to change, etc.

I have two separate cases.

1) in which the codegen uses only the abstract wsdl to generate the java 
code
and
2) in which the codegen uses the concrete&abstract parts to generate the 
java code

How can/does one plugin in their own code generators/emitters to axis? 
Or any other/better means to generate the code?

I have already looked at jax-ws, but have not found it to be very pluggable.

Any help or pointers to code or examples would be very helpful.

Thanks,

Jason

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


Re: I would like to utilize the axis framework to generate java code for wsdls which are not soap based.

Posted by Amila Suriarachchi <am...@gmail.com>.
it loads the config file like this
String property = System.getProperty("org.apache.axis2.codegen.config");
            InputStream stream;

            if (property != null) {
                stream = getStream(property);
            } else {
                stream = getStream(DEFAULT_CODEGEN_CONFIG_PROPERTIES);
            }


so you can set it as -Dorg.apache.axis2.codegen.config

thanks,
Amila.

On Wed, Oct 15, 2008 at 12:02 PM, Jason Weinstein
<Ja...@sun.com>wrote:

>  Thanks for the tip.
>
> Can i pass in codegen-config.properties instead of having to unwrap the
> codegen jar file and package back up
> e.g. -Dcodegen-config-properties=mycodegen-config.properties
>
> and or
>
> Can i pass in specific properties
> e.g. -Dcodegen.java.interface.template=blah
>
> Is there any documentation specific to this feature that someone can point
> me to and or
>
> any examples on the web or known projects which use it that i could look at
> for examples?.
>
> Thanks
>
>
> Excerpt from codegen-config.properties
>
>
> #####################################################################################################################
> ########################  Language specific section
> #################################################################
>
> #####################################################################################################################
> # The language specific section has a special custom style. The language
> name comes first and separated from the period
> # a unique name. These parameters will be included in a hashmap that is
> will be stored in another hash map with the
> # language as the key
>
> #####################################################################################################################
> # Java section  - Templates.
> # The format of the templates is <writer-class-name>,<template-name>
> # Note this section is specific to the emitter logic. One can have anything
> here!
>
> java.interface.template=org.apache.axis2.wsdl.codegen.writer.InterfaceWriter,/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
>
> java.interface.impl.template=org.apache.axis2.wsdl.codegen.writer.InterfaceImplementationWriter,/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
>
> java.bean.template=org.apache.axis2.wsdl.codegen.writer.BeanWriter,/org/apache/axis2/wsdl/template/java/BeanTemplate.xsl
>
> java.callback.template=org.apache.axis2.wsdl.codegen.writer.CallbackHandlerWriter,/org/apache/axis2/wsdl/template/java/CallbackHandlerTemplate.xsl
>
> java.exception.template=org.apache.axis2.wsdl.codegen.writer.ExceptionWriter,/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl
>
> java.skeleton.template=org.apache.axis2.wsdl.codegen.writer.SkeletonWriter,/org/apache/axis2/wsdl/template/java/SkeletonTemplate.xsl
>
> java.skeleton.interface.template=org.apache.axis2.wsdl.codegen.writer.SkeletonInterfaceWriter,/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
>
> java.testclass.template=org.apache.axis2.wsdl.codegen.writer.TestClassWriter,/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
>
> java.service.template=org.apache.axis2.wsdl.codegen.writer.ServiceXMLWriter,/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
>
> java.message.receiver.template=org.apache.axis2.wsdl.codegen.writer.MessageReceiverWriter,/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
>
>
>
> Amila Suriarachchi wrote:
>
> you can plugin  custom emitters by changing the codegen-config.properties
> file under codegen module.
>
> thanks,
> Amila.
>
> On Wed, Oct 15, 2008 at 9:26 AM, Jason Weinstein <Ja...@sun.com>wrote:
>
> I would like to utilize the axis framework to generate java code for wsdls
> which are not soap based.
>
> I am looking to generate java classes which implement the wsdl operations.
>
> The arguments/return to the operations could be jaxb/xmlbeans objects for
> instance or some axis variant.
>
> The interfaces generated by axis are likely largely correct for my uses,
> but it would be the implementation of the java interface methods which i
> want to change, etc.
>
> I have two separate cases.
>
> 1) in which the codegen uses only the abstract wsdl to generate the java
> code
> and
> 2) in which the codegen uses the concrete&abstract parts to generate the
> java code
>
> How can/does one plugin in their own code generators/emitters to axis? Or
> any other/better means to generate the code?
>
> I have already looked at jax-ws, but have not found it to be very
> pluggable.
>
> Any help or pointers to code or examples would be very helpful.
>
> Thanks,
>
> Jason
>
> ---------------------------------------------------------------------
> 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.
> blog: http://amilachinthaka.blogspot.com/
>
>  --------------------------------------------------------------------- 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.
blog: http://amilachinthaka.blogspot.com/

Re: I would like to utilize the axis framework to generate java code for wsdls which are not soap based.

Posted by Amila Suriarachchi <am...@gmail.com>.
you can plugin  custom emitters by changing the codegen-config.properties
file under codegen module.

thanks,
Amila.

On Wed, Oct 15, 2008 at 9:26 AM, Jason Weinstein <Ja...@sun.com>wrote:

> I would like to utilize the axis framework to generate java code for wsdls
> which are not soap based.
>
> I am looking to generate java classes which implement the wsdl operations.
>
> The arguments/return to the operations could be jaxb/xmlbeans objects for
> instance or some axis variant.
>
> The interfaces generated by axis are likely largely correct for my uses,
> but it would be the implementation of the java interface methods which i
> want to change, etc.
>
> I have two separate cases.
>
> 1) in which the codegen uses only the abstract wsdl to generate the java
> code
> and
> 2) in which the codegen uses the concrete&abstract parts to generate the
> java code
>
> How can/does one plugin in their own code generators/emitters to axis? Or
> any other/better means to generate the code?
>
> I have already looked at jax-ws, but have not found it to be very
> pluggable.
>
> Any help or pointers to code or examples would be very helpful.
>
> Thanks,
>
> Jason
>
> ---------------------------------------------------------------------
> 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.
blog: http://amilachinthaka.blogspot.com/

use of @ResponseWrapper in JAXWS

Posted by "Hu, Lan " <la...@citi.com>.
Hi all,

Does there detail doc about how to use the @ResponseWrapper in JAXWS? Does it provide marshall/unmarshall mechanism?

Thanks



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


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


How to turn on debug for this class?

Posted by Jason Weinstein <Ja...@Sun.COM>.
Just noticed this
    protected void debugLogDocument(String description, Document doc)

How to turn on debug for this class?
        log = 
LogFactory.getLog(org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.class);



I started with this silly piece of code which may be interesting to 
some. It works too.


public aspect AxisAspect {
    public pointcut withinEmitter() :
        within(org.apache.axis2.wsdl.codegen.emitter.*); // 
AxisServiceBasedMultiLanguageEmitter

    public pointcut createJoinPoint(
        Emitter emitter) :

        withinEmitter() &&       
        execution(protected Document create*())
        && this(emitter);


    Document around(Emitter emitter) :
        createJoinPoint(emitter) {
        System.out.println("create emitter: " + emitter);
        logJoinPoint(thisJoinPoint);
        Document doc = (Document) proceed(emitter);
        logDocument(doc);
        return doc;
    }
...
}

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