[ic] More Soap Questions

Mike Heins interchange-users@icdevgroup.org
Wed Nov 6 14:36:01 2002


Quoting Shawn Mathews (shawn@oceanebi.com):
> I'm still trying to figure out this soap stuff....
> 
> It seems I need something called WSDL to describe the services provided my
> interchange for any of my SOAP components to work.
> 
> Two Questions:
> #1) Is there a WSDL file for interchange? or should I be looking for a
> SOAP::LITE WSDL file?


> #2)If there isn't, does anybody have any idea what functions are exposed via
> SOAP in interchange?

A WSDL file is just a compendium of the calls and schemas to call for
SOAP services on an individual server. Since IC doesn't really provide
services, and anything really interesting you can do involves writing a
UserTag to provide such a service, it really doesn't make too much sense
to provide a standard one.

Here is a sample which would describe a UserTag named "yourservice"
that returns an XML structure with the response result.

<?xml version="1.0"  encoding="utf-8"?>
          <!--targetNamespace="http://yourserver.com/your.wsdl"-->
<definitions
          name="YourService"
          xmlns:s="http://www.w3.org/2001/XMLSchema"
          xmlns:tns="http://yourserver.com/your.wsdl/"
          targetNamespace="http://yourserver.com/your.wsdl/"
          xmlns:xsd1="http://yourserver.com/your.xsd/"
          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
          xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
          xmlns="http://schemas.xmlsoap.org/wsdl/" >

<types/>

<message name="PostUpdateInput">
        <part name="body" type="s:string" />
</message>

<message name="PostUpdateOutput">
        <part name="body" type="s:boolean" />
</message>

<portType name="YourPortType">
        <operation name="PostUpdate">
                <input message="tns:PostUpdateInput"/>
                <output message="tns:PostUpdateOutput"/>
        </operation>
</portType>

<binding name="YourSoapBinding" type="tns:YourPortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="PostUpdate">
                <soap:operation soapAction="urn:YourService"/>
                <input>
                        <soap:body use="encoded" namespace="urn:YourService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
                </input>
                <output>
                        <soap:body use="encoded" namespace="urn:YourService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
                </output>
        </operation>
</binding>

<service name="YourService">
        <documentation>Your Services</documentation>
        <port name="YourPort" binding="tns:YourSoapBinding">
                <soap:address location="http://yourserver.com:7780/yourcat"/>
        </port>
</service>

</definitions>


-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer