Xarx123
14 years agoOccasional Contributor
Generated requests & responses miss namespace prefix
Hello,
I've got a very basic WSDL, and I've let SoapUI generate a sample request and a mock service for it. Inner elements of the generated request & response lack, however, the namespace prefix:
The <name> element herein should not be in the anonymous namespace, it should have the "exam" prefix, as like as the <getGreeting> element does. The same problem is in the response that I get from the mock service.
The XSD looks like this:
and the WSDL is as follows:
I use SoapUI 4.0.1, Build dist-134-2011-09-14, Build Date 2011/09/14 13:06.
I've got a very basic WSDL, and I've let SoapUI generate a sample request and a mock service for it. Inner elements of the generated request & response lack, however, the namespace prefix:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="http://www.example.com/">
<soapenv:Header/>
<soapenv:Body>
<exam:getGreeting>
<!--Optional:-->
<name>?</name>
</exam:getGreeting>
</soapenv:Body>
</soapenv:Envelope>
The <name> element herein should not be in the anonymous namespace, it should have the "exam" prefix, as like as the <getGreeting> element does. The same problem is in the response that I get from the mock service.
The XSD looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://www.example.com/" xmlns:tns="http://www.example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="getGreeting" type="tns:TgetGreeting"/>
<xs:element name="getGreetingResponse" type="tns:TgetGreetingResponse"/>
<xs:complexType name="TgetGreeting">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TgetGreetingResponse">
<xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
and the WSDL is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. -->
<definitions targetNamespace="http://www.example.com/HelloWorld.wsdl" name="HelloWorldService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.com/HelloWorld.wsdl" xmlns:dns="http://www.example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://www.example.com/" schemaLocation="HelloWorldService_schema1.xsd"/>
</xsd:schema>
</types>
<message name="getGreeting">
<part name="parameters" element="dns:getGreeting"/>
</message>
<message name="getGreetingResponse">
<part name="parameters" element="dns:getGreetingResponse"/>
</message>
<portType name="HelloWorldPortType">
<operation name="getGreeting">
<input message="tns:getGreeting"/>
<output message="tns:getGreetingResponse"/>
</operation>
</portType>
<binding name="HelloWorldSoapPortBinding" type="tns:HelloWorldPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getGreeting">
<soap:operation soapAction="http://www.example.com/HelloWorld.wsdl#getGreeting"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="HelloWorldService">
<port name="HelloWorldSoapPort" binding="tns:HelloWorldSoapPortBinding">
<soap:address location="http://localhost:7001/business/hello/HelloWorldService"/>
</port>
</service>
</definitions>
I use SoapUI 4.0.1, Build dist-134-2011-09-14, Build Date 2011/09/14 13:06.