[erlang-questions] Yaws_soap_lib and wsdl imports
Willem de Jong
w.a.de.jong@REDACTED
Fri Dec 11 11:49:01 CET 2009
Hi,
It does handle imports statements, but with limitations ...
I had a look at it, and I think there are 2 problems with this example:
- it imports the schema for XMLSchema without giving a location. This could
easily be fixed, but it would't solve the other problem:
- in the Schema part of Listing4, a reference is made to a type from
Listing5. This doesn't work right now, and it is not so easy to fix this. In
general, I would say that in such a case it would be better practice to
import it by means of an XSD import, rather than a WSDL import.
Since this WSDL is just an example from a website, I am not very keen to
spend a lot of time on it. Do you have a concrete problem? If so, you could
maybe send me the actual WSDL (or a version that reproduces the problem).
Regards,
Willem
On Thu, Dec 10, 2009 at 5:18 PM, Mikael Laaksonen <
mikael.laaksonen@REDACTED> wrote:
> Hello,
> I am have trouble working with wsdl-files in yaws_soap_lib when they have
> import-statements. Does yaws handle import statements in wsdl:s?
>
> An example taken from:
> http://www.ibm.com/developerworks/xml/library/ws-tip-imports.html
>
> Thankful for all help.
>
> /Mikael Laakosnen
>
>
> ps. Sorry if I'm spamming but I can't seem get my post through.
>
>
> -------------------------------------------------------------------------
> (ml@REDACTED)10> yaws_soap_lib:initModel("[...path_to_fil...]/listing4.wsdl").
> ** exited: {{badmatch,{error,"Include file not found (undefined)"}},
> [{yaws_soap_lib,addSchemas,5},
> {yaws_soap_lib,parseWsdls,5},
> {yaws_soap_lib,initModel2,5},
> {erl_eval,do_apply,5},
> {shell,exprs,6},
> {shell,eval_loop,3}]} **
>
>
>
> -------------------------------------------------------------------------
> Listings4
> -------------------------------------------------------------------------
> <?xml version="1.0" ?>
> <wsdl:definitions targetNamespace="urn:listing4"
> xmlns:tns="urn:listing4"
> xmlns:listing5="urn:listing5"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>
> <wsdl:import namespace="urn:listing5" location="listing5.wsdl"/>
>
> <wsdl:types>
> <xsd:schema targetNamespace="urn:listing4"
> xmlns:listing5="urn:listing5"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"/>
> <xsd:complexType name="Address">
> <xsd:sequence>
> <xsd:element name="streetNum" type="xsd:int"/>
> <xsd:element name="streetName" type="xsd:string"/>
> <xsd:element name="city" type="xsd:string"/>
> <xsd:element name="state" type="xsd:string"/>
> <xsd:element name="phone"
> type="listing5:Phone"
> />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="GetAddressRequest">
> <wsdl:part name="name" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="GetAddressResponse">
> <wsdl:part name="address" type="tns:Address"/>
> </wsdl:message>
> <wsdl:message name="GetPhoneRequest">
> <wsdl:part name="name" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="GetPhoneResponse">
> <wsdl:part name="phone"
> type="listing5:Phone"
> />
> </wsdl:message>
>
> <wsdl:portType name="AddressBook">
> <wsdl:operation name="getAddress">
> <wsdl:input message="tns:GetAddressRequest"/>
> <wsdl:output message="tns:GetAddressResponse"/>
> </wsdl:operation>
> <wsdl:operation name="getPhone">
> <wsdl:input message="tns:GetPhoneRequest"/>
> <wsdl:output message="tns:GetPhoneResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> </wsdl:definitions>
>
>
>
>
> ---------------------------------------------------------------------
> Listings5
> ---------------------------------------------------------------------
> <?xml version="1.0" ?>
>
> <wsdl:definitions targetNamespace="urn:listing5"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <wsdl:types>
>
> <xsd:schema targetNamespace="urn:listing5"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"/>
> <xsd:complexType name="Phone">
> <xsd:sequence>
> <xsd:element name="areaCode" type="xsd:int"/>
> <xsd:element name="exchange" type="xsd:int"/>
> <xsd:element name="number" type="xsd:int"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
> </wsdl:types>
> </wsdl:definitions>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>
More information about the erlang-questions
mailing list