Yaws_soap_lib and wsdl imports

Mikael Laaksonen mikael.laaksonen@REDACTED
Thu Dec 10 17:18:42 CET 2009


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>


More information about the erlang-questions mailing list