A fully automatic transformation utility is not realistic. Unless you
adopt and specify standard naming conventions, a utility would not be
able to determine which element should be used for the input message
and which should be used for the output message. If your schema
defines multiple root elements (indicating different operations), the
utility would have no way of determining which elements go with which
operation.

Hence this will be a manual process.

You best bet is to take a WSDL template (I've attached one) and fill
in the blanks following the instructions Martin provides below. If you
are using a WSDL editor, the process is even easier.

Note that in your situation, you already have the schema that the
instructions indicate you must "create or infer". I suggest that you
simply include the schema in the WSDL. Your primary task is figuring
out which element you should use for your input message and which
element you should use for your output message.

I've specified a few generic names for the various artifacts in the
WSDL (e.g., name="interface" for the portType. You can replace these
names with more descriptive names if you like, but you need to make
sure you change the names consistently (e.g. the "type" attribute in
the binding must reference the Qname of the portType). All the
attribute values that are enclosed in brackets must be changed to
specify the appropriate namespaces, file locations, etc.

Anne

On 9/20/06, Martin Gainty <[EMAIL PROTECTED]> wrote:


http://blog.springframework.com/arjen/archives/2006/07/27/xslt-that-transforms-from-xsd-to-wsdl/

where the steps are

start with the XML messages,
create or infer a schema from that,
copy all the defined elements in messages,
create operations from the messages
create a portType from the operations
create a binding from the portType
create a service from the binding
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.





----- Original Message -----
From: Shawn McKisson
To: [email protected]
Sent: Wednesday, September 20, 2006 2:56 PM
Subject: XSD -> WSDL tool wanted




I have an XSD that I would like to convert to WSDL. Does Axis provide any
tools to facilitate this? If not, does anyone have any suggestions on where
to find something?



--shawn
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    name="[some-name]"
    targetNamespace="[your-WSDL-targetNamespace-uri]"
    xmlns:tns="[your-WSDL-targetNamespace-uri]"
    xmlns:types="[your-schema-targetNamespace-uri]"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
    <wsdl:types>
        <xsd:schema
            targetNamespace="[your-schema-targetNamespace-uri]">
            <xsd:include schemaLocation="[url-of-your-schema-file]"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="request">
        <wsdl:part element="[Qname-of-request-element]" name="in"/>
    </wsdl:message>
    <wsdl:message name="response">
        <wsdl:part element="[Qname-of-response-element]" name="out"/>
    </wsdl:message>
    <wsdl:portType name="interface">
        <wsdl:operation name="submit">
            <wsdl:input message="tns:Request" name="request"/>
            <wsdl:output message="tns:Response" name="response"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="interfaceSoap11Binding" type="tns:interface">
        <soap:binding style="document" 
            transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="submit">
            <soap:operation soapAction="[uri-that-names-this-operation]" 
                style="document"/>
            <wsdl:input name="request">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="response">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="[your-service-name]">
        <wsdl:port binding="tns:interfaceSoap11Binding" 
            name="interfacePort">
            <soap:address
                location="[url-of-the-service-endpoint]"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to