[erlang-questions] How combine WSDL along with XSD using erlsom + yaws_soap_lib

David García garcia.narbona@REDACTED
Thu Sep 10 11:08:32 CEST 2015


Hi Wille,

I attach you the WSDL (test.wsdl) I am using. I have tried three ways of
using this WSDL:

   - first one this same one I am sending you
   - second one adding the import of the XSD file:
      - <wsdl:types>
      -         <xsd:schema targetNamespace="
      http://www.w3.org/2001/XMLSchema">
      -             <xsd:import namespace="http://www.w3.org/namespace/"
      schemaLocation="../wsdl/redsys/consultas/redsys_types.xsd"/>
      -         </xsd:schema>
      -     </wsdl:types>
   - third one, copying all the XSD content into the WSDL file


I am using yaws_soap_lib.erl for doing so, along with erlsom library.I call
the method:

yaws_soap_lib:initModel("WHOLE_PATH_TO_test.wsdl").

I get the message:

 exited: {{shutdown,
                 {failed_to_start_child,redsys_wsdl_connector,
                     {{badmatch,
                          {error,"Group definition not found
Response/SEQ1"}},
                      [{yaws_soap_lib,addSchemas,4,
                           [{file,"src/lib/yaws_soap_lib.erl"},{line,394}]},
                       {yaws_soap_lib,parseWsdls,4,
                           [{file,"src/lib/yaws_soap_lib.erl"},{line,359}]},
                       {yaws_soap_lib,initModel2,5,
                           [{file,"src/lib/yaws_soap_lib.erl"},{line,331}]},
                       {redsys_wsdl_connector,init,1,
                           [{file,"src/redsys/redsys_wsdl_connector.erl"},
                            {line,29}]},
                       {gen_server,init_it,6,
                           [{file,"gen_server.erl"},{line,304}]},
                       {proc_lib,init_p_do_apply,3,
                           [{file,"proc_lib.erl"},{line,239}]}]}}},


I also have been trying creating a config file to get headers for compiling
WSDL. I also attach  the config file I have prepared, but still can't
getting working.

I also attach a WSDL that is working for me with the same source code (the
only difference is that XSD definition is embeded in the WSDL -- as in the
third option I have tried with the non working example -- ). This XSD
definition does not have sequences defined, then I don't have the problem I
have with the non working WSDL.

Regards,


2015-09-10 8:04 GMT+02:00 Willem de Jong <w.a.de.jong@REDACTED>:

> Hello David,
>
> Yes, it should be possible to use yaws_soap_lib with a WSDL and an XSD,
> either by importing the XSD or by embedding it in the WSDL.
>
> At first sight I would say that the definition of ClassA is valid and
> should be accepted by erlsom.
>
> Can you give a bit more information about what you are doing? Perhaps send
> me the WSDL and XSD and the commands that you have been trying.
>
> Regards,
> Willem
>
> On Wed, Sep 9, 2015 at 7:56 PM, David García <garcia.narbona@REDACTED>
> wrote:
>
>>
>> Would it be possible to combine WSDL along with XSD file when using
>> yaws_soap_lib?
>> I have already tried importing XSD from WSDL, as well as copying the
>> content of the XSD into the WSDL.
>> Apparently there's a problem with erlsom dealing with sequence
>> definitions in the XSD file:
>>
>>    <element name="ClassA">
>>         <complexType>
>>             <choice>
>>                   <element ref="MoMa" />
>>                 <sequence minOccurs="0" maxOccurs="unbounded">
>>                     <element ref="Resp" />
>>                 </sequence>
>>                 <element ref="ErrMsg" />
>>             </choice>
>>         </complexType>
>>     </element>
>>
>>
>> I get "*Group definition not found*" for the sequence elements, because
>> it looks like erlsom uses a default prefix ("P:") for creating internal
>> structure, but it does not use the prefix in the sequence erlsom internal
>> structure, then it can not link it.
>>
>> I have already tried compiling and adding the XSD model to the WSDL model
>> using erlsom API methods, but I didn't succeed to get it working.
>>
>> Any clue?
>>
>> Thanks in advance.
>>
>> --
>> David
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>


-- 
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150910/1dbe0ec6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: files.tar.gz
Type: application/x-gzip
Size: 2194 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150910/1dbe0ec6/attachment.bin>


More information about the erlang-questions mailing list