You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2009/11/13 15:06:52 UTC
[jira] Assigned: (SMXCOMP-670) jms:soap-provider doesn't use custom
marshaler
[ https://issues.apache.org/activemq/browse/SMXCOMP-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré reassigned SMXCOMP-670:
--------------------------------------------
Assignee: Jean-Baptiste Onofré
> jms:soap-provider doesn't use custom marshaler
> ----------------------------------------------
>
> Key: SMXCOMP-670
> URL: https://issues.apache.org/activemq/browse/SMXCOMP-670
> Project: ServiceMix Components
> Issue Type: Bug
> Components: servicemix-jms
> Affects Versions: servicemix-jms-2009.01
> Environment: OS: Linux chriNB 2.6.24-24-generic #1 SMP Fri Jul 24 22:46:06 UTC 2009 i686 GNU/Linux
> JAVA:
> java version "1.6.0_14"
> Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
> Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)
> Server:
> apache-tomcat-6.0.14
> Reporter: Christian Connert
> Assignee: Jean-Baptiste Onofré
>
> Hi,
> The JmsSoapProviderEndpoint overrides the the custom JmsSoapProviderMarshaler in it's validate method:
> @Override
> public void validate() throws DeploymentException {
> if (wsdl == null) {
> throw new DeploymentException("wsdl property must be set");
> }
> JmsSoapProviderMarshaler marshaler = new JmsSoapProviderMarshaler();
> try {
> description = DomUtil.parse(wsdl.getInputStream());
> Element elem = description.getDocumentElement();
> if (WSDLUtils.WSDL1_NAMESPACE.equals(elem.getNamespaceURI())) {
> validateWsdl1(marshaler);
> } else if (WSDLUtils.WSDL2_NAMESPACE.equals(elem.getNamespaceURI())) {
> validateWsdl2(marshaler);
> } else {
> throw new DeploymentException("Unrecognized wsdl namespace: " + elem.getNamespaceURI());
> }
> marshaler.setUseJbiWrapper(useJbiWrapper);
> marshaler.setPolicies(policies);
> setMarshaler(marshaler);
> } catch (DeploymentException e) {
> throw e;
> } catch (Exception e) {
> throw new DeploymentException("Unable to read WSDL from: " + wsdl, e);
> }
> super.validate();
> }
> Thus one can't add a custom marshaler for this type of endpoint. A possible fix would be:
> public void validate() throws DeploymentException {
> if (wsdl == null) {
> throw new DeploymentException("wsdl property must be set");
> }
> JmsSoapProviderMarshaler marshaler = getMarshaler();
> if(marshaler==null)
> marshaler = new JmsSoapProviderMarshaler();
> try {
> description = DomUtil.parse(wsdl.getInputStream());
> Element elem = description.getDocumentElement();
> if (WSDLUtils.WSDL1_NAMESPACE.equals(elem.getNamespaceURI())) {
> validateWsdl1(marshaler);
> } else if (WSDLUtils.WSDL2_NAMESPACE.equals(elem.getNamespaceURI())) {
> validateWsdl2(marshaler);
> } else {
> throw new DeploymentException("Unrecognized wsdl namespace: " + elem.getNamespaceURI());
> }
> marshaler.setUseJbiWrapper(useJbiWrapper);
> marshaler.setPolicies(policies);
> setMarshaler(marshaler);
> } catch (DeploymentException e) {
> throw e;
> } catch (Exception e) {
> throw new DeploymentException("Unable to read WSDL from: " + wsdl, e);
> }
> super.validate();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.