Перейти к содержимому

Фотография

Вопрос по soapUI


  • Авторизуйтесь для ответа в теме
Сообщений в теме: 2

#1 xvz

xvz

    Новый участник

  • Members
  • Pip
  • 2 сообщений

Отправлено 12 декабря 2013 - 11:06

Здравствуйте!

Подскажите пожалуйста.

Разработчиком написан вэб сервис, и создана wsdl:
<definitions targetNamespace="test.ru/soap/index.php?wsdl">
	<types>
		<xsd:schema targetNamespace="test.ru/soap/index.php?wsdl">
			<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
			<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
			<xsd:complexType name="Data">
				<xsd:all>
					<xsd:element name="resCode" type="xsd:int"/>
					<xsd:element name="resMessage" type="xsd:string"/>
					<xsd:element name="balanceValue" type="xsd:string"/>
					<xsd:element name="balanceSign" type="xsd:string"/>
					<xsd:element name="checkText" type="xsd:string"/>
				</xsd:all>
			</xsd:complexType>
		</xsd:schema>
	</types>
	<message name="infoRequest">
		<part name="accountNumber" type="xsd:string"/>
		<part name="payRecipientId" type="xsd:string"/>
	</message>
	<message name="infoResponse">
		<part name="return" type="tns:Data"/>
	</message>
	<message name="checkRequest">
		<part name="payAmount" type="xsd:string"/>
		<part name="accountNumber" type="xsd:string"/>
		<part name="payRecipientId" type="xsd:string"/>
	</message>
	<message name="checkResponse">
		<part name="resCode" type="xsd:string"/>
	</message>
	<message name="payRequest">
		<part name="paySyspayId" type="xsd:string"/>
		<part name="payDate" type="xsd:string"/>
		<part name="accountNumber" type="xsd:string"/>
		<part name="invoiceNumber" type="xsd:string"/>
		<part name="paySum" type="xsd:string"/>
		<part name="payRecipientId" type="xsd:string"/>
	</message>
	<message name="payResponse">
		<part name="resCode" type="xsd:string"/>
	</message>
	<portType name="personalPortType">
		<operation name="info">
			<input message="tns:infoRequest"/>
			<output message="tns:infoResponse"/>
		</operation>
		<operation name="check">
			<input message="tns:checkRequest"/>
			<output message="tns:checkResponse"/>
		</operation>
		<operation name="pay">
			<input message="tns:payRequest"/>
			<output message="tns:payResponse"/>
		</operation>
	</portType>
	<binding name="personalBinding" type="tns:personalPortType">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="info">
			<soap:operation soapAction="test.ru/soap/index.php?wsdl#info" style="rpc"/>
			<input>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</input>
			<output>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</output>
		</operation>
		<operation name="check">
			<soap:operation soapAction="test.ru/soap/index.php?wsdl#check" style="rpc"/>
			<input>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</input>
			<output>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</output>
		</operation>
		<operation name="pay">
			<soap:operation soapAction="test.ru/soap/index.php?wsdl#pay" style="rpc"/>
			<input>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</input>
			<output>
				<soap:body use="encoded" namespace="test.ru/soap/index.php?wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
			</output>
		</operation>
	</binding>
	<service name="personal">
		<port name="personalPort" binding="tns:personalBinding">
			<soap:address location="http://test.ru/soap/index.php"/>
		</port>
	</service>
</definitions>

При автоматической генерации soapUI проекта по этой wsdl создались примеры запросов.
При отправке тестовых данных на сервис soapUI, автоматически soap сообщение отправляет GET запросом, который вэб сервис не воспринимает корректно.
Нужно отправить soap сообщение POST запросом.
Можно ли это реализовать в soapUI.

Заранее спасибо за помощь.
  • 0

#2 Zenturio

Zenturio

    Опытный участник

  • Members
  • PipPipPipPip
  • 386 сообщений
  • ФИО:Дмитрий
  • Город:Смоленск - Москва


Отправлено 12 декабря 2013 - 13:38

Ну конечно можно. Меняете тип запроса в поле метод слева рядом с зеленой кнопкой запустить.
  • 0

#3 xvz

xvz

    Новый участник

  • Members
  • Pip
  • 2 сообщений

Отправлено 12 декабря 2013 - 13:52

Ну конечно можно. Меняете тип запроса в поле метод слева рядом с зеленой кнопкой запустить.


Боюсь, что вызов сервиса идет с типом запроса soap, а не с типом http.
Приложил скрины.
Изображение
Изображение
  • 0


Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных