com.sun.xml.internal.ws.api.model.SEIModel Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.model.SEIModel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Stub.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a new pipeline for the given port name.
 */
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
    //Check all required WSDL extensions are understood
    checkAllWSDLExtensionsUnderstood(portInfo, binding);
    SEIModel seiModel = null;
    Class sei = null;
    if (portInfo instanceof SEIPortInfo) {
            SEIPortInfo sp = (SEIPortInfo) portInfo;
        seiModel = sp.model;
        sei = sp.sei;
    }
    BindingID bindingId = portInfo.getBindingId();

    TubelineAssembler assembler = TubelineAssemblerFactory.create(
            Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
    if (assembler == null) {
        throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n
    }
    return assembler.createClient(
            new ClientTubeAssemblerContext(
                    portInfo.getEndpointAddress(),
                    portInfo.getPort(),
                    this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
}
 
Example #2
Source File: Packet.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) {
    AddressingVersion addressingVersion = binding.getAddressingVersion();

    if (addressingVersion == null) {
        return;
    }

    WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding);
    String action = responsePacket.getMessage().isFault() ?
            wsaHelper.getFaultAction(this, responsePacket) :
            wsaHelper.getOutputAction(this);
    if (action == null) {
        LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message");
        return;
    }
    populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, AddressingVersion.isRequired(binding));
}
 
Example #3
Source File: WSEndpointImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
                                                final Packet      responsePacket,
                                                final SOAPVersion soapVersion,
                                                final WSDLPort    wsdlPort,
                                                final SEIModel    seiModel,
                                                final WSBinding   binding)
{
    // This will happen in addressing if it is enabled.
    if (tc.isFaultCreated()) return responsePacket;

    final Message faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, tc.getThrowable());
    final Packet result = responsePacket.createServerResponse(faultMessage, wsdlPort, seiModel, binding);
    // Pass info to upper layers
    tc.setFaultMessage(faultMessage);
    tc.setResponsePacket(responsePacket);
    tc.setFaultCreated(true);
    return result;
}
 
Example #4
Source File: AddressingPolicyMapConfigurator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Puts an addressing policy into the PolicyMap if the addressing feature was set.
 */
public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding)
        throws PolicyException {
    LOGGER.entering(policyMap, model, wsBinding);

    Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
    if (policyMap != null) {
        final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class);
        if (LOGGER.isLoggable(Level.FINEST)) {
            LOGGER.finest("addressingFeature = " + addressingFeature);
        }
        if ((addressingFeature != null) && addressingFeature.isEnabled()) {
            //add wsam:Addrressing assertion if not exists.
            addWsamAddressing(subjects, policyMap, model, addressingFeature);
        }
    } // endif policy map not null
    LOGGER.exiting(subjects);
    return subjects;
}
 
Example #5
Source File: Stub.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a new pipeline for the given port name.
 */
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
    //Check all required WSDL extensions are understood
    checkAllWSDLExtensionsUnderstood(portInfo, binding);
    SEIModel seiModel = null;
    Class sei = null;
    if (portInfo instanceof SEIPortInfo) {
            SEIPortInfo sp = (SEIPortInfo) portInfo;
        seiModel = sp.model;
        sei = sp.sei;
    }
    BindingID bindingId = portInfo.getBindingId();

    TubelineAssembler assembler = TubelineAssemblerFactory.create(
            Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
    if (assembler == null) {
        throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n
    }
    return assembler.createClient(
            new ClientTubeAssemblerContext(
                    portInfo.getEndpointAddress(),
                    portInfo.getPort(),
                    this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
}
 
Example #6
Source File: Packet.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
    relatePackets(r, false);
    r.setState(State.ServerResponse);
    AddressingVersion av = binding.getAddressingVersion();
    // populate WS-A headers only if WS-A is enabled
    if (av == null) {
        return r;
    }

    if (getMessage() == null) {
        return r;
    }

    //populate WS-A headers only if the request has addressing headers
    String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion());
    if (inputAction == null) {
        return r;
    }
    // if one-way, then dont populate any WS-A headers
    if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) {
        return r;
    }

    // otherwise populate WS-Addressing headers
    populateAddressingHeaders(binding, r, wsdlPort, seiModel);
    return r;
}
 
Example #7
Source File: ClientTubeAssemblerContext.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
 *
 * @since JAX-WS 2.2
 */
public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
                                  @NotNull WSBindingProvider bindingProvider, @NotNull WSBinding binding,
                                  @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
    this(address, wsdlModel, (bindingProvider==null? null: bindingProvider.getPortInfo().getOwner()), bindingProvider, binding, container, codec, seiModel, sei);

}
 
