You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Yang ZHONG <le...@gmail.com> on 2007/02/24 00:36:30 UTC

[SCA] Java2WSDL source path and SDO integration

2 questions on Java2WSDL.

2-1. Source path
  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for Eclipse.
  The source path is incomplete, therefore not only can't the project
compile, but also does the Test Case generate empty WSDL portType. (WSDL
content is not checked)
  How to make this into .classpath please:
    <classpathentry kind="src" path="target/sdo-source"/>

2-2. SDO integration
  A Java class may be a static SDO. Not only may SDO have XSD info, but also
could SDO know XSD location.
  What do you think to enable all these options:
  1. Option -importSchema: If XSD location is available, generate WSDL to
import that.
      Axis(2) supports option "-C, --importSchema" (
http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
  2. Option -importSDO: If XSD into is available, generate XSD using SDO and
generate WSDL using Axis(2) to import that
  3. Option -inlineSDO: If XSD info is available, generate WSDL using
Axis(2) with inline schema from SDO

-- 

Yang ZHONG

Re: [SCA] Java2WSDL source path and SDO integration

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
>
> Your question reminded that I had fixed the sdo plugin to do so, but 
> the "build-helper-maven-plugin" helps for other code-gen plugins such 
> as JAXB.
>
> Also you want to make sure the code-gen happens at 
> "<phase>generate-test-sources</phase>". If it's too late, then mvn 
> eclipse:eclipse won't trigger it.
>
> Thanks,
> Raymond
>

http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionXbindingTest/pom.xml 
is a working example. It uses our SDO and WSDL2Java plugins and the 
JAXWS WSDL2Java plugin, and all seem to play nicely with 
eclipse:eclipse, the generated .classpath file contains the correct 
source entries.

BTW do you know how to contribute to the classpath configuration on the 
eclipse:eclipse goal, but without actually generating the Java code?

-- 
Jean-Sebastien


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


Re: [SCA] Java2WSDL source path and SDO integration

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Your question reminded that I had fixed the sdo plugin to do so, but the 
"build-helper-maven-plugin" helps for other code-gen plugins such as JAXB.

Also you want to make sure the code-gen happens at 
"<phase>generate-test-sources</phase>". If it's too late, then mvn 
eclipse:eclipse won't trigger it.

Thanks,
Raymond

----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Friday, February 23, 2007 5:41 PM
Subject: Re: [SCA] Java2WSDL source path and SDO integration


> Raymond Feng wrote:
>> Hi,
>>
>> Adding the following plugin into pom.xml will help you setup addtional 
>> source/testSource folders:
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.codehaus.mojo</groupId>
>> <artifactId>build-helper-maven-plugin</artifactId>
>> <version>1.0</version>
>> <executions>
>> <execution>
>> <id>add-test-source</id>
>> <phase>generate-sources</phase>
>> <goals>
>> <goal>add-test-source</goal> <!-- or add-source -->
>> </goals>
>> <configuration>
>> <sources>
>> <source>target/sdo-source</source>
>> </sources>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> ...
>> </plugins>
>> </build>
>>
>>
>>
>> Thanks,
>> Raymond
>
> Isn't having the tuscany-sdo-plugin (which is the plugin that generates 
> code in target/sdo-source) in the build section sufficient? At least it 
> works in testing/sca/itest/exceptionXbindingTest for example, I am seeing 
> target/sdo-source in the classpath, without having to add it with 
> build-helper-maven-plugin.
>
>
>> ----- Original Message ----- From: "Yang ZHONG" 
>> <le...@gmail.com>
>> To: <tu...@ws.apache.org>
>> Sent: Friday, February 23, 2007 3:36 PM
>> Subject: [SCA] Java2WSDL source path and SDO integration
>>
>>
>>> 2 questions on Java2WSDL.
>>>
>>> 2-1. Source path
>>>  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for 
>>> Eclipse.
>>>  The source path is incomplete, therefore not only can't the project
>>> compile, but also does the Test Case generate empty WSDL portType. (WSDL
>>> content is not checked)
>>>  How to make this into .classpath please:
>>>    <classpathentry kind="src" path="target/sdo-source"/>
>>>
>>> 2-2. SDO integration
>>>  A Java class may be a static SDO. Not only may SDO have XSD info, but 
>>> also
>>> could SDO know XSD location.
>>>  What do you think to enable all these options:
>>>  1. Option -importSchema: If XSD location is available, generate WSDL to
>>> import that.
>>>      Axis(2) supports option "-C, --importSchema" (
>>> http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
>>>  2. Option -importSDO: If XSD into is available, generate XSD using SDO 
>>> and
>>> generate WSDL using Axis(2) to import that
>>>  3. Option -inlineSDO: If XSD info is available, generate WSDL using
>>> Axis(2) with inline schema from SDO
>>>
>>> -- 
>>>
>>> Yang ZHONG
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>
> -- 
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


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


Re: [SCA] Java2WSDL source path and SDO integration

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
>
> Adding the following plugin into pom.xml will help you setup addtional 
> source/testSource folders:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>build-helper-maven-plugin</artifactId>
> <version>1.0</version>
> <executions>
> <execution>
> <id>add-test-source</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>add-test-source</goal> <!-- or add-source -->
> </goals>
> <configuration>
> <sources>
> <source>target/sdo-source</source>
> </sources>
> </configuration>
> </execution>
> </executions>
> </plugin>
> ...
> </plugins>
> </build>
>
>
>
> Thanks,
> Raymond

Isn't having the tuscany-sdo-plugin (which is the plugin that generates 
code in target/sdo-source) in the build section sufficient? At least it 
works in testing/sca/itest/exceptionXbindingTest for example, I am 
seeing target/sdo-source in the classpath, without having to add it 
with  build-helper-maven-plugin.


