How do you use document/literal encoding, where do you specify it for a particular 
service.

-----Original Message-----
From: Ricky Ho [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 17, 2002 2:07 PM
To: [EMAIL PROTECTED]
Subject: Re: Axis generated SOAP question.


Use document/literal encoding

At 12:56 PM 9/17/2002 -0700, you wrote:
>Hi,
>
>I noticed that the SOAP generated by Axis clients is
>different from what I expected. Whenever, the
>request/reply messages contain a complexType as a
>parameter then the generated SOAP seems to use
><multiRef> and the parameters are seems to be
>refer to the multiRef element using href.
>
>For example: look at the soap protocol exchanged in the
>
>samples/addr example is shown below. Is this
>expected behavior?
>
>Is there a document/email-thread/spec. that
>explains why multiRefs elements are used instead of
>simply inlining the parameter elements?
>
>
>Thx.
>
>Harish
>
>POST /axis/services/AddressBook HTTP/1.0
>Content-Type: text/xml; charset=utf-8
>Accept: application/soap+xml, application/dime, multipart/related,
>text/*
>User-Agent: Axis/beta3
>Host: localhost
>Cache-Control: no-cache
>Pragma: no-cache
>SOAPAction: ""
>Content-Length: 1627
>
><?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>
>   <ns1:addEntry 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:ns1="urn:AddressFetcher2">
>    <name xsi:type="ns2:string" 
> xmlns:ns2="http://www.w3.org/1999/XMLSchema";>Purdue
>Boilermaker</name>
>    <address href="#id0"/>
>   </ns1:addEntry>
>   <multiRef id="id0" soapenc:root="0" 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xsi:type="ns3:address" 
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:ns3="urn:AddressFetcher2">
>    <streetNum xsi:type="xsd:int">1</streetNum>
>    <streetName xsi:type="xsd:string">University Drive</streetName>
>    <city xsi:type="xsd:string">West Lafayette</city>
>    <state href="#id1"/>
>    <zip xsi:type="xsd:int">47907</zip>
>    <phoneNumber href="#id2"/>
>   </multiRef>
>   <multiRef id="id1" soapenc:root="0" 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xsi:type="ns4:stateType" xmlns:ns4="urn:AddressFetcher2"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>IN</multiRef>
>   <multiRef id="id2" soapenc:root="0" 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xsi:type="ns5:phone" xmlns:ns5="urn:AddressFetcher2" 
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
>    <areaCode xsi:type="xsd:int">765</areaCode>
>    <exchange xsi:type="xsd:string">494</exchange>
>    <number xsi:type="xsd:string">4900</number>
>   </multiRef>
>  </soapenv:Body>
></soapenv:Envelope>
>
>
>HTTP/1.0 200 OK
>Content-Type: text/xml; charset=utf-8
>Set-Cookie: 1
>Set-Cookie2: 1
>
><?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>
>   <ns1:addEntryResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:ns1="urn:AddressFetcher2"/>
>  </soapenv:Body>
></soapenv:Envelope>
>
>
>

Reply via email to