Example #8
Source File: WsaTubeHelper.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
    this.binding = binding;
    this.wsdlPort = wsdlPort;
    this.seiModel = seiModel;
    this.soapVer = binding.getSOAPVersion();
    this.addVer = binding.getAddressingVersion();

}
 
Example #9
Source File: WsaTubeHelper.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
    this.binding = binding;
    this.wsdlPort = wsdlPort;
    this.seiModel = seiModel;
    this.soapVer = binding.getSOAPVersion();
    this.addVer = binding.getAddressingVersion();

}
 
Example #10
Source File: WSEndpointMOMProxy.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
                                                final Packet      responsePacket,
                                                final SOAPVersion soapVersion,
                                                final WSDLPort    wsdlPort,
                                                final SEIModel    seiModel,
                                                final WSBinding   binding)
{
    return wsEndpoint.createServiceResponseForException(tc, responsePacket, soapVersion,
                                                        wsdlPort, seiModel, binding);
}
 
Example #11
Source File: AddressingPolicyMapConfigurator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void addWsamAddressing(Collection<PolicySubject> subjects, PolicyMap policyMap, SEIModel model, AddressingFeature addressingFeature)
        throws PolicyException {
    final QName bindingName = model.getBoundPortTypeName();
    final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
    final Policy addressingPolicy = createWsamAddressingPolicy(bindingName, addressingFeature);
    final PolicySubject addressingPolicySubject = new PolicySubject(wsdlSubject, addressingPolicy);
    subjects.add(addressingPolicySubject);
    if (LOGGER.isLoggable(Level.FINE)) {
        LOGGER.fine("Added addressing policy with ID \"" + addressingPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
    }
}
 
Example #12
Source File: WsaTubeHelper.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
    this.binding = binding;
    this.wsdlPort = wsdlPort;
    this.seiModel = seiModel;
    this.soapVer = binding.getSOAPVersion();
    this.addVer = binding.getAddressingVersion();

}
 
Example #13
Source File: WSEndpoint.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.
 */
public abstract Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
                                                         final Packet      responsePacket,
                                                         final SOAPVersion soapVersion,
                                                         final WSDLPort    wsdlPort,
                                                         final SEIModel    seiModel,
                                                         final WSBinding   binding);
 
Example #14
Source File: Packet.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
    relatePackets(r, false);
    r.setState(State.ServerResponse);
    AddressingVersion av = binding.getAddressingVersion();
    // populate WS-A headers only if WS-A is enabled
    if (av == null) {
        return r;
    }

    if (getMessage() == null) {
        return r;
    }

    //populate WS-A headers only if the request has addressing headers
    String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion());
    if (inputAction == null) {
        return r;
    }
    // if one-way, then dont populate any WS-A headers
    if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) {
        return r;
    }

    // otherwise populate WS-Addressing headers
    populateAddressingHeaders(binding, r, wsdlPort, seiModel);
    return r;
}
 
Example #15
Source File: ServerSchemaValidationTube.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ServerSchemaValidationTube(WSEndpoint endpoint, WSBinding binding,
        SEIModel seiModel, WSDLPort wsdlPort, Tube next) {
    super(binding, next);
    this.seiModel = seiModel;
    this.wsdlPort = wsdlPort;

    if (endpoint.getServiceDefinition() != null) {
        MetadataResolverImpl mdresolver = new MetadataResolverImpl(endpoint.getServiceDefinition());
        Source[] sources = getSchemaSources(endpoint.getServiceDefinition(), mdresolver);
        for(Source source : sources) {
            LOGGER.fine("Constructing service validation schema from = "+source.getSystemId());
            //printDOM((DOMSource)source);
        }
        if (sources.length != 0) {
            noValidation = false;
            sf.setResourceResolver(mdresolver);
            try {
                schema = sf.newSchema(sources);
            } catch(SAXException e) {
                throw new WebServiceException(e);
            }
            validator = schema.newValidator();
            return;
        }
    }
    noValidation = true;
    schema = null;
    validator = null;
}
 
Example #16
Source File: ServerSchemaValidationTube.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public ServerSchemaValidationTube(WSEndpoint endpoint, WSBinding binding,
        SEIModel seiModel, WSDLPort wsdlPort, Tube next) {
    super(binding, next);
    this.seiModel = seiModel;
    this.wsdlPort = wsdlPort;

    if (endpoint.getServiceDefinition() != null) {
        MetadataResolverImpl mdresolver = new MetadataResolverImpl(endpoint.getServiceDefinition());
        Source[] sources = getSchemaSources(endpoint.getServiceDefinition(), mdresolver);
        for(Source source : sources) {
            LOGGER.fine("Constructing service validation schema from = "+source.getSystemId());
            //printDOM((DOMSource)source);
        }
        if (sources.length != 0) {
            noValidation = false;
            sf.setResourceResolver(mdresolver);
            try {
                schema = sf.newSchema(sources);
            } catch(SAXException e) {
                throw new WebServiceException(e);
            }
            validator = schema.newValidator();
            return;
        }
    }
    noValidation = true;
    schema = null;
    validator = null;
}
 
