xsd:element with string based type produced wrong request
sblgo opened this issue · 1 comments
sblgo commented
<xsd:element name="ChangeListRevertRequest" type="ChangeListChangeListID"/>
<xsd:simpleType name="ChangeListChangeListID">
<xsd:restriction base="xsd:token">
<xsd:length value="36"/>
<xsd:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/>
</xsd:restriction>
</xsd:simpleType>
generates following request
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Content>1d10e7fa-6a29-11eb-af44-000006f9e3b3</Content></Body></Envelope>
expected is
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body xmlns="http://schemas.xmlsoap.org/soap/envelope/"><ChangeListRevertRequest>1d10e7fa-6a29-11eb-af44-000006f9e3b3</ChangeListRevertRequest></Body></Envelope>
full wsdl is here
#####################################################################################################
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="ChangeListIn" targetNamespace="http://sap.com/xi/BASIS" xmlns:p1="http://sap.com/xi/BASIS">
<wsdl:documentation/>
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://sap.com/xi/BASIS" xmlns="http://sap.com/xi/BASIS" xmlns:p3="http://sap.com/xi/BASIS/Global">
<xsd:import namespace="http://sap.com/xi/BASIS/Global"/>
<xsd:element name="ChangeListGetStateRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListActivateRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListRevertRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListGetObjectIdentifiersRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListCreateRequest" type="RestrictedChangeListID"/>
<xsd:element name="LogMessageCollection" type="LogMessageCollection"/>
<xsd:element name="ChangeListGetCacheStateRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListCheckContentRequest" type="ChangeListChangeListID"/>
<xsd:element name="ChangeListGetCacheStateResponse" type="ChangeListGetCacheStateOut"/>
<xsd:element name="ChangeListCreateResponse" type="ChangeListCreateOut"/>
<xsd:element name="ChangeListGetStateResponse" type="ChangeListGetStateOut"/>
<xsd:element name="ChangeListGetObjectIdentifiersResponse" type="ChangeListGetObjectIdentifiersOut"/>
<xsd:simpleType name="ReceiverRuleID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ChangeListCacheStateCode">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="New"/>
<xsd:enumeration value="In Process"/>
<xsd:enumeration value="Successful"/>
<xsd:enumeration value="Warning"/>
<xsd:enumeration value="Failed"/>
<xsd:enumeration value="Unknown"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CommunicationPartyID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ValueMappingID">
<xsd:restriction base="xsd:token">
<xsd:length value="36"/>
<xsd:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ProcessComponentID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CommunicationComponentComponentID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ConfigurationScenarioID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ChangeListChangeListID">
<xsd:restriction base="xsd:token">
<xsd:length value="36"/>
<xsd:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ChangeListState">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="Open"/>
<xsd:enumeration value="Transportable"/>
<xsd:enumeration value="Closed"/>
<xsd:enumeration value="Consolidated"/>
<xsd:enumeration value="Unknown"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="DesignObjectNamespace">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="DesignObjectName">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="120"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CommunicationChannelChannelID">
<xsd:restriction base="xsd:token">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="LogMessageClassificationCode">
<xsd:restriction base="xsd:token"/>
</xsd:simpleType>
<xsd:complexType name="ChangeListID">
<xsd:sequence>
<xsd:element minOccurs="0" name="ChangeListID" type="ChangeListChangeListID"/>
<xsd:element minOccurs="0" name="Name" type="p3:LANGUAGEINDEPENDENT_LONG_Name"/>
<xsd:element minOccurs="0" name="Description" type="p3:LONG_Description"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageCommunicationChannel">
<xsd:sequence>
<xsd:element minOccurs="0" name="CommunicationChannelID" type="CommunicationChannelID"/>
<xsd:element name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageMessageHeader">
<xsd:sequence>
<xsd:element minOccurs="0" name="MessageHeader" type="MessageHeaderID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListGetCacheStateOut">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="CacheState" type="ChangeListCacheState"/>
<xsd:element minOccurs="0" name="LogMessageCollection" type="LogMessageCollection"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageCommunicationParty">
<xsd:sequence>
<xsd:element minOccurs="0" name="PartyID" type="CommunicationPartyID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListCreateOut">
<xsd:sequence>
<xsd:element minOccurs="0" name="ChangeListID" type="ChangeListID"/>
<xsd:element minOccurs="0" name="LogMessageCollection" type="LogMessageCollection"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListGetObjectIdentifiersOut">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="PartyID" type="CommunicationPartyID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ProcessComponentID" type="ProcessComponentID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="BusinessSystemID" type="CommunicationComponentID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="BusinessComponentID" type="CommunicationComponentID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="IntegrationProcessID" type="CommunicationComponentID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="CommunicationChannelID" type="CommunicationChannelID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="SenderAgreementID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ReceiverAgreementID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="DirectConnectionID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="IntegratedConfigurationID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ReceiverDeterminationID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ReceiverRuleID" type="ReceiverRuleID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="InterfaceDeterminationID" type="MessageHeaderID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ValueMappingID" type="ValueMappingID"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ConfigurationScenarioID" type="ConfigurationScenarioID"/>
<xsd:element minOccurs="0" name="LogMessageCollection" type="LogMessageCollection"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListCacheState">
<xsd:sequence>
<xsd:element name="Consumer" type="p3:LANGUAGEINDEPENDENT_Name"/>
<xsd:element name="NotificationState" type="ChangeListCacheStateCode"/>
<xsd:element name="RefreshState" type="ChangeListCacheStateCode"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ErrorMessage" type="p3:Text"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="CachedObject" type="ChangeListCacheObjectState"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RestrictedChangeListID">
<xsd:sequence>
<xsd:element minOccurs="0" name="Name" type="p3:LANGUAGEINDEPENDENT_LONG_Name"/>
<xsd:element minOccurs="0" name="Description" type="p3:LONG_Description"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListGetStateOut">
<xsd:sequence>
<xsd:element minOccurs="0" name="State" type="ChangeListState"/>
<xsd:element minOccurs="0" name="LogMessageCollection" type="LogMessageCollection"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageCollection">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessage" type="LogMessage"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageChangeList" type="LogMessageChangeList"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageParty" type="LogMessageCommunicationParty"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageProcessComponent" type="LogMessageProcessComponent"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageBusinessSystem" type="LogMessageCommunicationComponent"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageBusinessComponent" type="LogMessageCommunicationComponent"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageIntegrationProcess" type="LogMessageCommunicationComponent"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageCommunicationChannel" type="LogMessageCommunicationChannel"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageSenderAgreement" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageReceiverAgreement" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageDirectConnection" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageIntegratedConfiguration" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageReceiverDetermination" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageReceiverRule" type="LogMessageReceiverRule"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageInterfaceDetermination" type="LogMessageMessageHeader"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageValueMapping" type="LogMessageValueMapping"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="LogMessageConfigurationScenario" type="LogMessageConfigurationScenario"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MessageHeaderID">
<xsd:sequence>
<xsd:element minOccurs="0" name="SenderPartyID" type="CommunicationPartyID"/>
<xsd:element name="SenderComponentID" type="CommunicationComponentComponentID"/>
<xsd:element name="InterfaceName" type="DesignObjectName"/>
<xsd:element name="InterfaceNamespace" type="DesignObjectNamespace"/>
<xsd:element minOccurs="0" name="ReceiverPartyID" type="CommunicationPartyID"/>
<xsd:element minOccurs="0" name="ReceiverComponentID" type="CommunicationComponentComponentID"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommunicationComponentID">
<xsd:sequence>
<xsd:element minOccurs="0" name="PartyID" type="CommunicationPartyID"/>
<xsd:element name="ComponentID" type="CommunicationComponentComponentID"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageConfigurationScenario">
<xsd:sequence>
<xsd:element minOccurs="0" name="ConfigurationScenarioID" type="ConfigurationScenarioID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageValueMapping">
<xsd:sequence>
<xsd:element minOccurs="0" name="ValueMappingID" type="ValueMappingID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageItem">
<xsd:sequence>
<xsd:element minOccurs="0" name="SeverityCode" type="p3:LogItemSeverityCode"/>
<xsd:element minOccurs="0" name="ClassificationCode" type="LogMessageClassificationCode"/>
<xsd:element minOccurs="0" name="Message" type="p3:Text"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageChangeList">
<xsd:sequence>
<xsd:element minOccurs="0" name="ChangeListID" type="ChangeListID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommunicationChannelID">
<xsd:sequence>
<xsd:element minOccurs="0" name="PartyID" type="CommunicationPartyID"/>
<xsd:element name="ComponentID" type="CommunicationComponentComponentID"/>
<xsd:element name="ChannelID" type="CommunicationChannelChannelID"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageProcessComponent">
<xsd:sequence>
<xsd:element minOccurs="0" name="ProcessComponentID" type="ProcessComponentID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ChangeListCacheObjectState">
<xsd:sequence>
<xsd:element name="ObjectName" type="p3:LANGUAGEINDEPENDENT_Name"/>
<xsd:element name="ObjectCacheState" type="ChangeListCacheStateCode"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ErrorMessage" type="p3:Text"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageReceiverRule">
<xsd:sequence>
<xsd:element minOccurs="0" name="ReceiverRuleID" type="ReceiverRuleID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessage">
<xsd:sequence>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LogMessageCommunicationComponent">
<xsd:sequence>
<xsd:element minOccurs="0" name="CommunicationComponentID" type="CommunicationComponentID"/>
<xsd:element minOccurs="0" name="LogMessageItem" type="LogMessageItem"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://sap.com/xi/BASIS/Global" xmlns="http://sap.com/xi/BASIS/Global">
<xsd:simpleType name="LANGUAGEINDEPENDENT_LONG_Name">
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="80"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Indicator">
<xsd:restriction base="xsd:boolean"/>
</xsd:simpleType>
<xsd:simpleType name="LogItemSeverityCode">
<xsd:restriction base="xsd:token">
<xsd:length value="1"/>
<xsd:enumeration value="1"/>
<xsd:enumeration value="2"/>
<xsd:enumeration value="3"/>
<xsd:enumeration value="4"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="LANGUAGEINDEPENDENT_Name">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="LanguageCode">
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="LONG_Description.Content">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Text">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="languageCode" type="LanguageCode"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="LanguageCodeContextElements">
<xsd:sequence>
<xsd:element minOccurs="0" name="LanguageInstalledIndicator" type="Indicator"/>
<xsd:element minOccurs="0" name="LanguageAllowedIndicator" type="Indicator"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LONG_Description">
<xsd:simpleContent>
<xsd:extension base="LONG_Description.Content">
<xsd:attribute name="languageCode" type="LanguageCode"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ChangeListGetObjectIdentifiersRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetObjectIdentifiersRequest" name="ChangeListGetObjectIdentifiersRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListGetObjectIdentifiersResponse">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetObjectIdentifiersResponse" name="ChangeListGetObjectIdentifiersResponse"/>
</wsdl:message>
<wsdl:message name="ChangeListRevertRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListRevertRequest" name="ChangeListRevertRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListCheckContentRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListCheckContentRequest" name="ChangeListCheckContentRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListCreateRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListCreateRequest" name="ChangeListCreateRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListCreateResponse">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListCreateResponse" name="ChangeListCreateResponse"/>
</wsdl:message>
<wsdl:message name="ChangeListGetCacheStateRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetCacheStateRequest" name="ChangeListGetCacheStateRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListGetCacheStateResponse">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetCacheStateResponse" name="ChangeListGetCacheStateResponse"/>
</wsdl:message>
<wsdl:message name="ChangeListActivateRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListActivateRequest" name="ChangeListActivateRequest"/>
</wsdl:message>
<wsdl:message name="LogMessageCollection">
<wsdl:documentation/>
<wsdl:part element="p1:LogMessageCollection" name="LogMessageCollection"/>
</wsdl:message>
<wsdl:message name="ChangeListGetStateRequest">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetStateRequest" name="ChangeListGetStateRequest"/>
</wsdl:message>
<wsdl:message name="ChangeListGetStateResponse">
<wsdl:documentation/>
<wsdl:part element="p1:ChangeListGetStateResponse" name="ChangeListGetStateResponse"/>
</wsdl:message>
<wsdl:portType name="ChangeListIn">
<wsdl:documentation/>
<wsdl:operation name="GetObjectIdentifiers">
<wsdl:input message="p1:ChangeListGetObjectIdentifiersRequest"/>
<wsdl:output message="p1:ChangeListGetObjectIdentifiersResponse"/>
</wsdl:operation>
<wsdl:operation name="Revert">
<wsdl:input message="p1:ChangeListRevertRequest"/>
<wsdl:output message="p1:LogMessageCollection"/>
</wsdl:operation>
<wsdl:operation name="CheckContent">
<wsdl:input message="p1:ChangeListCheckContentRequest"/>
<wsdl:output message="p1:LogMessageCollection"/>
</wsdl:operation>
<wsdl:operation name="Create">
<wsdl:input message="p1:ChangeListCreateRequest"/>
<wsdl:output message="p1:ChangeListCreateResponse"/>
</wsdl:operation>
<wsdl:operation name="GetCacheState">
<wsdl:input message="p1:ChangeListGetCacheStateRequest"/>
<wsdl:output message="p1:ChangeListGetCacheStateResponse"/>
</wsdl:operation>
<wsdl:operation name="Activate">
<wsdl:input message="p1:ChangeListActivateRequest"/>
<wsdl:output message="p1:LogMessageCollection"/>
</wsdl:operation>
<wsdl:operation name="GetState">
<wsdl:input message="p1:ChangeListGetStateRequest"/>
<wsdl:output message="p1:ChangeListGetStateResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ChangeListInBinding" type="p1:ChangeListIn">
<soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Revert">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="GetObjectIdentifiers">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="Create">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="CheckContent">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="GetCacheState">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="Activate">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="GetState">
<soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://sap.com/xi/WebService/soap1.1"/>
<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="ChangeListInService">
<wsdl:port binding="bprf:ChangeListInBinding" name="ChangeListInPort" xmlns:bprf="http://sap.com/xi/BASIS">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://o1ejas11.rz.lsv.de:51100/ChangeListInService/ChangeListInImplBean"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
sblgo commented
Here is a patch for master, which fix the problem in my context. Now I was able to create service client, which works with the provided service.
diff --git a/gowsdl.go b/gowsdl.go
index 6c2ff29..8a35172 100644
--- a/gowsdl.go
+++ b/gowsdl.go
@@ -268,6 +268,7 @@ func (g *GoWSDL) genTypes() ([]byte, error) {
"goString": goString,
"findNameByType": g.findNameByType,
"removePointerFromType": removePointerFromType,
+ "typeKind": g.typeKind,
}
data := new(bytes.Buffer)
@@ -510,7 +511,7 @@ func (g *GoWSDL) findType(message string) string {
for _, schema := range g.wsdl.Types.Schemas {
for _, el := range schema.Elements {
if strings.EqualFold(elRef, el.Name) {
- if el.Type != "" {
+ if el.Type != "" && "simple" != g.typeKind(stripns(el.Type)) {
return stripns(el.Type)
}
return el.Name
@@ -551,6 +552,29 @@ func (g *GoWSDL) findSOAPAction(operation, portType string) string {
return ""
}
+// typeKind gives back simple, complex or element
+func (g *GoWSDL) typeKind(name string) string {
+ name = stripns(name)
+ for _, schema := range g.wsdl.Types.Schemas {
+ for _, simple := range schema.SimpleType {
+ if stripns(simple.Name) == name {
+ return "simple"
+ }
+ }
+ for _, compl := range schema.ComplexTypes {
+ if stripns(compl.Name) == name {
+ return "complex"
+ }
+ }
+ for _, elem := range schema.Elements {
+ if stripns(elem.Name) == name {
+ return "element"
+ }
+ }
+ }
+ return "undefined"
+}
+
func (g *GoWSDL) findServiceAddress(name string) string {
for _, service := range g.wsdl.Service {
for _, port := range service.Ports {
diff --git a/types_tmpl.go b/types_tmpl.go
index d7b7b67..e78c87f 100644
--- a/types_tmpl.go
+++ b/types_tmpl.go
@@ -132,6 +132,11 @@ var typesTmpl = `
{{end}}
}
{{end}}
+ {{else if eq (.Type | typeKind) "simple" }}
+ type {{$name | replaceReservedWords | makePublic}} struct {
+ XMLName xml.Name ` + "`xml:\"{{$targetNamespace}} {{$name}}\"`" + `
+ Value {{toGoType .Type}} ` + "`xml:\",chardata\" json:\"-,\"`" + `
+ }
{{else}}
{{if ne ($name | replaceReservedWords | makePublic) (toGoType .Type | removePointerFromType)}}
type {{$name | replaceReservedWords | makePublic}} {{toGoType .Type | removePointerFromType}}