WSDL / LS SL Classes / SUB & FUN blocks

Below is the wsdl file that I would like to use:

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions targetNamespace=“urn:sap-com:document:sap:soap:functions:mc-style” xmlns:http=“http://schemas.xmlsoap.org/wsdl/http/” xmlns:n0=“urn:sap-com:document:sap:rfc:functions” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=“urn:sap-com:document:sap:soap:functions:mc-style” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

wsdl:types

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">

  <xsd:simpleType name="char1">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="1" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char10">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="10" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char128">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="128" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char2">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="2" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char240">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="240" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char255">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="255" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char30">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="30" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char32">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="32" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char40">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="40" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char4096">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="4096" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char60">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="60" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char64">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="64" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="char75">

    <xsd:restriction base="xsd:string">

      <xsd:maxLength value="75" />

    </xsd:restriction>

  </xsd:simpleType>

  <xsd:simpleType name="decimal15.0">

    <xsd:restriction base="xsd:decimal">

      <xsd:totalDigits value="15" />

      <xsd:fractionDigits value="0" />

    </xsd:restriction>

  </xsd:simpleType>

</xsd:schema>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" elementFormDefault="unqualified" attributeFormDefault="qualified" xmlns:n0="urn:sap-com:document:sap:rfc:functions">

  <xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />

  <xsd:complexType name="IctError">

    <xsd:sequence>

      <xsd:element name="ErrorCode" type="xsd:unsignedByte" />

      <xsd:element name="Val1" type="n0:char255" />

      <xsd:element name="Val2" type="n0:char255" />

      <xsd:element name="Val3" type="n0:char255" />

      <xsd:element name="Val4" type="n0:char255" />

    </xsd:sequence>

  </xsd:complexType>

  <xsd:complexType name="IctErrors">

    <xsd:sequence>

      <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:IctError" />

    </xsd:sequence>

  </xsd:complexType>

  <xsd:element name="RequestGuid">

    <xsd:complexType>

      <xsd:sequence />

    </xsd:complexType>

  </xsd:element>

  <xsd:element name="RequestGuidResponse">

    <xsd:complexType>

      <xsd:sequence>

        <xsd:element name="Errors" type="tns:IctErrors" />

        <xsd:element name="Guid" type="n0:char32" />

      </xsd:sequence>

    </xsd:complexType>

  </xsd:element>

  <xsd:element name="RequestSystemGuid">

    <xsd:complexType>

      <xsd:sequence />

    </xsd:complexType>

  </xsd:element>

  <xsd:element name="RequestSystemGuidResponse">

    <xsd:complexType>

      <xsd:sequence>

        <xsd:element name="Errors" type="tns:IctErrors" />

        <xsd:element name="SystemGuid" type="n0:char32" />

      </xsd:sequence>

    </xsd:complexType>

  </xsd:element>

</xsd:schema>

</wsdl:types>

<wsdl:message name=“RequestGuid”>

<wsdl:part name="parameters" element="tns:RequestGuid" />

</wsdl:message>

<wsdl:message name=“RequestGuidResponse”>

<wsdl:part name="parameters" element="tns:RequestGuidResponse" />

</wsdl:message>

<wsdl:message name=“RequestSystemGuid”>

<wsdl:part name="parameters" element="tns:RequestSystemGuid" />

</wsdl:message>

<wsdl:message name=“RequestSystemGuidResponse”>

<wsdl:part name="parameters" element="tns:RequestSystemGuidResponse" />

</wsdl:message>

<wsdl:portType name=“ICT_SERVICE_DESK_API”>

<wsdl:operation name="RequestGuid">

  <wsdl:input message="tns:RequestGuid" />

  <wsdl:output message="tns:RequestGuidResponse" />

</wsdl:operation>

<wsdl:operation name="RequestSystemGuid">

  <wsdl:input message="tns:RequestSystemGuid" />

  <wsdl:output message="tns:RequestSystemGuidResponse" />

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name=“ICT_SERVICE_DESK_APISoapBinding” type=“tns:ICT_SERVICE_DESK_API”>

<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

