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 Peter Hargreaves <p....@bedsearcher.co.uk> on 2007/12/19 16:33:46 UTC

[Axis2] Service name change - creates WSDL generation problem.

I may have done my renaming wrongly, or missed a trick.

I have successfully developed and tested a service using Axis2 based on 
generation from our own wsdl.

For depolyment we needed to change the service name. To do this I:

1) Took a copy of the service.xml file generated from our wsdl.
2) Renamed the <service name="newname"> tag inside service.xml then used it to 
generate compile and jar the webservice.
3) Then changed oldname.aar to newname.aar
4) Run our JUnit tests on the new service successfully.

However, when we request newname?wsdl the returned wsdl is faulty.

Our original wsdl imported multiple files to define the schema:

<wsdl:types>
  <xs:schema>
    <xs:import namespace="http://www.ournamespace" 
schemaLocation="BsSearchEstabsRQ.xsd"/>
  </xs:schema>
   ...
<wsdl:types>

When requested from the running service they became:

<wsdl:types>
  <xs:schema attributeFormDefault="unqualified" 
elementFormDefault="unqualified">
    <xs:import namespace="http://www.ournamespace" 
schemaLocation="oldname?xsd=xsd0"/>
  </xs:schema>
   ...
<wsdl:types>

This was fine, but when requested from the renamed service they become:
 
<wsdl:types>
 <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://server.service.bs.org">
   <xs:element name="searchEstabs">
     <xs:complexType>
       <xs:sequence>
         <xs:element minOccurs="0" name="searchEstabs" nillable="true" 
type="xs:anyType"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 </xs:schema>
   ...
</wsdl:types>

The import references are missing and the complexTypes generated in their 
place bear no resemblance.

Have I done my renaming wrongly, have I missed a trick, or is there a bug? Any 
comments or advice would be welcome.

Many thanks,
Pete.H.

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


Re: [Axis2] Service name change - creates WSDL generation problem.

Posted by Peter Hargreaves <p....@bedsearcher.co.uk>.
On Saturday 22 December 2007 05:27:45 keith chapman wrote:
> If there is a WSDL inside your META-INF and you want to use that WSDL then
> the servicename in the services.xml should match the servicename in the
> WSDL. If it does not match Axis2 ignores the WSDL and creates the service
> using the services.xml. If you rename the service in the WSDL things should
> work for you.
>
> Thanks,
> Keith.

Thanks Keith this worked a treat.
Pete.H.

>
> On Dec 19, 2007 9:03 PM, Peter Hargreaves
> <p....@bedsearcher.co.uk>
>
> wrote:
> > I may have done my renaming wrongly, or missed a trick.
> >
> > I have successfully developed and tested a service using Axis2 based on
> > generation from our own wsdl.
> >
> > For depolyment we needed to change the service name. To do this I:
> >
> > 1) Took a copy of the service.xml file generated from our wsdl.
> > 2) Renamed the <service name="newname"> tag inside service.xml then used
> > it to
> > generate compile and jar the webservice.
> > 3) Then changed oldname.aar to newname.aar
> > 4) Run our JUnit tests on the new service successfully.
> >
> > However, when we request newname?wsdl the returned wsdl is faulty.
> >
> > Our original wsdl imported multiple files to define the schema:
> >
> > <wsdl:types>
> >  <xs:schema>
> >    <xs:import namespace="http://www.ournamespace"
> > schemaLocation="BsSearchEstabsRQ.xsd"/>
> >  </xs:schema>
> >   ...
> > <wsdl:types>
> >
> > When requested from the running service they became:
> >
> > <wsdl:types>
> >  <xs:schema attributeFormDefault="unqualified"
> > elementFormDefault="unqualified">
> >    <xs:import namespace="http://www.ournamespace"
> > schemaLocation="oldname?xsd=xsd0"/>
> >  </xs:schema>
> >   ...
> > <wsdl:types>
> >
> > This was fine, but when requested from the renamed service they become:
> >
> > <wsdl:types>
> >  <xs:schema attributeFormDefault="qualified"
> > elementFormDefault="qualified"
> > targetNamespace="http://server.service.bs.org">
> >   <xs:element name="searchEstabs">
> >     <xs:complexType>
> >       <xs:sequence>
> >         <xs:element minOccurs="0" name="searchEstabs" nillable="true"
> > type="xs:anyType"/>
> >       </xs:sequence>
> >     </xs:complexType>
> >   </xs:element>
> >  </xs:schema>
> >   ...
> > </wsdl:types>
> >
> > The import references are missing and the complexTypes generated in their
> > place bear no resemblance.
> >
> > Have I done my renaming wrongly, have I missed a trick, or is there a
> > bug? Any
> > comments or advice would be welcome.
> >
> > Many thanks,
> > Pete.H.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org



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


Re: [Axis2] Service name change - creates WSDL generation problem.

Posted by keith chapman <ke...@gmail.com>.
If there is a WSDL inside your META-INF and you want to use that WSDL then
the servicename in the services.xml should match the servicename in the
WSDL. If it does not match Axis2 ignores the WSDL and creates the service
using the services.xml. If you rename the service in the WSDL things should
work for you.

Thanks,
Keith.

On Dec 19, 2007 9:03 PM, Peter Hargreaves <p....@bedsearcher.co.uk>
wrote:

> I may have done my renaming wrongly, or missed a trick.
>
> I have successfully developed and tested a service using Axis2 based on
> generation from our own wsdl.
>
> For depolyment we needed to change the service name. To do this I:
>
> 1) Took a copy of the service.xml file generated from our wsdl.
> 2) Renamed the <service name="newname"> tag inside service.xml then used
> it to
> generate compile and jar the webservice.
> 3) Then changed oldname.aar to newname.aar
> 4) Run our JUnit tests on the new service successfully.
>
> However, when we request newname?wsdl the returned wsdl is faulty.
>
> Our original wsdl imported multiple files to define the schema:
>
> <wsdl:types>
>  <xs:schema>
>    <xs:import namespace="http://www.ournamespace"
> schemaLocation="BsSearchEstabsRQ.xsd"/>
>  </xs:schema>
>   ...
> <wsdl:types>
>
> When requested from the running service they became:
>
> <wsdl:types>
>  <xs:schema attributeFormDefault="unqualified"
> elementFormDefault="unqualified">
>    <xs:import namespace="http://www.ournamespace"
> schemaLocation="oldname?xsd=xsd0"/>
>  </xs:schema>
>   ...
> <wsdl:types>
>
> This was fine, but when requested from the renamed service they become:
>
> <wsdl:types>
>  <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://server.service.bs.org">
>   <xs:element name="searchEstabs">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element minOccurs="0" name="searchEstabs" nillable="true"
> type="xs:anyType"/>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
>  </xs:schema>
>   ...
> </wsdl:types>
>
> The import references are missing and the complexTypes generated in their
> place bear no resemblance.
>
> Have I done my renaming wrongly, have I missed a trick, or is there a bug?
> Any
> comments or advice would be welcome.
>
> Many thanks,
> Pete.H.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/