使用ReadyAPI发送不带名称的JMS消息作为响应

时间:2018-11-28 11:13:56

标签: jms soapui ready-api

我想使用“即发即弃”原理,使用ReadyAPI发送JMS消息。

所以我使用的JMS请求URL是readyjms://ems::mydestination,但是当我发送请求时,出现错误:

Wed Nov 28 11:47:29 CET 2018: INFO: Creating JmsConnection using manual configuration #ManualJmsConfiguration properties#Wed Nov 28 11:47:29 CET 2018 connectionFactoryJndiName=ConnectionFactory receiveDestinationJndiName=- password= sendDestinationJndiName=manualdestinationurl providerUrl=tcp\://localhost\:7222 initialContextFactoryClass=com.tibco.tibjms.naming.TibjmsInitialContextFactory userName=admin connectorLabel=EMS, additional properties: {}
Wed Nov 28 11:47:29 CET 2018: ERROR: An error occurred [Name not found: '-'], see error log for details
Wed Nov 28 11:47:29 CET 2018: ERROR: An error occurred [The JNDI name was not found: Name not found: '-'. Make sure the specified name is correct and additional JNDI properties are specified.], see error log for details
Wed Nov 28 11:47:29 CET 2018: INFO: Error getting response for [EmsBaseServiceBinding.emsBase:JMS Request]; null

当我确实提供像readyjms://ems::mydestination::mydestination这样的响应网址时,我确实收到了我发送的消息。

我也没有在WSDL中定义响应

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="EmsBase_v1_0" targetNamespace="http://www.mycompany.com/bw/wsdl/EmsBase/1" xmlns:jms="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.mycompany.com/bw/wsdl/EmsBase/1" xmlns:tns0="http://www.mycompany.com/bw/wsdl/EmsBase/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
    <xsd:schema targetNamespace="http://www.mycompany.com/bw/wsdl/EmsBase/1.0" xmlns="http://www.brabantia.com/bw/wsdl/EmsBase/1.0">
      <xsd:element name="emsBase">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="base" type="xsd:string"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="emsBase">
    <wsdl:part element="tns0:emsBase" name="parameters"/>
  </wsdl:message>
  <wsdl:portType name="EmsBase_v1_0">
    <wsdl:operation name="emsBase">
      <wsdl:input message="tns:emsBase" name="emsBase"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="EmsBaseServiceBinding" type="tns:EmsBase_v1_0">
    <soap:binding style="document" transport="http://www.tibco.com/namespaces/ws/2004/soap/binding/JMS"/>
    <jms:binding messageFormat="bytes"/>
    <wsdl:operation name="emsBase">
      <soap:operation soapAction="emsBase" style="document"/>
      <wsdl:input>
        <soap:body parts="parameters" use="literal"/>
      </wsdl:input>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="EmsBase_v1_0">
    <wsdl:port binding="tns:EmsBaseServiceBinding" name="EmsBase_v1_0SOAP">
      <soap:address location=""/>
      <jms:connectionFactory/>
      <jms:targetAddress destination="queue">dev.1.ps.q.test.app_in</jms:targetAddress>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

那么如何在不期望响应的情况下发送JMS消息?

0 个答案:

没有答案