Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with erlsom parsing #7

Open
KamilLelonek opened this issue Oct 12, 2015 · 5 comments
Open

Problem with erlsom parsing #7

KamilLelonek opened this issue Oct 12, 2015 · 5 comments

Comments

@KamilLelonek
Copy link

I get the following error:

iex(1)> Detergentex.call("http://webapi.allegro.pl/service.php?wsdl", "doQuerySysStatus", [])
** (throw) {:error, 'Struct doesn\'t match model: recordtype not expected: p:doQuerySysStatus'}
    (erlsom) src/erlsom_write.erl:357: :erlsom_write.findAlternative/4
    (erlsom) src/erlsom_write.erl:258: :erlsom_write.processSubType/5
    (erlsom) src/erlsom_write.erl:241: :erlsom_write.processElementValues/7
    (erlsom) src/erlsom_write.erl:132: :erlsom_write.struct2xml/6
    (erlsom) src/erlsom_write.erl:323: :erlsom_write.processAlternativeValue/8
    (erlsom) src/erlsom_write.erl:241: :erlsom_write.processElementValues/7
    (erlsom) src/erlsom_write.erl:116: :erlsom_write.struct2xml/6
    (erlsom) src/erlsom_write.erl:323: :erlsom_write.processAlternativeValue/8

even if I have this operation listed:

iex(2)> Detergentex.init_model("http://webapi.allegro.pl/service.php?wsdl")
{:wsdl,
 [
  {:operation, 'serviceService', 'servicePort', 'doQuerySysStatus',
   'serviceBinding', 'https://webapi.allegro.pl/service.php',
   '#doQuerySysStatus'},
  ...
 {:model,
  [{:type, :_document, :sequence,
    [{:el,
      [
       {:alt, :"p:doQuerySysStatusResponse", :"p:doQuerySysStatusResponse", [],
        1, 1, true, :undefined},
        ...
      ]
  }]}]}
 ]
 ...
}

What may be the reason?

@r-icarus
Copy link
Owner

I've had some problems with erlsom and nested structures. I have tried sending tuples and maps but no success so far. Are you still experiencing these problems ?

@matteosister
Copy link

same problem here...I'm not able to make it work. Any suggestion?

@sveinfid
Copy link

I'm experiencing the same issue. See the following Stack Overflow question for more information and a similar stack trace: Elixir call Axis2 Java SOAP Web Service with detergentex and detergent

@r-icarus
Copy link
Owner

I just found something that might be helpful. http://erlang.org/pipermail/erlang-questions/2008-July/036759.html you might have to bypass detergentex and try it with :detergent first.

@r-icarus
Copy link
Owner

@sveinfid I get somewhere different with this:

wsdl = :detergent.initModel('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl','p')
:detergent.call(wsdl, 'getBank', [], '123')

But still missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants