[
https://issues.apache.org/jira/browse/AXIS2-1810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768296#action_12768296
]
John Miller commented on AXIS2-1810:
------------------------------------
I going through the same issue right now. Currently, we are upgrading from Axis
1.x to Axis 2.x and are facing issues with schema and wsdl changes/versioning
changes during this upgrade due to additional requirements from our clients.
I understand what Gul is asking. I tried to handle this by making modifications
to our WSDL files to include 2 different ports (see below) under the Service
element as well as 2 different binding elements. This allows me to use the same
operation names and gives me the ability to point these to a specific schema
version. The autogenerate code works as desired as well as generating separate
package names per version. However, this also generates 2 soap binding
implementations i.e.: SOAPBindingImplV4.java and SOAPBindingImplV5.java. Now, I
need to either create a separate request/response handling class or duplicate
code in each soap binding impl class. Neither is really desirable.
My question, is there a better method to this madness? What is the industry
standard or Axis's methodology/architecture to accompolish/tackle this type of
verioning issue? Would a global handler that intercepts all incoming and
outgoing messages work better from an architecture standpoint? If so, what code
or framework is available under Axis 2.x? Does the Axis team have any examples
that would so this type of architect/code samples?
================================== MyWsdl File
====================================
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://example/platforms"
xmlns:v5="http://example/v5.0/platforms"
xmlns:v4="http://example/v4.0/platforms"
xmlns:ns="http://example/v4.0/common"
xmlns:ns1="http://example/v4.0/error"
targetNamespace="http://example/platforms" name="Platforms">
<types>
<xs:schema targetNamespace="http://example/v5.0/platforms">
<xs:include schemaLocation="v5/Platforms.xsd"/>
</xs:schema>
<xs:schema targetNamespace="http://example/v4.0/platforms">
<xs:include schemaLocation="v4/Platforms.xsd"/>
</xs:schema>
</types>
<message name="PlatformSummaryRequestMessage">
<part name="request" element="v5:PlatformSummaryRequest"/>
</message>
<message name="PlatformSummaryResponseMessage">
<part name="request" element="v5:PlatformSummaryResponse"/>
</message>
<message name="ShipQueryRequestMessage">
<part name="request" element="v5:ShipQueryRequest"/>
</message>
<message name="ShipQueryResponseMessage">
<part name="request" element="v5:ShipQueryResponse"/>
</message>
<message name="PlatformModRequestMessage">
<part name="request" element="v5:PlatformModRequest"/>
</message>
<message name="PlatformModResponseMessage">
<part name="request" element="v5:PlatformModResponse"/>
</message>
<portType name="PlatformsPortTypeV5">
<operation name="PlatformSummaryRequestOperation">
<input message="tns:PlatformSummaryRequestMessage"/>
<output message="tns:PlatformSummaryResponseMessage"/>
</operation>
<operation name="ShipQueryRequestOperation">
<input message="tns:ShipQueryRequestMessage"/>
<output message="tns:ShipQueryResponseMessage"/>
</operation>
<operation name="PlatformModRequestOperation">
<input message="tns:PlatformModRequestMessage"/>
<output message="tns:PlatformModResponseMessage"/>
</operation>
</portType>
<portType name="PlatformsPortTypeV4">
<operation name="PlatformSummaryRequestOperation">
<input message="tns:PlatformSummaryRequestMessage"/>
<output message="tns:PlatformSummaryResponseMessage"/>
</operation>
<operation name="ShipQueryRequestOperation">
<input message="tns:ShipQueryRequestMessage"/>
<output message="tns:ShipQueryResponseMessage"/>
</operation>
<operation name="PlatformModRequestOperation">
<input message="tns:PlatformModRequestMessage"/>
<output message="tns:PlatformModResponseMessage"/>
</operation>
</portType>
<binding name="PlatformsSOAPBindingV5" type="tns:PlatformsPortTypeV5">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="PlatformSummaryRequestOperation">
<soap:operation
soapAction="PlatformSummaryRequestOperationAction/v5"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="ShipQueryRequestOperation">
<soap:operation
soapAction="ShipQueryRequestOperationAction/v5"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="PlatformModRequestOperation">
<soap:operation
soapAction="PlatformModRequestOperationAction/v5"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="PlatformsSOAPBindingV4" type="tns:PlatformsPortTypeV4">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="PlatformSummaryRequestOperation">
<soap:operation
soapAction="PlatformSummaryRequestOperationAction/v4"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="ShipQueryRequestOperation">
<soap:operation
soapAction="ShipQueryRequestOperationAction/v4"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="PlatformModRequestOperation">
<soap:operation
soapAction="PlatformModRequestOperationAction/v4"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Platforms">
<port name="PlatformsV5" binding="tns:PlatformsSOAPBindingV5">
<soap:address
location="http://localhost:8080/ws/services/Platforms/v5"/>
</port>
<port name="PlatformsV4" binding="tns:PlatformsSOAPBindingV4">
<soap:address
location="http://localhost:8080/ws/services/Platforms/v4"/>
</port>
</service>
</definitions>
===================================================================================
Thanks. Any information or comment is welcome.
> Cannot deploy multiple versions of the same service
> ---------------------------------------------------
>
> Key: AXIS2-1810
> URL: https://issues.apache.org/jira/browse/AXIS2-1810
> Project: Axis 2.0 (Axis2)
> Issue Type: New Feature
> Components: kernel
> Affects Versions: 1.1
> Reporter: Gul Onural
> Assignee: Deepal Jayasinghe
>
> I am trying to deploy multiple versions of the same web service without
> changing the name of the service and wsdl. Instead, I want to be able to do
> that by changing namespace of the service in the wsdl file and location of
> the service. For example :
> MyService - version 1
> =================
> ServiceName = MyService
> Location = http://localhost/axis2/services/v1.0/MyService
> Wsdl namespace = http://www.mycompany.com/Namespace1
> MyService - version 2
> =================
> ServiceName = MyService
> Location = http://localhost/axis2/services/v2.0/MyService
> Wsdl namespace = http://www.mycompany.com/Namespace2
> Currently Axis2 doesn't have a mechanism to deploy multiple versions of the
> same service by chaging its location and wsdl namespace. The services
> repository has not been designed to accomadate multiple versions of the same
> service (you can have only one service repository).
> It can probably be done providing support for deploying multiple versions of
> the same service similar to the mechansim provided for deploying multiple
> versions of the same "module".
> Gul
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.