<wsdl:operation name="RequestGuid">

  <soap:operation soapAction="" />

  <wsdl:input>

    <soap:body use="literal" />

  </wsdl:input>

  <wsdl:output>

    <soap:body use="literal" />

  </wsdl:output>

</wsdl:operation>

<wsdl:operation name="RequestSystemGuid">

  <soap:operation soapAction="" />

  <wsdl:input>

    <soap:body use="literal" />

  </wsdl:input>

  <wsdl:output>

    <soap:body use="literal" />

  </wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name=“ICT_SERVICE_DESK_APIService”>

<wsdl:port name="ICT_SERVICE_DESK_APISoapBinding" binding="tns:ICT_SERVICE_DESK_APISoapBinding">

  <soap:address location="http://sm1sapr3.compname.com:8005/sap/bc/srt/rfc/sap/ICT_SERVICE_DESK_API?sap-client=500" />

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

Below is the LS Script Library that I got out out importing the above WSDL

%INCLUDE “lsxsd.lss”

Class IctErrors_n7 As XSD_ANYTYPE

Public item() As IctError_n7



Sub NEW

End Sub

End Class

Class IctErrors_n7_Holder As INOUT_HOLDER

Public Value As IctErrors_n7

End Class

Class IctError_n7 As XSD_ANYTYPE

Public ErrorCode As Byte

Public Val1 As Char255_n6

Public Val2 As Char255_n6

Public Val3 As Char255_n6

Public Val4 As Char255_n6



Sub NEW

End Sub

End Class

Class Char255_n6 As XSD_ANYTYPE

Public value As String



Sub NEW

End Sub

End Class

Class Char32_n6 As XSD_ANYTYPE

Public value As String



Sub NEW

End Sub

End Class

Class Char32_n6_Holder As INOUT_HOLDER

Public Value As Char32_n6

End Class

Const n7 = “urn:sap-com:document:sap:soap:functions:mc-style”

Const n6 = “urn:sap-com:document:sap:rfc:functions”

Class ICT_SERVICE_DESK_API_n7 As PortTypeBase

Sub NEW

	Call Service.Initialize ("UrnSapComDocumentSapSoapFunctionsMcStyleICT_SERVICE_DESK_APIService", _

	"ICT_SERVICE_DESK_APIService.ICT_SERVICE_DESK_APISoapBinding", "http://sm1sapr3.compname.com:8005/sap/bc/srt/rfc/sap/ICT_SERVICE_DESK_API?sap-client=500", _

	"ICT_SERVICE_DESK_API_n7")

	

End Sub



Sub RequestGuid(Errors As IctErrors_n7_Holder, Guid As Char32_n6_Holder)

	Call Service.Invoke("RequestGuid", Errors, Guid)

End Sub



Sub RequestSystemGuid(Errors As IctErrors_n7_Holder, SystemGuid As Char32_n6_Holder)

	Call Service.Invoke("RequestSystemGuid", Errors, SystemGuid)

End Sub

End Class


Question:

How can I use RequestSystemGuid OR RequestGuid to get the GUID from SAP ? They are only SUB blocks.

What should I do - change the WSDL and Import it again ? If so where and what should I make the change ?

Let me know if you have some pointers ?

Thanks

Subject: I would ask the supplyer of the WDL for sample code to use it.

Subject: Import WSDL - How does it differentiate ?

Hi

Thanks for the reply. I have already done that. I posted my query in the meanwhile. One thing that I am not able to understand is :

When the IMPORT WSDL is invoked - what does it see in the WSDL file to create SUB/FUN blocks ? How does it differentiate ?

Thanks

Subject: Hm. I am fairly new to the area, and can’t answer this, either…

but changing the framework created by the WSDL I did run into errors on save of the script, and it looked quite understandable to me, why - the import is done to have the settings of the server side of the web service convert into my(your) world, and it just can’t be possible that the consumer will change the behave of the source system for something where it would need a compiler over there.

Of course you could try to modifiy the WSDL to allow the change in the Classes, but this would not really change anything either, the service on the other side has to learn that you need something different - or you have to learn to get along with what it is offering.