> ----- Original Message ----- From: "Yang ZHONG" 
> <le...@gmail.com>
> To: <tu...@ws.apache.org>
> Sent: Friday, February 23, 2007 3:36 PM
> Subject: [SCA] Java2WSDL source path and SDO integration
>
>
>> 2 questions on Java2WSDL.
>>
>> 2-1. Source path
>>  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for 
>> Eclipse.
>>  The source path is incomplete, therefore not only can't the project
>> compile, but also does the Test Case generate empty WSDL portType. (WSDL
>> content is not checked)
>>  How to make this into .classpath please:
>>    <classpathentry kind="src" path="target/sdo-source"/>
>>
>> 2-2. SDO integration
>>  A Java class may be a static SDO. Not only may SDO have XSD info, 
>> but also
>> could SDO know XSD location.
>>  What do you think to enable all these options:
>>  1. Option -importSchema: If XSD location is available, generate WSDL to
>> import that.
>>      Axis(2) supports option "-C, --importSchema" (
>> http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
>>  2. Option -importSDO: If XSD into is available, generate XSD using 
>> SDO and
>> generate WSDL using Axis(2) to import that
>>  3. Option -inlineSDO: If XSD info is available, generate WSDL using
>> Axis(2) with inline schema from SDO
>>
>> -- 
>>
>> Yang ZHONG
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
Jean-Sebastien


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


Re: [SCA] Java2WSDL source path and SDO integration

Posted by Raymond Feng <en...@gmail.com>.
Hi,

Adding the following plugin into pom.xml will help you setup addtional 
source/testSource folders:

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal> <!-- or add-source -->
</goals>
<configuration>
<sources>
<source>target/sdo-source</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
</build>



Thanks,
Raymond
----- Original Message ----- 
From: "Yang ZHONG" <le...@gmail.com>
To: <tu...@ws.apache.org>
Sent: Friday, February 23, 2007 3:36 PM
Subject: [SCA] Java2WSDL source path and SDO integration


>2 questions on Java2WSDL.
>
> 2-1. Source path
>  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for Eclipse.
>  The source path is incomplete, therefore not only can't the project
> compile, but also does the Test Case generate empty WSDL portType. (WSDL
> content is not checked)
>  How to make this into .classpath please:
>    <classpathentry kind="src" path="target/sdo-source"/>
>
> 2-2. SDO integration
>  A Java class may be a static SDO. Not only may SDO have XSD info, but 
> also
> could SDO know XSD location.
>  What do you think to enable all these options:
>  1. Option -importSchema: If XSD location is available, generate WSDL to
> import that.
>      Axis(2) supports option "-C, --importSchema" (
> http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
>  2. Option -importSDO: If XSD into is available, generate XSD using SDO 
> and
> generate WSDL using Axis(2) to import that
>  3. Option -inlineSDO: If XSD info is available, generate WSDL using
> Axis(2) with inline schema from SDO
>
> -- 
>
> Yang ZHONG
> 


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


Re: [SCA] Java2WSDL source path and SDO integration

Posted by Yang ZHONG <le...@gmail.com>.
Created and prototyped http://issues.apache.org/jira/browse/TUSCANY-1144
to make "2-2. SDO integration" "Option -importSchema" possible.


On 2/23/07, Yang ZHONG <le...@gmail.com> wrote:
>
> I've tried option "-C, --importSchema" with Axis2 1.1.1, not supported
> (yet).
>
> As for proposed option "-importSDO", no intention to use SDO mapping
> (since JAXB may be the domain candidate).
> Static SDO is only used for its XSD info if available, such as NameSpace,
> element/attribute form, cardinality, default, annotation, substitution,
> sequence/choice, etc. which are not available from Java class.
>
>  On 2/23/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> >
> > I have more questions on your questions :)
> >
> > Yang ZHONG wrote:
> > > 2 questions on Java2WSDL.
> > >
> > > 2-1. Source path
> > >  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for
> > > Eclipse.
> > >  The source path is incomplete, therefore not only can't the project
> > > compile, but also does the Test Case generate empty WSDL portType.
> > (WSDL
> > > content is not checked)
> > >  How to make this into .classpath please:
> > >    <classpathentry kind="src" path="target/sdo-source"/>
> >
> > This usually works for me. Can you describe the steps you're following,
> > starting with which folder are you running mvn -Peclipse eclipse:eclipse
> > from?
> >
> > >
> > > 2-2. SDO integration
> > >  A Java class may be a static SDO. Not only may SDO have XSD info, but
> > > also
> > > could SDO know XSD location.
> > >  What do you think to enable all these options:
> > >  1. Option -importSchema: If XSD location is available, generate WSDL
> > to
> > > import that.
> > >      Axis(2) supports option "-C, --importSchema" (
> > > http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
> >
> > Do you know how this option works in the Axis2 Java2WSDL? Is there a
> > pointer to more info?
> >
> > The Axis2 doc says "-C a file or URL to an XML Schema that should be
> > physically imported into the generated WSDL", but it doesn't say:
> > - if this can be used to import multiple XSDs
> > - if "physically import" means copy the contents of the XSD or just
> > generate an <xsd:import> statement
> > - if the tool will still generate some XSD types on its own or will not
> > generate any XSD, assuming that the imported XSD covers all the types
> > that need to be generated.
> >
> > >  2. Option -importSDO: If XSD into is available, generate XSD using
> > > SDO and
> > > generate WSDL using Axis(2) to import that
> >
> > What do you mean by "generate XSD using SDO"? Are you talking about
> > generating an XSD from the SDO type definition, using the SDO <-> XSD
> > mapping rules described in the SDO spec?
> >
> > >  3. Option -inlineSDO: If XSD info is available, generate WSDL using
> > > Axis(2) with inline schema from SDO
> > >
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
>
> --
>
> Yang ZHONG




-- 

Yang ZHONG

Re: [SCA] Java2WSDL source path and SDO integration

Posted by Yang ZHONG <le...@gmail.com>.
I've tried option "-C, --importSchema" with Axis2 1.1.1, not supported
(yet).

As for proposed option "-importSDO", no intention to use SDO mapping (since
JAXB may be the domain candidate).
Static SDO is only used for its XSD info if available, such as NameSpace,
element/attribute form, cardinality, default, annotation, substitution,
sequence/choice, etc. which are not available from Java class.

On 2/23/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> I have more questions on your questions :)
>
> Yang ZHONG wrote:
> > 2 questions on Java2WSDL.
> >
> > 2-1. Source path
> >  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for
> > Eclipse.
> >  The source path is incomplete, therefore not only can't the project
> > compile, but also does the Test Case generate empty WSDL portType. (WSDL
> > content is not checked)
> >  How to make this into .classpath please:
> >    <classpathentry kind="src" path="target/sdo-source"/>
>
> This usually works for me. Can you describe the steps you're following,
> starting with which folder are you running mvn -Peclipse eclipse:eclipse
> from?
>
> >
> > 2-2. SDO integration
> >  A Java class may be a static SDO. Not only may SDO have XSD info, but
> > also
> > could SDO know XSD location.
> >  What do you think to enable all these options:
> >  1. Option -importSchema: If XSD location is available, generate WSDL to
> > import that.
> >      Axis(2) supports option "-C, --importSchema" (
> > http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)
>
> Do you know how this option works in the Axis2 Java2WSDL? Is there a
> pointer to more info?
>
> The Axis2 doc says "-C a file or URL to an XML Schema that should be
> physically imported into the generated WSDL", but it doesn't say:
> - if this can be used to import multiple XSDs
> - if "physically import" means copy the contents of the XSD or just
> generate an <xsd:import> statement
> - if the tool will still generate some XSD types on its own or will not
> generate any XSD, assuming that the imported XSD covers all the types
> that need to be generated.
>
> >  2. Option -importSDO: If XSD into is available, generate XSD using
> > SDO and
> > generate WSDL using Axis(2) to import that
>
> What do you mean by "generate XSD using SDO"? Are you talking about
> generating an XSD from the SDO type definition, using the SDO <-> XSD
> mapping rules described in the SDO spec?
>
> >  3. Option -inlineSDO: If XSD info is available, generate WSDL using
> > Axis(2) with inline schema from SDO
> >
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 

Yang ZHONG

Re: [SCA] Java2WSDL source path and SDO integration

Posted by Jean-Sebastien Delfino <js...@apache.org>.
I have more questions on your questions :)

