[erlang-questions] SOAP Call

Willem de Jong w.a.de.jong@REDACTED
Sun Jun 6 12:10:13 CEST 2010


Hi,

Considering that you have the XSD, you might try an alternative approach:

1. extract the XSD from the WSDL (the bit between <wsdl:types> and
</wsdl:types>)
2. create a "model" out of this using erlsom:compile_xsd_file()
3. create a "model" for the soap envelope (of the right version...), again
using erlsom:compile_xsd_file()
4. create a combined model using erlsom:add_model() (have a look at
initModel2() in yaws_soap_lib.erl for an example).
5. create a set of record definitions using erlsom:write_hrl()

The resulting model (and records) can be used to parse and generate the soap
messages you need, using erlsom:scan() and erlsom:write().

Have a look at the erlsom documentation <http://erlsom.sourceforge.net/>!

Regards,
Willem


Regards,
Willem


On Sat, Jun 5, 2010 at 6:54 PM, Hisham <mhishami@REDACTED> wrote:

> Hi Willem,
>
> Thanks for your note. I was afraid you might say this :-)
>
> No problem, as we just have to do this via template like ErlyDTL with
> mochiweb for preparing the message to be sent.
> Another way is to just hardcode the message structure into a string. We'll
> see which one works the best.
> As for receiving request, a normal erlsom:simple_form/1 can do the work
> just fine.
>
> Thanks for your tips Willem.
>
> Have a good weekend guys.
>
>
> On Fri, Jun 4, 2010 at 1:31 AM, Willem de Jong <w.a.de.jong@REDACTED>wrote:
>
>> Hi,
>>
>> The problem is that this uses SOAP 1.2 binding. This isn't supported. Do
>> you have the option to use version 1.1?
>>
>> Regards,
>> Willem
>>
>> On Wed, Jun 2, 2010 at 12:26 PM, Hisham <mhishami@REDACTED> wrote:
>>
>>> Hi Willem,
>>>
>>> Appreciate your reply (as always :D)
>>> Please find the attached file. Not sure if attachment is allowed, but I
>>> put the main email to you.
>>>
>>>
>>> On Wed, Jun 2, 2010 at 6:16 PM, Willem de Jong <w.a.de.jong@REDACTED>wrote:
>>>
>>>> Hello,
>>>>
>>>> Can you show us the WSDL?
>>>>
>>>> Regards,
>>>> Willem
>>>>
>>>> On Wed, Jun 2, 2010 at 11:29 AM, Hisham <mhishami@REDACTED> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>> I have below operation:
>>>>>
>>>>> 1> Wsdl = yaws_soap_lib:initModel("SDPServices.wsdl").
>>>>> {wsdl,[],
>>>>>     {model,[{type,'_document',sequence,
>>>>>                   [{el,[{alt,'soap:Header','soap:Header',[],
>>>>> 1,1,true,
>>>>>                              undefined},
>>>>>                         {alt,'soap:Fault','soap:Fault',[],
>>>>> 1,1,true,undefined},
>>>>>                         {alt,'soap:Envelope','soap:Envelope',[],
>>>>> 1,1,true,undefined},
>>>>>                         {alt,'soap:Body','soap:Body',[],
>>>>> 1,1,true,undefined},
>>>>>                         {...}|...],
>>>>> 3> yaws_soap_lib:wsdl_operations(Wsdl).
>>>>> []
>>>>> 4>
>>>>>
>>>>> My concern is, I have "zero" operations after parsing the WSDL as
>>>>> shown in 3> above.
>>>>> I browse through the web, and some says I have to trim the
>>>>> "nillable=true" out, and it should be fine.
>>>>> That was done, but still the operations are zero.
>>>>>
>>>>> Anybody can pin point to the right direction?
>>>>>
>>>>> TIA.
>>>>>
>>>>> ________________________________________________________________
>>>>> erlang-questions (at) erlang.org mailing list.
>>>>> See http://www.erlang.org/faq.html
>>>>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>>>>
>>>>>
>>>>
>>>
>>
>


More information about the erlang-questions mailing list