3 Replies Latest reply on Jul 25, 2007 1:16 AM by cunparis2day

    namespace missing for parameters when calling web service

    cunparis2day
      We're trying to call a web service developed by Java & XFire. The WSDL is valid for WS-I Basic Profile and it works fine with SoapUI. The request automatically generated by SoapUI is this:

      <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes=" http://www.example.org/test8/" xmlns:tes1=" http://www.example.org/test8">
      <soapenv:Header/>
      <soapenv:Body>
      <tes:parameters>
      <a>
      <tes1:id>44444444444445</tes1:id>
      <tes1:b>
      <tes1:id>?</tes1:id>
      </tes1:b>
      </a>
      <id>?</id>
      </tes:parameters>
      </soapenv:Body>
      </soapenv:Envelope>

      when we put this into Flex, what we observe is that the namespace for the parameters element is missing. We see this in the proxy logs. The server receives this message and parameters is not in the namespace so the server complains that parameters is missing. We can duplicate this exact behavior by removing the namespace from the request with SoapUI.

      The question is why is flex removing the namespace for the parameters element?

      We're using document literal for the WSDL, which I paste below. We've been stuck on this for over a week, so if anyone has any suggestions I'd be forever grateful. Thanks

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions
      xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns=" http://www.example.org/test8/"
      xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
      name="test8"
      targetNamespace=" http://www.example.org/test8/">
      <wsdl:types>
      <xsd:schema
      targetNamespace=" http://www.example.org/test8/"
      xmlns:Q1=" http://www.example.org/test8">
      <xsd:import
      schemaLocation="Test8.xsd"
      namespace=" http://www.example.org/test8">
      </xsd:import>

      <xsd:complexType name="fooRequestType">
      <xsd:sequence>
      <xsd:element
      name="a"
      type="Q1:A">
      </xsd:element>
      <xsd:element
      name="id"
      type="xsd:string">
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="fooResponseType">
      <xsd:sequence>
      <xsd:element
      name="b"
      type="Q1:B">
      </xsd:element>
      <xsd:element
      name="id"
      type="xsd:string">
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:schema>
      </wsdl:types>
      <wsdl:message name="fooRequest">
      <wsdl:part
      name="parameters"
      type="tns:fooRequestType" />
      </wsdl:message>
      <wsdl:message name="fooResponse">
      <wsdl:part
      name="parameters"
      type="tns:fooResponseType" />
      </wsdl:message>
      <wsdl:portType name="Test8">
      <wsdl:operation name="foo">
      <wsdl:input message="tns:fooRequest" />
      <wsdl:output message="tns:fooResponse" />
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding
      name="Test8SOAP"
      type="tns:Test8">
      <soap:binding
      style="document"
      transport=" http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="foo">
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="Test8">
      <wsdl:port
      binding="tns:Test8SOAP"
      name="Test8SOAP">
      <soap:address location=" http://www.example.org/test8" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      the XSD containing A & B:

      <?xml version="1.0" encoding="UTF-8"?>
      <schema xmlns=" http://www.w3.org/2001/XMLSchema" targetNamespace=" http://www.example.org/test8" xmlns:tns=" http://www.example.org/test8" elementFormDefault="qualified">

      <complexType name="A">
      <sequence>
      <element
      name="id"
      type="string">
      </element>
      <element
      name="b"
      type="tns:B">
      </element>
      </sequence>
      </complexType>

      <complexType name="B">
      <sequence>
      <element
      name="id"
      type="string">
      </element>
      </sequence>
      </complexType>
      </schema>