Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Complex Data Types

This is a very good Thread and gives me hope.

I'm creating a Lotus Notes Web service Provider and would like to know how to map the complex data types in the WSDL to a string in the function.

The following code seems to work (Testing with SOAPUI 3.6.1), although it's only returning the value of the first element of each complex data type eg, 'IDOC' and 'MessageFunction'.

I'm not sure how to pull any of the values from the DocHead and Per classes into a Notes string.
An example would be appreciated or at least show where the code is failing.

Lotus Notes Web Provider:
'Options:
Option Public
%INCLUDE "lsxsd.lss"

'Declarations:
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim newDoc As NotesDocument
Dim s As String

Class DocHead As STRINGARRAY_HOLDER
Public CreationDate() As XSD_STRING
Public CreationTime() As XSD_STRING
Public IDOC() As XSD_STRING
Public SenderPort() As XSD_STRING
Public Sender() As XSD_STRING

Public Sub NEW
End Sub
End Class

Class Per As STRINGARRAY_HOLDER
Public MessageFunction() As XSD_STRING
Public PersonnelNumber() As XSD_STRING
Public Surname() As XSD_STRING
Public Firstname() As XSD_STRING

Public Sub NEW
End Sub
End Class

Class PersonnelUpdate_MasterData
Public Function PersonnelUpdate(DocumentHeader As DocHead, Personnel As Per, returnfault As WS_FAULT) As String
On Error Goto processError

Dim session As New NotesSession
Set db = session.CurrentDatabase
Set newdoc = New NotesDocument ( db )

'Notes document processing........

Exit Function
processError:
Call returnFault.setFault(True)
Call returnFault.setFaultString(Error$)
Messagebox "Logging to console: " & Error$
Exit Function
End Function
End Class


WSDL:

<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions name="PersonnelUpdate_Inb" targetNamespace="http://companyname/masterdata/hr" xmlns:p1="http://companyname/masterdata/hr" 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:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation />
<wsp:UsingPolicy wsdl:required="true" />
<wsp:Policy wsu:Id="OP_PersonnelUpdate_Async" />
<wsdl:types>
<xsd:schema targetNamespace="http://companyname/masterdata/hr" xmlns="http://companyname/masterdata/hr" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="PersonnelUpdate" type="Personnel" />
<xsd:complexType name="Personnel">
<xsd:sequence>
<xsd:element name="DocumentHeader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC" type="xsd:string" />
<xsd:element name="Sender" type="xsd:string" />
<xsd:element name="SenderPort" type="xsd:string" />
<xsd:element name="CreationDate" type="xsd:string" />
<xsd:element name="CreationTime" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Personnel">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageFunction" type="xsd:string" />
<xsd:element name="PersonnelNumber" type="xsd:string" />
<xsd:element name="Surname" type="xsd:string" />
<xsd:element name="Firstname" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="PersonnelUpdate">
<wsdl:documentation />
<wsdl:part name="PersonnelUpdate" element="p1:PersonnelUpdate" />
</wsdl:message>
<wsdl:portType name="PersonnelUpdate_Inb">
<wsdl:documentation />
<wsdl:operation name="PersonnelUpdate_Async">
<wsdl:documentation />
<wsp:Policy>
<wsp:PolicyReference URI="#OP_PersonnelUpdate_Async" />
</wsp:Policy>
<wsdl:input message="p1:PersonnelUpdate" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PersonnelUpdate_InbBinding" type="p1:PersonnelUpdate_Inb">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:operation name="PersonnelUpdate_Async">
<soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:input>
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>


Feedback response number WEBB8FUTXF created by ~Ethan Kiresaburikle on 04/12/2011

Web Services array input (~Dan Umfanavero... 27.Feb.10)
. . Most obvious answer (~Olga Chunivitc... 27.Feb.10)
. . Other option (~Olga Chunivitc... 27.Feb.10)
. . if you have used %INCLUDE "lsxsd.ls... (~Howard Minapul... 28.Feb.10)
. . . . Complex Data Types (~Ethan Kiresabu... 12.Apr.11)
. . . . . . any news on this (~Joseph Dwoluvi... 26.Jun.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS