[erlang-questions] Troubleshooting using YAWS + SOAP

Willem de Jong w.a.de.jong@REDACTED
Tue Jul 17 21:45:47 CEST 2007


Hi Laura,

I haven't been able to solve your problem, sorry.

I created a very simple server and client that use your WSDL, and it works.
I am copying them below.

One thing that may be the cause of the problem is that one important
statement is still missing in the documentation: you have to actually start
the server... "yaws:start_embedded(Docroot, SL,GL)", assuming that Docroot,
GL and SL have the right values, see http://yaws.hyber.org/soap_intro.yaws.
However, from your error message I don't get the impression that this is
your problem.

Good luck,
Willem

A minimal server:

-module(my_soap).
-export([handler/4]).

-record('p:CodigoVO', {anyAttribs, 'etiqueta', 'valor'}).
-record('p:setParte', {anyAttribs, 'param0', 'param1', 'param2', 'param3',
        'param4', 'param5', 'param6'}).
-record('p:setParteResponse', {anyAttribs, 'return'}).

handler(_Header,
        [#'p:setParte'{'param0' = P0}],
        _Action,
        _SessionValue) ->
    {ok, undefined, setParte(P0)}.

setParte(P0) ->
  CodigoVO = #'p:CodigoVO'{'etiqueta' = P0, 'valor' = 1},
  #'p:setParteResponse'{'return' = CodigoVO}.

A minimal client:

-module(client).
-export([run/1]).

-record('p:CodigoVO', {anyAttribs, 'etiqueta', 'valor'}).
-record('p:setParte', {anyAttribs, 'param0', 'param1', 'param2', 'param3',
        'param4', 'param5', 'param6'}).
-record('p:setParteResponse', {anyAttribs, 'return'}).

run(P0) ->
  Wsdl = yaws_soap_lib:initModel("file://Service.wsdl <file://service.wsdl/>
"),
  Request = #'p:setParte'{'param0' = P0,
                          'param1' = "P1",
                          'param2' = "P2",
                          'param3' = "P3",
                          'param4' = "P4",
                          'param5' = "P5",
                          'param6' = "P6"},
  yaws_soap_lib:call(Wsdl, "setParte", [], [Request]).



On 7/17/07, Laura M. Castro Souto <lcastro@REDACTED> wrote:
>
>
>   Hello Willem, hello list,
>
> > Can you give a little more background information?
>
>        Of course. I should have in my email to the list, actually (sorry
> for that).
>
> > - Did you use the soap functionality that is packaged with YAWS? (as
> > described here: http://yaws.hyber.org/soap_intro.yaws)
>
>        Yes, we are using yaws soap functionality (version is 1.68). And
> yes, what we
> did is essentially what is explained on the "The SOAP server side" section
> of
> that page.
>
> > - Do you use an WSDL? Could you send it to me (or to the list), so I
> could
> > do some tests?
>
>        Yes, we do have an WSDL file. You can find it attached.
>
> > - Did you try to use the soap client that is provided with yaws? Does
> that
> > work?
>
>        No, we didn't. Since we used our own client and also the SOAPUi
> client (and
> obtained the same results), we figured out that the problem shouldn't be
> involving the client. Do you think this is a possibility? If you do, where
> in
> the yaws distribution is that sample soap client located?
>
>        We have also tried to increment the gen_server timeout, but there
> was no
> improvement. Even though the process seems to die due to a timeout (as the
> error message claims), the death is just inmediate, as if it were just
> receiving the client call, invoking our handler module and then crashing
> right after that.
>
>        By the way, we had exactly the same problem that Ahmed Ali referred
> to, with
> the "nillable" property of the service parameters, but after we removed
> them
> (and also an "attributeFormDefault="qualified"" from the wsdl:definitions
> header) that problem dissapeared in our case (I am attaching the original
> WSDL file, too).
>
>        Thank you very much for your time.
>
>        Regards,
>
> --
> Laura M. Castro
> MADS Group - Computer Science Department
> University of A Corunna
> http://www.madsgroup.org/staff/laura/index_en.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070717/abdfb3aa/attachment.htm>


More information about the erlang-questions mailing list