Yang ZHONG wrote:
> 2 questions on Java2WSDL.
>
> 2-1. Source path
>  I use "mvn -Peclipse eclipse:eclipse" to generate .classpath for 
> Eclipse.
>  The source path is incomplete, therefore not only can't the project
> compile, but also does the Test Case generate empty WSDL portType. (WSDL
> content is not checked)
>  How to make this into .classpath please:
>    <classpathentry kind="src" path="target/sdo-source"/>

This usually works for me. Can you describe the steps you're following, 
starting with which folder are you running mvn -Peclipse eclipse:eclipse 
from?

>
> 2-2. SDO integration
>  A Java class may be a static SDO. Not only may SDO have XSD info, but 
> also
> could SDO know XSD location.
>  What do you think to enable all these options:
>  1. Option -importSchema: If XSD location is available, generate WSDL to
> import that.
>      Axis(2) supports option "-C, --importSchema" (
> http://ws.apache.org/axis/java/reference.html#Java2WSDLReference)

Do you know how this option works in the Axis2 Java2WSDL? Is there a 
pointer to more info?

The Axis2 doc says "-C a file or URL to an XML Schema that should be 
physically imported into the generated WSDL", but it doesn't say:
- if this can be used to import multiple XSDs
- if "physically import" means copy the contents of the XSD or just 
generate an <xsd:import> statement
- if the tool will still generate some XSD types on its own or will not 
generate any XSD, assuming that the imported XSD covers all the types 
that need to be generated.

>  2. Option -importSDO: If XSD into is available, generate XSD using 
> SDO and
> generate WSDL using Axis(2) to import that

What do you mean by "generate XSD using SDO"? Are you talking about 
generating an XSD from the SDO type definition, using the SDO <-> XSD 
mapping rules described in the SDO spec?

>  3. Option -inlineSDO: If XSD info is available, generate WSDL using
> Axis(2) with inline schema from SDO
>

-- 
Jean-Sebastien


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