-
-
Save amrnt/81cd16d1b74593acce34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:rp="http://bankid.com/RpService/v4.0.0/types/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://bankid.com/RpService/v4.0.0/" xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RpService" targetNamespace="http://bankid.com/RpService/v4.0.0/"> | |
<wsdl:documentation>BankID BUS RP interface | |
Version: 4.0.0</wsdl:documentation> | |
<wsdl:types> | |
<xsd:schema> | |
<xsd:import namespace="http://bankid.com/RpService/v4.0.0/types/" schemaLocation="https://appapi.test.bankid.com/rp/v4?xsd=RpService_v4.xsd" /> | |
</xsd:schema> | |
</wsdl:types> | |
<wsdl:message name="RpServicePortType_CollectResponse"> | |
<wsdl:part element="rp:CollectResponse" name="CollectResponse" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_AuthenticateResponse"> | |
<wsdl:part element="rp:AuthResponse" name="AuthResponse" /> | |
</wsdl:message> | |
<wsdl:message name="RpFault"> | |
<wsdl:part element="rp:RpFault" name="RpFault" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_SignResponse"> | |
<wsdl:part element="rp:SignResponse" name="SignResponse" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_Sign"> | |
<wsdl:part element="rp:SignRequest" name="SignRequest" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_Authenticate"> | |
<wsdl:part element="rp:AuthenticateRequest" name="AuthenticateRequest" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_FileSign"> | |
<wsdl:part element="rp:FileSignRequest" name="FileSignRequest" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_Collect"> | |
<wsdl:part element="rp:orderRef" name="orderRef" /> | |
</wsdl:message> | |
<wsdl:message name="RpServicePortType_FileSignResponse"> | |
<wsdl:part element="rp:FileSignResponse" name="FileSignResponse" /> | |
</wsdl:message> | |
<wsdl:portType name="RpServicePortType"> | |
<wsdl:operation name="Authenticate"> | |
<wsdl:input message="tns:RpServicePortType_Authenticate" /> | |
<wsdl:output message="tns:RpServicePortType_AuthenticateResponse" /> | |
<wsdl:fault message="tns:RpFault" name="RpFault" /> | |
</wsdl:operation> | |
<wsdl:operation name="Sign"> | |
<wsdl:input message="tns:RpServicePortType_Sign" /> | |
<wsdl:output message="tns:RpServicePortType_SignResponse" /> | |
<wsdl:fault message="tns:RpFault" name="RpFault" /> | |
</wsdl:operation> | |
<wsdl:operation name="FileSign"> | |
<wsdl:input message="tns:RpServicePortType_FileSign" /> | |
<wsdl:output message="tns:RpServicePortType_FileSignResponse" /> | |
<wsdl:fault message="tns:RpFault" name="RpFault" /> | |
</wsdl:operation> | |
<wsdl:operation name="Collect"> | |
<wsdl:input message="tns:RpServicePortType_Collect" /> | |
<wsdl:output message="tns:RpServicePortType_CollectResponse" /> | |
<wsdl:fault message="tns:RpFault" name="RpFault" /> | |
</wsdl:operation> | |
</wsdl:portType> | |
<wsdl:binding name="RpServiceSoapBinding" type="tns:RpServicePortType"> | |
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> | |
<wsdl:operation name="Authenticate"> | |
<soap:operation soapAction="" /> | |
<wsdl:input> | |
<soap:body use="literal" /> | |
</wsdl:input> | |
<wsdl:output> | |
<soap:body use="literal" /> | |
</wsdl:output> | |
<wsdl:fault name="RpFault"> | |
<soap:fault name="RpFault" use="literal" /> | |
</wsdl:fault> | |
</wsdl:operation> | |
<wsdl:operation name="Sign"> | |
<soap:operation soapAction="" /> | |
<wsdl:input> | |
<soap:body use="literal" /> | |
</wsdl:input> | |
<wsdl:output> | |
<soap:body use="literal" /> | |
</wsdl:output> | |
<wsdl:fault name="RpFault"> | |
<soap:fault name="RpFault" use="literal" /> | |
</wsdl:fault> | |
</wsdl:operation> | |
<wsdl:operation name="FileSign"> | |
<wsp:PolicyReference URI="#ForceMTOM" wsdl:required="false" /> | |
<soap:operation soapAction="" /> | |
<wsdl:input> | |
<soap:body use="literal" /> | |
</wsdl:input> | |
<wsdl:output> | |
<soap:body use="literal" /> | |
</wsdl:output> | |
<wsdl:fault name="RpFault"> | |
<soap:fault name="RpFault" use="literal" /> | |
</wsdl:fault> | |
</wsdl:operation> | |
<wsdl:operation name="Collect"> | |
<soap:operation soapAction="" /> | |
<wsdl:input> | |
<soap:body use="literal" /> | |
</wsdl:input> | |
<wsdl:output> | |
<soap:body use="literal" /> | |
</wsdl:output> | |
<wsdl:fault name="RpFault"> | |
<soap:fault name="RpFault" use="literal" /> | |
</wsdl:fault> | |
</wsdl:operation> | |
</wsdl:binding> | |
<wsdl:service name="RpService"> | |
<wsdl:port binding="tns:RpServiceSoapBinding" name="RpServiceSoapPort"> | |
<soap:address location="https://appapi.test.bankid.com/rp/v4" /> | |
</wsdl:port> | |
</wsdl:service> | |
<wsp:Policy wsu:Id="ForceMTOM"> | |
<wsoma:OptimizedMimeSerialization /> | |
</wsp:Policy> | |
</wsdl:definitions> |
@dnldd, I ended up using this for reading soap resp
package bankid
import (
"encoding/xml"
)
type Envelope struct {
Body Body `xml:"Body" json:"body,omitempty"`
}
type Body struct {
AuthResponse *AuthResponse `xml:"AuthResponse" json:"auth_response,omitempty"`
SignResponse *SignResponse `xml:"SignResponse" json:"sign_response,omitempty"`
CollectResponse *CollectResponse `xml:"CollectResponse" json:"collect_response,omitempty"`
Fault *Fault `xml:"Fault" json:"fault,omitempty"`
}
type AuthResponse struct {
OrderRef string `xml:"orderRef" json:"order_ref,omitempty"`
AutoStartToken string `xml:"autoStartToken" json:"auto_start_token,omitempty"`
}
type SignResponse struct {
OrderRef string `xml:"orderRef" json:"order_ref,omitempty"`
AutoStartToken string `xml:"autoStartToken" json:"auto_start_token,omitempty"`
}
type CollectResponse struct {
ProgressStatus string `xml:"progressStatus" json:"progress_status,omitempty"`
Signature string `xml:"signature" json:"signature,omitempty"`
UserInfo *UserInfo `xml:"userInfo" json:"user_info,omitempty"`
OcspResponse string `xml:"ocspResponse" json:"ocsp_response,omitempty"`
}
type UserInfo struct {
GivenName string `xml:"givenName" json:"given_name,omitempty"`
Surname string `xml:"surname" json:"surname,omitempty"`
Name string `xml:"name" json:"name,omitempty"`
PersonalNumber string `xml:"personalNumber" json:"personal_number,omitempty"`
NotBefore string `xml:"notBefore" json:"not_before,omitempty"`
NotAfter string `xml:"notAfter" json:"not_after,omitempty"`
IpAddress string `xml:"ipAddress" json:"ip_address,omitempty"`
}
type Fault struct {
FaultCode string `xml:"faultcode" json:"fault_code,omitempty"`
FaultString string `xml:"faultstring" json:"fault_string,omitempty"`
Detail *Detail `xml:"detail" json:"detail,omitempty"`
}
type Detail struct {
RpFault *RpFault `xml:"RpFault" json:"rp_fault,omitempty"`
}
type RpFault struct {
FaultStatus string `xml:"faultStatus" json:"fault_status,omitempty"`
DetailedDescription string `xml:"detailedDescription" json:"detailed_description,omitempty"`
}
func ReadEnvelope(data string) (*Envelope, error) {
var v *Envelope
if err := xml.Unmarshal([]byte(data), &v); err != nil {
return nil, err
}
return v, nil
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
did you ever get to build this service using go? If so, what toolset did you use?