-
Notifications
You must be signed in to change notification settings - Fork 75
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
I get this issue when trying to generate a server module from WSDL #41
Comments
If you can share the WSDL, I can have a look. |
@willemdj This is the WSDL <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="https://example.com/bankservice?wsdl"> |
This does not look like a valid WSDL to me. There seem to be quite a few <
and > characters missing. For example I assume that wsdl:types on the
second line should be <wsdl:types>.
Op wo 20 jun. 2018 om 08:09 schreef dotsiadia <notifications@github.com>:
… @willemdj <https://github.com/willemdj> This is the WSDL
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="https://example.com/bankservice?wsdl">
wsdl:types
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="
https://example.com/bankservice?wsdl" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="commitResponseSchool" type="tns:commitResponseSchool"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="bankingDetail" type="tns:bankingDetail"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="serviceFee" type="tns:serviceFee"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="enquireResponseSchool" type="tns:enquireResponseSchool"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="enquireRequestSchool" type="tns:enquireRequestSchool"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="enquireResponseScholar" type="tns:enquireResponseScholar"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="enquireRequestScholar" type="tns:enquireRequestScholar"/>
<xsd:complexType name="commitResponseSchool">
xsd:sequence
<xsd:element name="responseStatus" type="xsd:string"/>
<xsd:element name="responseStatusMeaning" type="xsd:string"/>
<xsd:element name="schoolId" type="xsd:string"/>
<xsd:element name="receiptNo" type="xsd:string"/>
<xsd:element name="transactionId" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="bankingDetail">
xsd:sequence
<xsd:element name="bankCode" type="xsd:string"/>
<xsd:element name="bankAcCode" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="serviceFee">
xsd:sequence
<xsd:element name="serviceFeeID" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="feeBalance" type="xsd:integer"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="bankingDetails" type="tns:bankingDetail" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="enquireResponseSchool">
xsd:sequence
<xsd:element name="responseStatus" type="xsd:string"/>
<xsd:element name="responseStatusMeaning" type="xsd:string"/>
<xsd:element name="authCode" type="xsd:string"/>
<xsd:element name="schoolId" type="xsd:string"/>
<xsd:element name="schoolName" type="xsd:string"/>
<xsd:element name="studySession" type="xsd:string" minOccurs="0"/>
<xsd:element xmlns:tns="https://example.com/bankservice?wsdl"
name="schoolPays" type="tns:serviceFee" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="enquireRequestSchool">
xsd:sequence
<xsd:element name="schoolId" type="xsd:string"/>
<xsd:element name="agentCode" type="xsd:string"/>
<xsd:element name="requestSignature" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="enquireResponseScholar">
xsd:sequence
<xsd:element name="responseStatus" type="xsd:string"/>
<xsd:element name="responseStatusMeaning" type="xsd:string"/>
<xsd:element name="authCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="scholarId" type="xsd:string" minOccurs="0"/>
<xsd:element name="schoolId" type="xsd:string" minOccurs="0"/>
<xsd:element name="schoolName" type="xsd:string" minOccurs="0"/>
<xsd:element name="scholarName" type="xsd:string" minOccurs="0"/>
<xsd:element name="feesBalance" type="xsd:integer" minOccurs="0"/>
<xsd:element name="agentCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="bankCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="bankAcCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="studySession" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="enquireRequestScholar">
xsd:sequence
<xsd:element name="scholarId" type="xsd:string" minOccurs="0"/>
<xsd:element name="schoolId" type="xsd:string" minOccurs="0"/>
<xsd:element name="bankCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="agentCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="requestSignature" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="commitRequestScholarIn">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:commitRequestScholar"/>
</wsdl:message>
<wsdl:message name="commitRequestSchoolIn">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:commitRequestSchool"/>
</wsdl:message>
<wsdl:message name="commitResponseScholarOut">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:commitResponseScholar"/>
</wsdl:message>
<wsdl:message name="commitResponseSchoolOut">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:commitResponseSchool"/>
</wsdl:message>
<wsdl:message name="enquireRequestScholarIn">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:enquireRequestScholar"/>
</wsdl:message>
<wsdl:message name="enquireRequestSchoolIn">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:enquireRequestSchool"/>
</wsdl:message>
<wsdl:message name="enquireResponseScholarOut">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:enquireResponseScholar"/>
</wsdl:message>
<wsdl:message name="enquireResponseSchoolOut">
<wsdl:part xmlns:tns="https://example.com/bankservice?wsdl"
name="parameters" element="tns:enquireResponseSchool"/>
</wsdl:message>
<wsdl:portType name="bankservicePortType">
<wsdl:operation name="commitRequestSchool">
<wsdl:input xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:commitRequestSchoolIn"/>
<wsdl:output xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:commitResponseSchoolOut"/>
</wsdl:operation>
<wsdl:operation name="enquireRequestSchool">
<wsdl:input xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:enquireRequestSchoolIn"/>
<wsdl:output xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:enquireResponseSchoolOut"/>
</wsdl:operation>
<wsdl:operation name="commitRequestScholar">
<wsdl:input xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:commitRequestScholarIn"/>
<wsdl:output xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:commitResponseScholarOut"/>
</wsdl:operation>
<wsdl:operation name="enquireRequestScholar">
<wsdl:input xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:enquireRequestScholarIn"/>
<wsdl:output xmlns:tns="https://example.com/bankservice?wsdl"
message="tns:enquireResponseScholarOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding xmlns:tns="https://example.com/bankservice?wsdl"
name="bankserviceBinding" type="tns:bankservicePortType">
<soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="commitRequestSchool">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
soapAction="commitRequestSchool" style="document"/>
wsdl:input
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:input>
wsdl:output
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="enquireRequestSchool">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
soapAction="enquireRequestSchool" style="document"/>
wsdl:input
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:input>
wsdl:output
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="commitRequestScholar">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
soapAction="commitRequestScholar" style="document"/>
wsdl:input
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:input>
wsdl:output
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="enquireRequestScholar">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
soapAction="enquireRequestScholar" style="document"/>
wsdl:input
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:input>
wsdl:output
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="bankservice">
<wsdl:port xmlns:tns="https://example.com/bankservice?wsdl"
name="bankserviceSoap" binding="tns:bankserviceBinding">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
location="https://example.com"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJjx8_Uzv2igoUbAC_wuAd8-VtZLeCFks5t-eb-gaJpZM4Utj6d>
.
|
@willemdj I generated that WSDL from the Erlang header file "bankservice.hrl" below using soap:erlang2wsdl("bankservice.hrl", "bankservice", "https://example.com", [{target_namespace, "https://example.com/bankservice?wsdl"}]). Please if there is anything I'm not doing properly from the .hrl file let me know. Thank you. -spec enquireRequestScholar(Parsed_body::#enquireRequestScholar{}, -spec commitRequestScholar(Parsed_body::#commitRequestScholar{}, -spec enquireRequestSchool(Parsed_body::#enquireRequestSchool{}, -spec commitRequestSchool(Parsed_body::#commitRequestSchool{}, -record(enquireRequestScholar, { -type enquireRequestScholar() :: #enquireRequestScholar{}. -record(enquireResponseScholar, { -type enquireResponseScholar() :: #enquireResponseScholar{}. -record(enquireRequestSchool, { -type enquireRequestSchool() :: #enquireRequestSchool{}. -record(enquireResponseSchool, { -type enquireResponseSchool() :: #enquireResponseSchool{}. -record(serviceFee, { -type serviceFee() :: #serviceFee{}. -record(bankingDetail,{ -type bankingDetail() :: #bankingDetail{}. -record(commitRequestSchool, { -type commitRequestSchool() :: #commitRequestSchool{}. -record(commitResponseSchool, { -type commitResponseSchool() :: #commitResponseSchool{}. |
It looks like something is broken. But when I tried your command I got another error: soap:erlang2wsdl("bankservice.hrl", "bankservice", "https://example.com", [{target_namespace, "https://example.com/bankservice?wsdl"}]). Did you do something to work around this problem? |
Also, there are some problems with your .hrl file. commitRequestScholar and commitResponseScholar are missing. And there is a comma after the last element of #commitRequestSchool{} that should not be there. I think that this is causing the problems that you are seeing. |
@willemdj I have named the .hrl to .txt such that i avoid copying the contents here When I run the function below I get the WSDL also attached here WSDL (renamed bankservice_wsdl.txt from bankservice.wsdl for purposes of uploading) But when is try generating the server, soap:wsdl2erlang("bankservice.wsdl"), I get the error above. I have tried to provide the exact files I used that is why I have used attachments. I'm surely stuck! Sorry for improperly copying those files before. |
There is a comma on line 123 of bankservice.txt, that is incorrect. Can you try what happens if you remove it? |
@willemdj Thank you guys very much! It has finally worked. |
Select a prefix for URI https://example.com./service.wsdl
1: No prefix
2: P0
3: Specify a custom prefix
Select a number: 2
** exception error: no case clause matching false
in function erlsom_lib:getTypeFromElement/2 (src/erlsom_lib.erl, line 1046)
in call from soap_parse_wsdl:type_for_part/2 (src/soap_parse_wsdl.erl, line 422)
in call from soap_parse_wsdl:'-type_for_message/3-lc$^0/1-0-'/2 (src/soap_parse_wsdl.erl, line 408)
in call from soap_parse_wsdl:process_op/3 (src/soap_parse_wsdl.erl, line 385)
in call from soap_parse_wsdl:'-process_ops/3-lc$^0/1-0-'/4 (src/soap_parse_wsdl.erl, line 377)
in call from soap_parse_wsdl:get_ops_from_port_type/2 (src/soap_parse_wsdl.erl, line 359)
in call from soap_parse_wsdl:get_ops_from_binding/2 (src/soap_parse_wsdl.erl, line 287)
in call from soap_parse_wsdl:get_operations/2 (src/soap_parse_wsdl.erl, line 254)
The text was updated successfully, but these errors were encountered: