You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Farrukh S. Najmi" <fa...@wellfleetsoftware.com> on 2007/07/27 01:01:21 UTC
[1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Hello,
I am a newbie to Axis2 and looking for a sample and/or bootstrap
instructions on
creating a service from a WSDL 2.0 source within a maven 2 project. In
particular
I am not finding wsdl4j:wsdl4j:pom:1.6.2 anywhere.
Unfortunately I am unable to find docs, archived emails or wiki entries
to help me in my quest.
In fact, I am even not finding docs for Axis2 1.3-RC2 so I suspect I
missing something obvious.
Thanks for your help and sorry if I missed something.
--
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by p....@almerys.com.
Hi,
thanks for the answer.
I copied an erroneous Exception in my initial email, here is the correct
one:
[java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was
mapped to the name TEST_REQUETE with namespace
http://www.almerys.com/services/FSAServiceTest/xsd
[java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(
CodeGenerationEngine.java:265)
There can be errors in my wsdl as it was in rpc/lit style and I converted
it to document/literal. I'll correct the issues.
Pierre
"Anne Thomas Manes" <at...@gmail.com>
30/07/2007 13:44
Veuillez répondre à
axis-user@ws.apache.org
A
axis-user@ws.apache.org
cc
Objet
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Do you have any idea where the referenced namespace comes from? "
http://www.tests.com/services/ServiceTest/xsd "?
Is that specified in a configuration file somewhere?
A few minor issues with your WSDL:
In your schema, you must declare both imports before declaring any
elements.
And in the binding, you must remove the namespace attributes from the
<soap:body> declarations. (The namespace attribute must NOT be used when
using style="document". It should be used only when using style="rpc".)
When using document/literal, a <soap:body> declaration should look like
this:
<soap:body use="literal" />
Anne
On 7/30/07, p.casenove@almerys.com <p....@almerys.com> wrote:
Hi,
I've been updating to Axis2 1.3RC2 in order to try JAXB RI as the
databinding.
While my wsdl is correctly parsed and my code generated with adb and
xmlbeans, I receive the exception with jaxb:
[java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException :
org.apache.axis2.wsdl.databinding.UnmatchedTypeException : No type was
mapped to the name TEST_REQUETE with namespace
http://www.tests.com/services/ServiceTest/xsd
Here is the wsdl:
<?xml version="1.0" encoding ="UTF-8"?>
< wsdl:definitions
xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns=" http://www.almerys.com/services/FSAServiceTest"
xmlns:wsdl ="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap= "http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "
targetNamespace= "http://www.almerys.com/services/FSAServiceTest"
xmlns:typeRequest="
http://www.almerys.com/services/FSAServiceTest/types/request"
xmlns:typeReponse ="
http://www.almerys.com/services/FSAServiceTest/types/reponse"
xmlns:xsd1 ="http://www.almerys.com/services/FSAServiceTest/xsd ">
< wsdl:types>
< xsd:schema elementFormDefault="qualified"
targetNamespace=" http://www.almerys.com/services/FSAServiceTest/xsd"
xmlns=
"http://www.w3.org/2001/XMLSchema" xmlns:wsdl ="
http://schemas.xmlsoap.org/wsdl/ ">
< xsd:import
namespace= "
http://www.almerys.com/services/FSAServiceTest/types/request"
schemaLocation= "TEST_REQ.xsd" />
< xsd:element name= "TEST_REQUETE" type=
"typeRequest:TEST_REQUETE_DETAIL" />
<xsd:import
namespace="
http://www.almerys.com/services/FSAServiceTest/types/reponse"
schemaLocation="TEST_REP.xsd" />
<xsd:element name="TEST_REPONSE" type=
"typeReponse:TEST_REPONSE_DETAIL" />
</xsd:schema >
</wsdl:types >
< wsdl:message name="getTestRequest" >
<wsdl:part name="TEST_REQUETE" element =
"xsd1:TEST_REQUETE" />
</wsdl:message>
<wsdl:message name= "getTestResponse">
< wsdl:part name="TEST_REPONSE" element=
"xsd1:TEST_REPONSE" />
</wsdl:message>
<wsdl:portType name ="Test">
<wsdl:operation name= "getTest" parameterOrder=
"TEST_REQUETE" >
< wsdl:input message="tns:getTestRequest"
name="getTestRequest" />
< wsdl:output message="tns:getTestResponse"
name="getTestResponse" />
</ wsdl:operation>
</ wsdl:portType>
< wsdl:binding name="WebServiceTestSoapBinding" type="tns:Test">
<wsdlsoap:binding style ="document"
transport=" http://schemas.xmlsoap.org/soap/http"
/>
<wsdl:operation name= "getTest">
< wsdlsoap:operation soapAction="
http://www.almerys.com/services/FSAServiceTest/getTest" style= "document"
/>
< wsdl:input name= "getTestRequest">
<wsdlsoap:body
namespace="
http://www.almerys.com/services/FSAServiceTest"
use ="literal" />
</wsdl:input>
<wsdl:output name ="getTestResponse">
<wsdlsoap:body
namespace="
http://www.almerys.com/services/FSAServiceTest"
use ="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding >
<wsdl:service name="ServiceTest">
<wsdl:port binding ="tns:WebServiceTestSoapBinding"
name="ServiceTest">
<wsdlsoap:address
location="
http://localhost:8080/fsa/services/ServiceTest" />
<wsdlsoap:address
location="
http://localhost:8080/fsa/serverAuthent/ServiceTest" />
</wsdl:port>
</wsdl:service>
</ wsdl:definitions>
Am I making an error in the wsdl or is it a bug from the code generator?
Thanks,
Pierre
"Davanum Srinivas" <da...@gmail.com>
27/07/2007 03:07
Veuillez répondre à
axis-user@ws.apache.org
A
axis-user@ws.apache.org
cc
Objet
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Farrukh,
You can use WSDLJava.bat/sh from the command line (either nightly or
1.3 RC2) with "-d jaxbri" to select the JAXB RI as the data binding.
-- dims
On 7/26/07, Farrukh S. Najmi <fa...@wellfleetsoftware.com> wrote:
> Davanum Srinivas wrote:
> > Farrukh,
> >
> > I just updated the ant task and maven2 mojo this morning :) docs are
> > still in the works. will try to post something as soon as possible.
> Sounds good. Do you advice building against latest svn bits?
>
> Also, is it possible to use JAXB RI from Sun with Axis 2?
>
> Thanks again for your help.
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by Anne Thomas Manes <at...@gmail.com>.
Do you have any idea where the referenced namespace comes from? "
http://www.tests.com/services/ServiceTest/xsd "?
Is that specified in a configuration file somewhere?
A few minor issues with your WSDL:
In your schema, you must declare both imports before declaring any elements.
And in the binding, you must remove the namespace attributes from the
<soap:body> declarations. (The namespace attribute must NOT be used when
using style="document". It should be used only when using style="rpc".) When
using document/literal, a <soap:body> declaration should look like this:
<soap:body use="literal" />
Anne
On 7/30/07, p.casenove@almerys.com <p....@almerys.com> wrote:
>
>
> Hi,
> I've been updating to Axis2 1.3RC2 in order to try JAXB RI as the
> databinding.
> While my wsdl is correctly parsed and my code generated with adb and
> xmlbeans, I receive the exception with jaxb:
> [*java*] Exception in thread "main" *
> org.apache.axis2.wsdl.codegen.CodeGenerationException*: *
> org.apache.axis2.wsdl.codegen.CodeGenerationException*: *
> org.apache.axis2.wsdl.databinding.UnmatchedTypeException*: No type was
> mapped to the name TEST_REQUETE with namespace
> http://www.tests.com/services/ServiceTest/xsd
>
>
> Here is the wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="http://www.almerys.com/services/FSAServiceTest"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> targetNamespace="http://www.almerys.com/services/FSAServiceTest"
> xmlns:typeRequest="
> http://www.almerys.com/services/FSAServiceTest/types/request"
> xmlns:typeReponse="
> http://www.almerys.com/services/FSAServiceTest/types/reponse"
> xmlns:xsd1="http://www.almerys.com/services/FSAServiceTest/xsd">
> <wsdl:types>
> <xsd:schema elementFormDefault="qualified" targetNamespace
> ="http://www.almerys.com/services/FSAServiceTest/xsd" xmlns=
> "http://www.w3.org/2001/XMLSchema" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/">
> <xsd:import
> namespace="
> http://www.almerys.com/services/FSAServiceTest/types/request"
> schemaLocation="TEST_REQ.xsd" />
>
> <xsd:element name="TEST_REQUETE" type="typeRequest:TEST_REQUETE_DETAIL"
> />
>
> <xsd:import
> namespace="
> http://www.almerys.com/services/FSAServiceTest/types/reponse"
> schemaLocation="TEST_REP.xsd" />
>
> <xsd:element name="TEST_REPONSE" type="typeReponse:TEST_REPONSE_DETAIL"
> />
> </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="getTestRequest">
> <wsdl:part name="TEST_REQUETE" element="xsd1:TEST_REQUETE"
> />
> </wsdl:message>
>
> <wsdl:message name="getTestResponse">
> <wsdl:part name="TEST_REPONSE" element="xsd1:TEST_REPONSE"
> />
> </wsdl:message>
>
> <wsdl:portType name="Test">
> <wsdl:operation name="getTest" parameterOrder=
> "TEST_REQUETE">
> <wsdl:input message="tns:getTestRequest"
> name="getTestRequest" />
> <wsdl:output message="tns:getTestResponse"
> name="getTestResponse" />
> </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="WebServiceTestSoapBinding" type="tns:Test">
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"
> />
> <wsdl:operation name="getTest">
> <wsdlsoap:operation soapAction="
> http://www.almerys.com/services/FSAServiceTest/getTest" style="document"
> />
> <wsdl:input name="getTestRequest">
> <wsdlsoap:body
> namespace="
> http://www.almerys.com/services/FSAServiceTest"
> use="literal" />
> </wsdl:input>
> <wsdl:output name="getTestResponse">
> <wsdlsoap:body
> namespace="
> http://www.almerys.com/services/FSAServiceTest"
> use="literal" />
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
>
>
> <wsdl:service name="ServiceTest">
> <wsdl:port binding="tns:WebServiceTestSoapBinding"
> name="ServiceTest">
>
> <wsdlsoap:address
> location="
> http://localhost:8080/fsa/services/ServiceTest" />
> <wsdlsoap:address
> location="
> http://localhost:8080/fsa/serverAuthent/ServiceTest" />
> </wsdl:port>
> </wsdl:service>
>
> </wsdl:definitions>
>
> Am I making an error in the wsdl or is it a bug from the code generator?
>
> Thanks,
>
> Pierre
>
>
>
> *"Davanum Srinivas" <da...@gmail.com>*
>
> 27/07/2007 03:07 Veuillez répondre à
> axis-user@ws.apache.org
>
> A
> axis-user@ws.apache.org cc
> Objet
> Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
>
>
>
>
> Farrukh,
>
> You can use WSDLJava.bat/sh from the command line (either nightly or
> 1.3 RC2) with "-d jaxbri" to select the JAXB RI as the data binding.
>
> -- dims
>
> On 7/26/07, Farrukh S. Najmi <fa...@wellfleetsoftware.com> wrote:
> > Davanum Srinivas wrote:
> > > Farrukh,
> > >
> > > I just updated the ant task and maven2 mojo this morning :) docs are
> > > still in the works. will try to post something as soon as possible.
> > Sounds good. Do you advice building against latest svn bits?
> >
> > Also, is it possible to use JAXB RI from Sun with Axis 2?
> >
> > Thanks again for your help.
> >
> > --
> > Regards,
> > Farrukh
> >
> > Web: http://www.wellfleetsoftware.com
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by p....@almerys.com.
Hi,
I've been updating to Axis2 1.3RC2 in order to try JAXB RI as the
databinding.
While my wsdl is correctly parsed and my code generated with adb and
xmlbeans, I receive the exception with jaxb:
[java] Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was
mapped to the name TEST_REQUETE with namespace
http://www.tests.com/services/ServiceTest/xsd
Here is the wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.almerys.com/services/FSAServiceTest"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="http://www.almerys.com/services/FSAServiceTest"
xmlns:typeRequest=
"http://www.almerys.com/services/FSAServiceTest/types/request"
xmlns:typeReponse=
"http://www.almerys.com/services/FSAServiceTest/types/reponse"
xmlns:xsd1="http://www.almerys.com/services/FSAServiceTest/xsd">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace
="http://www.almerys.com/services/FSAServiceTest/xsd" xmlns=
"http://www.w3.org/2001/XMLSchema" xmlns:wsdl=
"http://schemas.xmlsoap.org/wsdl/">
<xsd:import
namespace=
"http://www.almerys.com/services/FSAServiceTest/types/request"
schemaLocation="TEST_REQ.xsd" />
<xsd:element name="TEST_REQUETE" type=
"typeRequest:TEST_REQUETE_DETAIL" />
<xsd:import
namespace=
"http://www.almerys.com/services/FSAServiceTest/types/reponse"
schemaLocation="TEST_REP.xsd" />
<xsd:element name="TEST_REPONSE" type=
"typeReponse:TEST_REPONSE_DETAIL" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="getTestRequest">
<wsdl:part name="TEST_REQUETE" element="xsd1:TEST_REQUETE"
/>
</wsdl:message>
<wsdl:message name="getTestResponse">
<wsdl:part name="TEST_REPONSE" element="xsd1:TEST_REPONSE"
/>
</wsdl:message>
<wsdl:portType name="Test">
<wsdl:operation name="getTest" parameterOrder=
"TEST_REQUETE">
<wsdl:input message="tns:getTestRequest"
name="getTestRequest" />
<wsdl:output message="tns:getTestResponse"
name="getTestResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceTestSoapBinding" type="tns:Test">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"
/>
<wsdl:operation name="getTest">
<wsdlsoap:operation soapAction=
"http://www.almerys.com/services/FSAServiceTest/getTest" style="document"
/>
<wsdl:input name="getTestRequest">
<wsdlsoap:body
namespace=
"http://www.almerys.com/services/FSAServiceTest"
use="literal" />
</wsdl:input>
<wsdl:output name="getTestResponse">
<wsdlsoap:body
namespace=
"http://www.almerys.com/services/FSAServiceTest"
use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServiceTest">
<wsdl:port binding="tns:WebServiceTestSoapBinding"
name="ServiceTest">
<wsdlsoap:address
location=
"http://localhost:8080/fsa/services/ServiceTest" />
<wsdlsoap:address
location=
"http://localhost:8080/fsa/serverAuthent/ServiceTest" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Am I making an error in the wsdl or is it a bug from the code generator?
Thanks,
Pierre
"Davanum Srinivas" <da...@gmail.com>
27/07/2007 03:07
Veuillez répondre à
axis-user@ws.apache.org
A
axis-user@ws.apache.org
cc
Objet
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Farrukh,
You can use WSDLJava.bat/sh from the command line (either nightly or
1.3 RC2) with "-d jaxbri" to select the JAXB RI as the data binding.
-- dims
On 7/26/07, Farrukh S. Najmi <fa...@wellfleetsoftware.com> wrote:
> Davanum Srinivas wrote:
> > Farrukh,
> >
> > I just updated the ant task and maven2 mojo this morning :) docs are
> > still in the works. will try to post something as soon as possible.
> Sounds good. Do you advice building against latest svn bits?
>
> Also, is it possible to use JAXB RI from Sun with Axis 2?
>
> Thanks again for your help.
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by Davanum Srinivas <da...@gmail.com>.
Farrukh,
You can use WSDLJava.bat/sh from the command line (either nightly or
1.3 RC2) with "-d jaxbri" to select the JAXB RI as the data binding.
-- dims
On 7/26/07, Farrukh S. Najmi <fa...@wellfleetsoftware.com> wrote:
> Davanum Srinivas wrote:
> > Farrukh,
> >
> > I just updated the ant task and maven2 mojo this morning :) docs are
> > still in the works. will try to post something as soon as possible.
> Sounds good. Do you advice building against latest svn bits?
>
> Also, is it possible to use JAXB RI from Sun with Axis 2?
>
> Thanks again for your help.
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by "Farrukh S. Najmi" <fa...@wellfleetsoftware.com>.
Davanum Srinivas wrote:
> Farrukh,
>
> I just updated the ant task and maven2 mojo this morning :) docs are
> still in the works. will try to post something as soon as possible.
Sounds good. Do you advice building against latest svn bits?
Also, is it possible to use JAXB RI from Sun with Axis 2?
Thanks again for your help.
--
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [1.3-RC2] Build JAX-WS server from wsdl in maven2 project
Posted by Davanum Srinivas <da...@gmail.com>.
Farrukh,
I just updated the ant task and maven2 mojo this morning :) docs are
still in the works. will try to post something as soon as possible.
thanks,
dims
On 7/26/07, Farrukh S. Najmi <fa...@wellfleetsoftware.com> wrote:
>
> Hello,
>
> I am a newbie to Axis2 and looking for a sample and/or bootstrap
> instructions on
> creating a service from a WSDL 2.0 source within a maven 2 project. In
> particular
> I am not finding wsdl4j:wsdl4j:pom:1.6.2 anywhere.
>
>
> Unfortunately I am unable to find docs, archived emails or wiki entries
> to help me in my quest.
> In fact, I am even not finding docs for Axis2 1.3-RC2 so I suspect I
> missing something obvious.
>
> Thanks for your help and sorry if I missed something.
>
> --
> Regards,
> Farrukh
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org