Hi,

I'm having a document-oriented WSDL file with a schema declaration using a namespace. The required SOAP request must look like this for example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope";>
  <soapenv:Body>
    <getRootObject xmlns="urn:omi-org:api"/>
  </soapenv:Body>
</soapenv:Envelope>

But what is sent over the wire (captured with tcpmon) is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope";>
  <soapenv:Body>
    <getRootObject xmlns=""/>
  </soapenv:Body>
</soapenv:Envelope>

So it leaves out the namespace for some reaons. I have tried all combinations of getting the namespace in there without any luck.
I'm using Axis 1.1RC BTW.


Some snipplets from the WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OMI" targetNamespace="urn:omi-org:api"
  xmlns="http://schemas.xmlsoap.org/wsdl/";
  xmlns:tns="urn:omi-org:api"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:omi="urn:omi-org:api">
  <types>
    <xsd:schema targetNamespace="urn:omi-org:api"
      xmlns="urn:omi-org:api"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema";
      elementFormDefault="qualified"
      attributeFormDefault="unqualified">
      <xsd:complexType name="getRootObject" content="empty"/>
    ...
    </xsd:schema>
  </types>
  <message name="GetRootObjectInput">
    <part name="body" type="omi:getRootObject"/>
  </message>
  <message name="GetRootObjectOutput">
    <part name="body" type="omi:objectName"/>
  </message>
  <portType name="OMIPortType">
    <operation name="GetRootObject">
      <input message="tns:GetRootObjectInput"/>
      <output message="tns:GetRootObjectOutput"/>
      <fault name="error" message="tns:OmiErrorMsg"/>
    </operation>
  ...
  </portType>
  <binding name="OMISoapBinding" type="tns:OMIPortType">
    <soap:binding style="document"
       transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetRootObject">
      <soap:operation soapAction="OMI"/>
      <input>
        <soap:body use="literal" parts="body"
          namespace="urn:omi-org:api"/>
        <soap:header use="literal" element="omi:omiHeader"/>
      </input>
      <output>
        <soap:body use="literal" parts="body"
          namespace="urn:omi-org:api"/>
      </output>
      <fault name="error">
        <soap:fault use="literal" namespace="urn:omi-org:api"/>
      </fault>
    </operation>
  ...
  </binding>
...
</definitions>


When using elementFormDefault="qualified" I see in the generated Code that all QNames for the meta data are created with the namespace URN "urn:omi-org:api".


Has anybody an exmplanation for this or a tip where one has to changes a namespace to make it appear???


Thanks a lot, Peter




Reply via email to