[wsf-c-dev]PHP WSDL genaration - doc-lit vc RPC
Buddhika Semasinghe
buddhika at wso2.com
Wed Jan 3 05:30:38 PST 2007
Hi;
In schema type mapping for doc lit case, this is what I have done. Ex:
/** The Lucky function
* @param string $yr year of your birthday
* (maps to the xs:gYear XML schema type )
* @param string $name your first name
* (maps to the xs:string XML schema type)
* @return int $t your lucky number
*(maps to the xs:int XML schema type )
*/
function luckyFunction($yr,$name)
{
// some logic
return $t;
}
In the generated WSDL for the Operation named* luckyfunction* has two messages
<*operation name="luckyFunction">
<input message="s0:luckyFunctionInput"/>
<output message="s0:luckyFunctionOutput"/>
</operation>
*
Then in message elements
*<message name="luckyFunctionInput">
<part name="parameters" element="luckyFunction"/>
</message>
<message name="luckyFunctionOutput">
<part name="parameters" element="luckyFunctionResponse"/>
</message>
*So the generated schema, which can be accessible in Server side is
*<element name="luckyFunction">
<complexType>
<sequence>
<element name="yr" type="xsd:gYear"/>
<element name="name" type="xsd:string"/>
</sequence>
</complexType>
</element>
−
element name="***luckyFunctionResponse*">
<complexType>
<sequence>
<element name="t" type="xsd:int"/>
</sequence>
</complexType>
</element>*
Is this is correct?? .
So what I am confused about is that in RPC style, how should I put the schema part in WSDL. Since all the type information is inclued in message elements in rpc style do I want to include a schema for the function same as above??. Could somebody give some comments.
Thanks
Buddhika
More information about the Wsf-c-dev
mailing list