Re: soap stuff
| From: | brad lafountain | Date: | Thu, 06 Jun 2002 05:41:39 +0000 |
| Subject: | Re: soap stuff | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-88@lists.php.net to get a copy of this message | ||
> You can pass native data structures in doc/lit just fine. One of the
> big things that helped me understand doc/lit was the realization (I knew
> it, but didn't REALIZE it ;) that you have to seperate the document
> style (rpc or document) from the encoding (literal or encoded). So you
> get four combinations:
>
> rpc/encoded
> rpc/literal
> doc/encoded
> doc/literal
>
> Further, each method in the wsdl can define it's encoding style, so you
> can have mixed encoded/literal in a soap message as defined in
> wsdl:message/wsdl:part. Different bindings may choose to use rpc or
> document style, but that effects the entire soap message (as far as I
> can tell).
>
> So the easiest thing to get right first is the encoding. encoded =
> typed, literal = untyped. For literal encoding, you do not set any
> attributes related to encoding (xsi:type, wsdl:arrayType, etc.).
> Essentialy, you do not have to do any of the Section 5 encoding rules.
> Makes life a bit easier when serializing/deserializing data, but it's
> not terribly different.
So... To "offically" support literal encoding you CANT have xsi:type or you
don't have to have the extra attributes?
>
> Document is a little trickier, and I'm still working out some of the
> details in my head. A document style message MAY OR MAY NOT have a
> rpc-like call in the body. That is where things get a little fuzy in
> the documentation, and when I get some more time I will figure that out
> in full. Document style is preferable if you want to pass 'arbitrary'
> xml data.
>
> How the soap implementation handles return data is up to the
> implementation. You can parse it into DOM, leave it as an xml string,
> or attempt to parse it into native data types. I think the result
> should be an option set by the script, probably with DOM as the default.
How does document acually change the soap:body?
Here's an example im confused on
There's 3 different bindings... a "soap" binding which binds the trasport to
http. a http post transport and a http get transport. Now when a client calls
$obj->someOpperation(); which binding should be used?
<binding name="WebserviceStringSoap" type="s0:WebserviceStringSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
<binding name="WebserviceStringHttpGet" type="s0:WebserviceStringHttpGet">
<http:binding verb="GET" />
<binding name="WebserviceStringHttpPost"
type="s0:WebserviceStringHttpPost">
<http:binding verb="POST" />
Would it be which uri they used when creating the object?
$obj = new SoapObject("test.wsdl", "s0:WebserbviceStringSoap");
$obj->someOpperation();
and with the http bindings... they don't specify soap:body.. is the default
literal. nor do they define a transport style.. is the default document?
- Brad
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com