* SoapCore 1.0h *

This contains client/server packages.

SoapCore is a SOAP client implementation for Squeak.
It achieves some interoperability with other SOAP, such as SOAP4R, Splash/Spray, etc.

[Prerequisites]
	XML Parser: YAXO or VWXML
	Web Server: KomHttpServer (Comanche 6.2+)

##SoapOpera 1.0 runs on Squeak 3.8+## 
##If you would like to use SoapOpera in older versions of Squeak, use SoapOpera 0.6##

For more details: http://www.mars.dti.ne.jp/~umejava/smalltalk/soapOpera/index.html

[Example(Client)]

Transcript open.
SoapSetting showClientLog: true. "to see the traffic"

| call |
	"invoke 'reverseArray' service of 'swikis.ddo.jp'(SoapOpera server)"
	call := (SoapCallEntry tcpHost: 'swikis.ddo.jp' port: 8823) newCall.
	call methodName: 'reverseString'.
	call addParameterNamed: #aString value: ('Hello from: ', Utilities authorInitials ).
	call invokeAndReturn.

| googleKey searchKey call |
	"invoke Google API search service (inspect it)"
	googleKey := 'gAE2CMNBd1xA+bRPXOmLkmT9+X8Y3bwG'. "<<--your Google API registration key"
	"Get it if you do not have (free): http://www.google.com/apis/index.html"

	searchKey := 'squeak umejava'. "search words"
	
	call := (SoapCallEntry tcpHost: 'api.google.com' port: 80) newCall.
	call targetObjectURI: 'http://api.google.com/search/beta2'.
	call namespace: 'urn:GoogleSearch'.
	call methodName: 'doGoogleSearch'.
	call addParameters: {
	    {#key. googleKey}.
	    {#q. searchKey}. 
	    {#start. 0. 'xsd:int'}.
	    {#maxResults. 10. 'xsd:int'}.
	    {#filter. true}.
	    {#restrict. ''}.
	    {#safeSearch. false}.
	    {#lr. ''}.
	    {#ie. 'latin1'}.
	    {#oe. 'latin1'}
	}.
	call invokeAndReturn.

[Example(Server)]

SoapSetting showServerLog: true. "to see the traffic"
SoapExampleServiceImpl registerAllServices. "Register sample services."

[Supported Encodings]

SoapCore supports multi-encodings for passing data. There are merits and demerits. Please select what is appropriate for your purpose.

 call encoding: #soapSqEncoding. "<-- before invoking, you can specify encoding scheme"

Supported encoder symbols are:

#soapEncoding
    Default, not so cool, but SOAP 1.1 compliant 
#soapSqEncoding
    Squeak native base64 format(SmartRefStream), powerful for complex objects, but lackes interoperability 
#soapSixxEncoding (SIXX is needed)
    Portable Smalltalk XML format, usable for complex objects, but need to translate XML for interoperability with other languages 
#soapSrpEncoding (SRP is needed)
    Portable Smalltalk binary format, interoperable with other Smalltalks 
#nullEncoding
    tries to pass object 'as is', very fast, usable only for very primitive types (byte array, etc) 

You can also use "literal" scheme by setting useLiteral: true.
 call useLiteral: true.

[Messaging Style]
You can specify #rpc or #document for setting messaging style.
(#document is NOT 'document wrapped', so if you would like to use 'document wrapped', use #rpc and literal encoding.

 call useLiteral: true. "encoding is mostly literal"
 call style: #document.

[Shared Values]
In #soapEncoding, shared values are supported. SoapDecoder automatically handles shared values. 
For SoapEncoder, you can select whether to use shared values by setting SoapEncoder>>useSharedValues: (default is true).

 call encoder useSharedValues: false.

[Colocation]
Colocation is a feature for optimization. SoapCore automatically changes RPCs to local calls if their receivers are in local environment.

To activate this feature, 

 call useColocation: true.

* For more details. browse SoapExampleDoc.

[Extras]
This sar includes extra features. To activate them all, you have to install SIXX and SRP.
(they are released in SqueakMap).

---
2008/6/2 M.Umezawa
