Hi all,
        I am trying to enclose RDF in SOAP body of my response messages.
The schema I am using for the RDF is as follows:
<xsd:schema targetNamespace="http://stuff/IProvider.xsd";
                xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
                xmlns:effects="http://effects.com/";>
      <xsd:element name="RDF"

targetNamespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
<xsd:complexType>
<xsd:choice>
<xsd:element name="ItemList" targetNamespace="http://effects.com/";
form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="member" minOccurs="0" maxOccurs="unbounded"
targetNamespace="http://effects.com/";
form="qualified">
<xsd:complexType>
<xsd:attribute ref="rdf:resource" type="xsd:string"
form="qualified"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute ref="rdf:ID" type="xsd:string" form="qualified"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="keyword" type="xsd:string" nillable="false"
targetNamespace="http://effects.com/"; form="qualified"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>


 <message name="ItemLookUp0Request">
    <part name="req" element="rdf:RDF"/>
  </message>
  <message name="ItemLookUp0Response">
    <part name="resp" element="rdf:RDF"/>
  </message>


The service accepts a keyword and outputs ItemList. The SOAP response looks like this:


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope 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";>
<soapenv:Body>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
<ns2:ItemList ns1:ID="instanceOfItemList" xmlns:ns1="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; xmlns:ns2="http://effects.com/";>
<ns2:member ns1:resource="http://thisone"/>
<ns2:member ns1:resource="http://thistwo"/>
</ns2:ItemList>
<ns3:keyword xsi:nil="true" xmlns:ns3="http://effects.com/"/>
</RDF>
</soapenv:Body>
</soapenv:Envelope>


The piece of xml between the Body tag is almost perfect RDF except for two things:

1. The keyword element is an additional overhead.
2. Even if I accept the overhead, the xsi name space is declared in the Envelope section and I want it as an attribute in the RDF element.


So,
1. How can I eliminate the keyword from my message?
2. Is there a way to include arbitrary namespaces?


mithun http://www.cs.umbc.edu/~mits1





Reply via email to