Есть wsdl со схемой, по которой формируется soap запрос (xml) вида: Код | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <Work xmlns="http://s1.psa.ru/periodsservice"> <request> <FIO>qwe</FIO> </request> </Work> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
|
Мне же нужно, чтобы namespace http://s1.psa.ru/periodsservice устанавливался в элементе Body, а внутренние элементы были с префиксом. Такой вид: Код | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body xmlns:per="http://s1.psa.ru/periodsservice"> <per:Work> <per:request> <FIO>qwe</FIO> </per:request> </per:Work> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
|
Подскажите что в wsdl нужно исправить для этого? Вот сама wsdl: Код | <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://s1.psa.ru/periodsservice" targetNamespace="http://s1.psa.ru/periodsservice"> <wsdl:types xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:schema> <xsd:import schemaLocation="PeriodsService_2.xsd" namespace="http://s1.psa.ru/periodsservice"/> </xsd:schema> </wsdl:types> <wsdl:message name="PeriodsService_Work_InputMessage"> <wsdl:part name="parameters" element="ns0:Work" /> </wsdl:message> <wsdl:message name="PeriodsService_Work_OutputMessage"> <wsdl:part name="parameters" element="ns0:WorkResponse"/> </wsdl:message> <wsdl:portType name="PeriodsService"> <wsdl:operation name="Work"> <wsdl:input name="WorkRequest" message="ns0:PeriodsService_Work_InputMessage"/> <wsdl:output name="WorkResponse" message="ns0:PeriodsService_Work_OutputMessage"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="BasicHttpBinding_PeriodsService" type="ns0:PeriodsService"> <soap11:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="Work"> <soap11:operation soapAction="" style="document"/> <wsdl:input name="WorkRequest"> <soap11:body use="literal"/> </wsdl:input> <wsdl:output name="WorkResponse"> <soap11:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="PeriodsService"> <wsdl:port name="BasicHttpBinding_PeriodsService" binding="ns0:BasicHttpBinding_PeriodsService"> <soap11:address location="http://10.228.228.79:10180/PeriodsService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
|
[/code]
|