Example #17
Source File: WsaTubeHelper.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
    this.binding = binding;
    this.wsdlPort = wsdlPort;
    this.seiModel = seiModel;
    this.soapVer = binding.getSOAPVersion();
    this.addVer = binding.getAddressingVersion();

}
 
Example #18
Source File: OperationDispatcher.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public OperationDispatcher(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
    this.binding = binding;
    opFinders = new ArrayList<WSDLOperationFinder>();
    if (binding.getAddressingVersion() != null) {
        opFinders.add(new ActionBasedOperationFinder(wsdlModel, binding, seiModel));
    }
    opFinders.add(new PayloadQNameBasedOperationFinder(wsdlModel, binding, seiModel));
    opFinders.add(new SOAPActionBasedOperationFinder(wsdlModel, binding, seiModel));

}
 
Example #19
Source File: ClientTubeAssemblerContext.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
                                   @Nullable WSService rootOwner, @Nullable WSBindingProvider bindingProvider, @NotNull WSBinding binding,
                                  @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
    this.address = address;
    this.wsdlModel = wsdlModel;
    this.rootOwner = rootOwner;
    this.bindingProvider = bindingProvider;
    this.binding = binding;
    this.container = container;
    this.codec = codec;
    this.seiModel = seiModel;
    this.sei = sei;
}
 
Example #20
Source File: UsesJAXBContextFeature.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates {@link UsesJAXBContextFeature}.
 * This version allows you to create {@link JAXBRIContext} upfront and uses it.
 */
public UsesJAXBContextFeature(@Nullable final JAXBRIContext context) {
    this.factory = new JAXBContextFactory() {
        @NotNull
        public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
            return context;
        }
    };
}
 
Example #21
Source File: OperationDispatcher.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public OperationDispatcher(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
    this.binding = binding;
    opFinders = new ArrayList<WSDLOperationFinder>();
    if (binding.getAddressingVersion() != null) {
        opFinders.add(new ActionBasedOperationFinder(wsdlModel, binding, seiModel));
    }
    opFinders.add(new PayloadQNameBasedOperationFinder(wsdlModel, binding, seiModel));
    opFinders.add(new SOAPActionBasedOperationFinder(wsdlModel, binding, seiModel));

}
 
Example #22
Source File: WSDLDirectProperties.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public WSDLDirectProperties(QName serviceName, QName portName, SEIModel seiModel) {
    super(seiModel);
    this.serviceName = serviceName;
    this.portName = portName;
}
 
Example #23
Source File: JAXBContextFactory.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@NotNull
public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
    return JAXBRIContext.newInstance(classesToBind.toArray(new Class[classesToBind.size()]),
            typeReferences, null, sei.getTargetNamespace(), false, null);
}
 
Example #24
Source File: ClientTubeAssemblerContext.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
 * @deprecated
 *      Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)}
 */
public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
                                  @NotNull WSService rootOwner, @NotNull WSBinding binding,
                                  @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
    this(address, wsdlModel, rootOwner, null/* no info on which port it is, so pass null*/, binding, container, codec, seiModel, sei);
}
 
Example #25
Source File: JAXBContextFactory.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@NotNull
public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
    return JAXBRIContext.newInstance(classesToBind.toArray(new Class[classesToBind.size()]),
            typeReferences, null, sei.getTargetNamespace(), false, null);
}
 
Example #26
Source File: Message.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the java Method of which this message is an instance of.
 *
 * It is not always possible to uniquely identify the WSDL Operation from just the
 * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
 * to get the QName of the associated wsdl operation correctly.
 *
 * <p>
 * This method works only for a request. A pipe can determine a {@link Method}
 * for a request, and then keep it in a local variable to use it with a response,
 * so there should be no need to find out operation from a response (besides,
 * there might not be any response!).
 *
 * @param seiModel
 *      This represents the java model for the endpoint
 *      Some server {@link Pipe}s would get this information when they are created.
 *
 * @return
 *      Null if there is no corresponding Method for this message. This is
 *      possible, for example when a protocol message is sent through a
 *      pipeline, or when we receive an invalid request on the server,
 *      or when we are on the client and the user appliation sends a random
 *      DOM through {@link Dispatch}, so this error needs to be handled
 *      gracefully.
 */
