7 Replies Latest reply: Jan 13, 2012 9:07 AM by Alessio Soldano RSS

Error deploying SOAP\JMS web service

Michael Tarullo Newbie

I am trying to deploy a SOAP\JMS web service and I am getting deployment errors.

 

This service was developed as a java first service in Eclipse and the WSDL was generated with the CXF plugins for Eclipse.  The WSDL was then modified with the addition of the SOAP\JMS extensions required.  JBoss has also been modified to use ActiveMQ rather than HornetQ

 

The error message is attached since it is not possible to paste text into this message!

  • 2. Re: Error deploying SOAP\JMS web service
    Michael Tarullo Newbie

    Alessio

     

    Thank you for your reply.  We were able to get our SOAP \ JMS service to deploy to JBoss.  We actually have the service deployed using two different approaches.  First we were able to deploy using an older approach which involved using the CXF WSDL extensions and related XML configuration files.  We also tried a deployment using the W3C SOAP Over JMS 1.0 proposed standard WSDL extensions also now supported by CXF.  When we deploy this way the service deploys we can see messages in the log that a connection to ActiveMQ has been created but our JBoss console is no longer accessable.  We believe the following information shows that our service is blocking port 8080 because our deployed service appears to be listening there.  Can you tell us why our JMS service has been deployed to listen on localhost:8080 when it is clearly a SOAP over JMS service?  We do not have this problem when we deploy using the CXF WSDL extensions only with the W3C extensions.

     

    16:25:03,835 INFO [MetadataBuilder] Add Service

    id=NSRRSoapJmsWeatherForecast

    address=http://localhost:8080/SoapJmsWeatherForecast/SoapJmsForecast

    implementor=gov.faa.swim.nsrr.rd.soapjms.SoapJmsWeatherImpl

    invoker=org.jboss.wsf.stack.cxf.InvokerJSE

    serviceName={http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImpl

    portName={http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort

    wsdlLocation=null

    mtomEnabled=false

  • 3. Re: Error deploying SOAP\JMS web service
    Alessio Soldano Master

    Just a confirmation, are you using JBossWS-CXF 4 and JBoss AS 7?

     

    This said, can you perhaps share the wsdl? the wsdl:service section, in particular the soap:address element, controls the host/port for the endpoint to listen to.

  • 4. Re: Error deploying SOAP\JMS web service
    Michael Tarullo Newbie

    Alessio,

     

    Thank you once again for your reply.  At this time I will answer your first question and will post the information you requested and a quick update on the work I've done over the weekend.

     

    We are using JBoss v6.1.0 Final and whatever version of CXF that is distributed with this version of the AS.

     

    Please look for my subsequent post for the other information you requested.

     

    Regards,

    Mike

  • 5. Re: Error deploying SOAP\JMS web service
    Michael Tarullo Newbie

    Alessio,

     

    Below please find the WSDL file associated with the service we are trying to deploy.

     

    At this time I would like to ask a few more questions.  I have at the links you provided in your first response and other SOAP over JMS documentation I believe you may have coauthored.  In these, I noticed that your example service contains a WSDL that supports both SOAP\HTTP and SOAP\JMS.

     

    Is this required for a SOAP\JMS service?

     

    Can a SOAP\JMS service contain just the binding needed for SOAP\JMS? (I would certainly hope this is the case!).

     

    The configuration (i.e. the RIGHT combination of JAR and XML files) for deploying this service to JBoss is daunting; particularly since we have replaced HornetQ with ActiveMQ as our JBoss message broker.

     

    Is there any one place we can go to to assure that our configuration is correct?

     

    Lastly, the problem I originally reported in this thread occured on JBoss v6.0.0 Final.  Another one of our engineers had deployment success using the older CXF WSDL extensions on JBoss v6.1.0.  As a result of that success we tried to deploy the same service using the W3C WSDL extensions now supported by CXF to v6.1.0.  On two different instances of v6.1.0 we are getting two different sets of deployment results.  On one we are getting the same problem originally reported here and on another we are getting the following error:

     

    DEPLOYMENTS IN ERROR:
      Deployment "vfs:///C:/Programs/jboss-6.1.0.Final/server/default/deploy/SoapJms
    WeatherForecast.war" is in error due to the following reason(s):
    org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://www.w3.org/2010/soapjms.

     

    Both instances of JBoss are v6.1.0 and in both cases we are attempting to deploy the same service, that is the one associated with the WSDL below.

     

    I know this may be somewhat confusing, but I am trying to give you a feel for exactly what we are going through, for something that should be a relatively simple deployment.

     

    Once again, thank you for your help.

     

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="SoapJmsWeatherImpl"
                      targetNamespace="http://soapjms.rd.nsrr.swim.faa.gov/"
                      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                      xmlns:tns="http://soapjms.rd.nsrr.swim.faa.gov/"
                      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                      xmlns:jms="http://cxf.apache.org.transports/jms"
                      xmlns:soapjms="http://www.w3.org/2010/soapjms/">
      <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://soapjms.rd.nsrr.swim.faa.gov/" elementFormDefault="unqualified" targetNamespace="http://soapjms.rd.nsrr.swim.faa.gov/">
          <xsd:element name="GetForecast" type="tns:GetForecast"/>
          <xsd:complexType name="GetForecast">
            <xsd:sequence>
              <xsd:element minOccurs="0" name="loc" type="xsd:string"/>
            </xsd:sequence>
          </xsd:complexType>
          <xsd:element name="GetForecastResponse" type="tns:GetForecastResponse"/>
          <xsd:complexType name="GetForecastResponse">
            <xsd:sequence>
              <xsd:element minOccurs="0" name="return" type="xsd:string"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:schema>
      </wsdl:types>
      <wsdl:message name="GetForecastResponse">
        <wsdl:part name="parameters" element="tns:GetForecastResponse">
        </wsdl:part>
      </wsdl:message>
      <wsdl:message name="GetForecast">
        <wsdl:part name="parameters" element="tns:GetForecast">
        </wsdl:part>
      </wsdl:message>
      <wsdl:portType name="SoapJmsWeatherImplPortType">
        <wsdl:operation name="GetForecast">
          <wsdl:input name="GetForecast" message="tns:GetForecast">
        </wsdl:input>
          <wsdl:output name="GetForecastResponse" message="tns:GetForecastResponse">
        </wsdl:output>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="SoapJmsWeatherImplSoapBinding" type="tns:SoapJmsWeatherImplPortType">
        <!-- soap:binding style="document" transport="http://cxf.apache.org/transports/jms"/ -->
        <soap:binding style="document" transport="http://www.w3.org/2010/soapjms"/>
        <wsdl:operation name="GetForecast">
          <soap:operation soapAction="urn:GetForecast" style="document"/>
          <wsdl:input name="GetForecast">
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="GetForecastResponse">
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="SoapJmsWeatherImpl">
        <!-- The following is defined by the W3C SOAP over Java Message Service 1.0 Proposed Standard -->
        <soapjms:jndiURL>
          vm://localhost
        </soapjms:jndiURL>
        <soapjms:jndiConnectionFactoryName>
          activemq/ConnectionFactory
        </soapjms:jndiConnectionFactoryName>
        <soapjms:jndiInitialContextFactory>
          org.apache.activemq.jndi.ActiveMQInitialContextFactory
        </soapjms:jndiInitialContextFactory>
        <wsdl:port name="SoapJmsWeatherImplPort" binding="tns:SoapJmsWeatherImplSoapBinding">
          <!-- The following is defined by the W3C SOAP over Java Message Service 1.0 Proposed Standard -->
          <soap:address location="jms:jndi:activemg/queue/GetForecastRequestQueue?replyToName=activemg/queue/GetForecastResponseQueue"/>
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

  • 6. Re: Error deploying SOAP\JMS web service
    Michael Tarullo Newbie

    Alessio,

     

    I just wanted to let you know we solved this problem.  The problem was not with the WSDL.  I was following, or at least I thought I was, the instructions on the Apache CXF web site at this link, http://cxf.apache.org/docs/using-the-jmsconfigfeature.html.  While this link was very helpful in configuring the Spring beans we needed, from it I was under the impression that we also needed a jax:endpoint defined in our cxf-servlet XML config file.

     

    When another one of our engineers was able to get the service to deploy and was not having a problem with the JBoss console I asked for his config files.  When I compared his cxf-servlet.xml file to mine I noticed he comented out the jaxws:endpoint element.  When I did that my deploy worked also and I was able to access the JBoss console.

     

    Thank you for you input with this issue.

     

    Mike

  • 7. Re: Error deploying SOAP\JMS web service
    Alessio Soldano Master

    OK, good, thanks for the feedback on your issue resolution.