You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sdan <sd...@yahoo.com> on 2007/06/06 06:02:31 UTC

possible bug in http-provider-bc

I'm trying to call an external webservice using a http-provider-bc. See the
wsdl for the external webservice at the end of this message.

The correct soap message should look like (generated by a different client
app written in java)

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
         <ns1:echo xmlns:ns1="http://nec.com/xsd">
            <ns1:req>
               <ns1:request>Echo Test!</ns1:request>
            </ns1:req>
         </ns1:echo>
      </soapenv:Body>
   </soapenv:Envelope>


http-bc is generating the following

<?xml version='1.0' encoding='UTF-8'?>
   <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Body>
         <echo xmlns="urn:/HelloWorld2-RPC.wsdl"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://nec.com/xsd">
            <text xmlns="">Echo Test!</text>
         </echo>
      </env:Body>
   </env:Envelope>

Following are the problems in the soap message generated by bc

Prob 1. Soap message part req is missing in the 2nd one. 

Prob 2. a. echo tag has duplicate namespaces xmlns="http://nec.com/xsd" and
xmlns="urn:/HelloWorld2-RPC.wsdl". Also echo has
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" that also appears
in 
env:Envelope.

I've been trying to fix this for weeks. I think this is a bug. Please let me
know. Following is the 
wsdl for external webservice.



echo.wsdl

<wsdl:definitions xmlns:axis2="http://nec.com"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
	xmlns:ns0="http://nec.com/xsd"
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
	xmlns:ns1="http://org.apache.axis2/xsd"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	targetNamespace="http://nec.com">
	<wsdl:documentation>Echo</wsdl:documentation>
	<wsdl:types>
		<xs:schema xmlns:ns="http://nec.com/xsd"
			attributeFormDefault="qualified" elementFormDefault="qualified"
			targetNamespace="http://nec.com/xsd">
			<xs:element name="echo">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="req" nillable="true"
							type="ns:Request" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Request" type="ns:Request" />
			<xs:complexType name="Request">
				<xs:sequence>
					<xs:element name="request" nillable="true"
						type="xs:string" />
				</xs:sequence>
			</xs:complexType>
			<xs:element name="echoResponse">
				<xs:complexType>

					<xs:sequence>
						<xs:element name="return" nillable="true"
							type="ns:Response" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Response" type="ns:Response" />
			<xs:complexType name="Response">
				<xs:sequence>
					<xs:element name="respone" nillable="true"
						type="xs:string" />
				</xs:sequence>
			</xs:complexType>
		</xs:schema>
	</wsdl:types>
	<wsdl:message name="echoMessage">
		<wsdl:part name="part1" element="ns0:echo" />
	</wsdl:message>
	<wsdl:message name="echoResponse">
		<wsdl:part name="part1" element="ns0:echoResponse" />
	</wsdl:message>
	<wsdl:portType name="EchoPortType">
		<wsdl:operation name="echo">
			<wsdl:input
				xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
				message="axis2:echoMessage" wsaw:Action="urn:echo" />
			<wsdl:output message="axis2:echoResponse" />
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="EchoSOAP11Binding" type="axis2:EchoPortType">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
			style="document" />
		<wsdl:operation name="echo">
			<soap:operation soapAction="urn:echo" style="document" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:binding name="EchoSOAP12Binding" type="axis2:EchoPortType">
		<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
			style="document" />
		<wsdl:operation name="echo">
			<soap12:operation soapAction="urn:echo" style="document" />
			<wsdl:input>
				<soap12:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap12:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:binding name="EchoHttpBinding" type="axis2:EchoPortType">
		<http:binding verb="POST" />
		<wsdl:operation name="echo">
			<http:operation location="echo" />
			<wsdl:input>
				<mime:content type="text/xml" />
			</wsdl:input>
			<wsdl:output>
				<mime:content type="text/xml" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="Echo">
		<wsdl:port name="EchoSOAP11port_http"
			binding="axis2:EchoSOAP11Binding">
			<soap:address
				location="http://138.15.107.42:8081/axis2/services/Echo" />
		</wsdl:port>
		<wsdl:port name="EchoSOAP12port_http"
			binding="axis2:EchoSOAP12Binding">
			<soap12:address
				location="http://138.15.107.42:8081/axis2/services/Echo" />
		</wsdl:port>
		<wsdl:port name="EchoHttpport"
			binding="axis2:EchoHttpBinding">
			<http:address
				location="http://138.15.107.42:8081/axis2/services/Echo" />
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


-- 
View this message in context: http://www.nabble.com/possible-bug-in-http-provider-bc-tf3875723s12049.html#a10982033
Sent from the ServiceMix - User mailing list archive at Nabble.com.