@Deprecated
public final @Nullable JavaMethod getMethod(@NotNull SEIModel seiModel) {
    if (wsdlOperationMapping == null && messageMetadata != null) {
        wsdlOperationMapping = messageMetadata.getWSDLOperationMapping();
    }
    if (wsdlOperationMapping != null) {
        return wsdlOperationMapping.getJavaMethod();
    }
    //fall back to the original logic which could be incorrect ...
    String localPart = getPayloadLocalPart();
    String nsUri;
    if (localPart == null) {
        localPart = "";
        nsUri = "";
    } else {
        nsUri = getPayloadNamespaceURI();
    }
    QName name = new QName(nsUri, localPart);
    return seiModel.getJavaMethod(name);
}
 
Example #27
Source File: BindingInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void setSEIModel(SEIModel seiModel) {
        this.seiModel = seiModel;
}
 
Example #28
Source File: Message.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the java Method of which this message is an instance of.
 *
 * It is not always possible to uniquely identify the WSDL Operation from just the
 * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
 * to get the QName of the associated wsdl operation correctly.
 *
 * <p>
 * This method works only for a request. A pipe can determine a {@link Method}
 * for a request, and then keep it in a local variable to use it with a response,
 * so there should be no need to find out operation from a response (besides,
 * there might not be any response!).
 *
 * @param seiModel
 *      This represents the java model for the endpoint
 *      Some server {@link Pipe}s would get this information when they are created.
 *
 * @return
 *      Null if there is no corresponding Method for this message. This is
 *      possible, for example when a protocol message is sent through a
 *      pipeline, or when we receive an invalid request on the server,
 *      or when we are on the client and the user appliation sends a random
 *      DOM through {@link Dispatch}, so this error needs to be handled
 *      gracefully.
 */
@Deprecated
public final @Nullable JavaMethod getMethod(@NotNull SEIModel seiModel) {
    if (wsdlOperationMapping == null && messageMetadata != null) {
        wsdlOperationMapping = messageMetadata.getWSDLOperationMapping();
    }
    if (wsdlOperationMapping != null) {
        return wsdlOperationMapping.getJavaMethod();
    }
    //fall back to the original logic which could be incorrect ...
    String localPart = getPayloadLocalPart();
    String nsUri;
    if (localPart == null) {
        localPart = "";
        nsUri = "";
    } else {
        nsUri = getPayloadNamespaceURI();
    }
    QName name = new QName(nsUri, localPart);
    return seiModel.getJavaMethod(name);
}
 
Example #29
Source File: ServerMessageHandlerTube.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public ServerMessageHandlerTube(SEIModel seiModel, WSBinding binding, Tube next, HandlerTube cousinTube) {
    super(next, cousinTube, binding);
    this.seiModel = seiModel;
    setUpHandlersOnce();
}
 
Example #30
Source File: Message.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the java Method of which this message is an instance of.
 *
 * It is not always possible to uniquely identify the WSDL Operation from just the
 * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
 * to get the QName of the associated wsdl operation correctly.
 *
 * <p>
 * This method works only for a request. A pipe can determine a {@link Method}
 * for a request, and then keep it in a local variable to use it with a response,
 * so there should be no need to find out operation from a response (besides,
 * there might not be any response!).
 *
 * @param seiModel
 *      This represents the java model for the endpoint
 *      Some server {@link Pipe}s would get this information when they are created.
 *
 * @return
 *      Null if there is no corresponding Method for this message. This is
 *      possible, for example when a protocol message is sent through a
 *      pipeline, or when we receive an invalid request on the server,
 *      or when we are on the client and the user appliation sends a random
 *      DOM through {@link Dispatch}, so this error needs to be handled
 *      gracefully.
 */
@Deprecated
public final @Nullable JavaMethod getMethod(@NotNull SEIModel seiModel) {
    if (wsdlOperationMapping == null && messageMetadata != null) {
        wsdlOperationMapping = messageMetadata.getWSDLOperationMapping();
    }
    if (wsdlOperationMapping != null) {
        return wsdlOperationMapping.getJavaMethod();
    }
    //fall back to the original logic which could be incorrect ...
    String localPart = getPayloadLocalPart();
    String nsUri;
    if (localPart == null) {
        localPart = "";
        nsUri = "";
    } else {
        nsUri = getPayloadNamespaceURI();
    }
    QName name = new QName(nsUri, localPart);
    return seiModel.getJavaMethod(name);
}