Announcement Announcement Module
Collapse
No announcement yet.
Question regarding 2 web services with identical namespace and localParts. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question regarding 2 web services with identical namespace and localParts.

    I'm attempting to create 2 separate web services, both within one spring deployment, both with the wsdl's being generated from the same xsd schemas, yet have them be routed to two separate end points so i can handle the requests differently in the separate contexts. I'm conforming to a spec (SPML), that's why i have identical namespace and localparts across both web services.

    Ex:

    Webservice 1: subset of access, lower privileges and security constraints

    Webservice 2: higher privileges

    <sws:dynamic-wsdl id="spml-readonly"
    portTypeName="SpmlReadOnlyService"
    locationUri="SpmlReadOnly">
    <sws:xsd location="/WEB-INF/xsd/spml/pstc_spmlv2_core.xsd"/>
    </sws:dynamic-wsdl>

    <sws:dynamic-wsdl id="spml-crud"
    portTypeName="SpmlCrudService"
    locationUri="SpmlCrud">
    <sws:xsd location="/WEB-INF/xsd/spml/pstc_spmlv2_core.xsd"/>
    <sws:xsd location="/WEB-INF/xsd/spml/pstc_spmlv2_search.xsd"/>
    <sws:xsd location="/WEB-INF/xsd/spml/pstc_spmlv2_batch.xsd"/>
    </sws:dynamic-wsdl>

    Now since both wsdls are based off of the same xsds, the 'namespace' and 'localPart" of the requests come across the wire identical, regardless of which web service i'm hitting (/SpmlReadOnly or /SpmlCrud).

    Therefore, that's ruling out the deprecated PayloadRootQNameEndpointMapping since the localPart and namespace are still identical, etc,... and my current config simply routes the requests to the same endpoint method handler, and i have no way of distinguishing which web service was called:

    @PayloadRoot(namespace = NAMESPACE_URI, localPart = "lookupRequest")
    @ResponsePayload
    public Source handleLookupRequest(SoapMessage message) throws Exception {
    ...
    }

    Is what I'm able to do even possible? If the xsd's are shared and have identical namespaces at the root of the schema, and the same localPart method requests, will there ever be a way to distinguish between them and map to two different end points? Any information on this would be useful!

    I'd love to have each .wsdl be able to be have a unique endpointmapper config, but just can't find anything out there or in the API that seems to support that.

    IE: read-only .wsdl maps {urn:oasis:names:tc:SPML:2:0}lookupRequest to ReadOnlyEndpoint
    crud .wsdl maps {urn:oasis:names:tc:SPML:2:0}lookupRequest to CRUDEndPoint.

    with both endpoints having a method with signature:
    @PayloadRoot(namespace = NAMESPACE_URI, localPart = "lookupRequest")
    @ResponsePayload
    public Source handleLookupRequest(SoapMessage message) throws Exception {
    ...
    }


    I'm hoping i don't have to set up two separate .wars and deploy them separately with their own code bases on a server!

    Thanks,
    Damian
Working...
X