It depends on the schema totally. If the content Type of your POST is
application/XML then it should look as below.
Here is the request corresponding to the schema below, Here my operation is
expected to send the element foo.
<foo><param1>keith</param1><fooTypeparam2Type><nested2>26</nested2><nested1>chapman</nested1></fooTypeparam2Type><param3>true</param3></foo>
<xs:complexType name="fooType">
−
<xs:sequence>
<xs:element name="param1" type="xs:string"/>
<xs:element name="fooTypeparam2Type" type="ws:fooTypeparam2TypeType"/>
<xs:element name="param3" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
−
<xs:complexType name="fooTypeparam2TypeType">
−
<xs:sequence>
<xs:element name="nested2" type="xs:double"/>
<xs:element name="nested1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="foo" type="ws:fooType"/>
But if your contentType remains to be x-form-URL-encoded then you cannot
call this operation as you cannot send complex type in that serialization.
You can also call this using the multipart/form-data content Type.
Thanks,
Keith.
On Thu, Apr 24, 2008 at 5:20 AM, Chris Richmond <[EMAIL PROTECTED]>
wrote:
> So how do I do a POST to a REST endpoint, especially with a complex
> object of strings/numeric/date types from a non axis2/java client. For
> instance if I wanted to post from a javascript or from php or something less
> robust, what is the format that my post would have to have to the endpoint?
> I don't need to see how to use the axis2 library on the client to perform
> a POST to my endpoint, but I need to see what the raw content of the post
> should look like, with complex and simple types, as I am not planning on
> using the GET call on the URL(although knowing how to submit complex types
> there would be helpful as well for future reference).
>
> And I am assuming that the response is the same whether using POST or
> GET/URL?
>
> Thanks,
>
>
> Chris
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org