Problem with WSDL

Seven Stars

Problem with WSDL

Hi developers.

 

I want to create a webservice using WSDL. I have already done it with other projects but now I am having problems with a WSDL that imports data from separated .xsd files.

I have realized that talend can't work with WSDL and xsd. For this reason, I have created a unique WSDL with the data from the .xsd files. I have found a program called altanova SPY that merges the files to create a single WSDL.

 

With this WSDL created I have been able to import it to TOS:

 

1.PNG

The problem is that when I execute my job  I am not being able to receive the information sent at the function CreateVoucher(). I have made a simple job which extracts the information from one parameter sent to the webservice.

3.PNG

2.PNG

As you can see, I am just extracting the value "ArticleNumber" but I am always getting a null. I have been working with WSDL but it's the first time I have this problem. I am using soapUI to send the information, the problem is that TOS is not being able to receive the value from "tns:ArticleNumber" and the others values form tns:voucherData but I can extract the information from "tns:machineHandle".

 

I have tried everything. What I think is that the WSDL is not well structured but I have validated it and talend accepts it.

 

I also insert the .WSDL generated to see if you can see something wrong:

 

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://xml.hugwi.ch/2018/07/spider/voucher" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" targetNamespace="http://xml.hugwi.ch/2018/07/spider/voucher">
	<wsdl:types>
		<xsd:schema xmlns:ns1="http://xml.hugwi.ch/2018/07/spider/voucher/Imports" xmlns:ns2="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/" targetNamespace="http://xml.hugwi.ch/2018/07/spider/voucher/Imports">
			<xsd:import namespace="http://xml.hugwi.ch/2018/07/spider/voucher"/>
			<xsd:import namespace="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
			<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
		</xsd:schema>
		<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" elementFormDefault="qualified">
			<xs:complexType name="MachineInfo">
				<xs:sequence>
					<xs:element name="Id" type="xs:string" nillable="true"/>
					<xs:element name="ProjectId" type="xs:string" nillable="true" minOccurs="0"/>
					<xs:element name="SerialNumber" type="xs:string" nillable="true" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
			<xs:element name="MachineInfo" type="tns:MachineInfo" nillable="true"/>
			<xs:complexType name="DataFault" mixed="false">
				<xs:complexContent>
					<xs:extension base="tns:Fault">
						<xs:sequence/>
					</xs:extension>
				</xs:complexContent>
			</xs:complexType>
			<xs:element name="DataFault" type="tns:DataFault" nillable="true"/>
			<xs:complexType name="Fault">
				<xs:sequence>
					<xs:element name="Code" type="xs:int" minOccurs="0"/>
					<xs:element name="Message" type="xs:string" nillable="true" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
			<xs:element name="Fault" type="tns:Fault" nillable="true"/>
			<xs:complexType name="ProcessingFault" mixed="false">
				<xs:complexContent>
					<xs:extension base="tns:Fault">
						<xs:sequence/>
					</xs:extension>
				</xs:complexContent>
			</xs:complexType>
			<xs:element name="ProcessingFault" type="tns:ProcessingFault" nillable="true"/>
			<xs:complexType name="VoucherData">
				<xs:sequence>
					<xs:element name="Address" type="xs:string" nillable="true" minOccurs="0"/>
					<xs:element name="ArticleNumber" type="xs:int" nillable="true" minOccurs="0"/>
					<xs:element name="Currency" type="xs:string" nillable="true" minOccurs="0"/>
					<xs:element name="Email" type="xs:string" nillable="true" minOccurs="0"/>
					<xs:element name="MessageId" type="xs:int" nillable="true" minOccurs="0"/>
					<xs:element name="PhoneNumber" type="xs:string" nillable="true" minOccurs="0"/>
					<xs:element name="Price" type="xs:decimal" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
			<xs:element name="VoucherData" type="tns:VoucherData" nillable="true"/>
		</xs:schema>
		<xs:schema xmlns:tns="http://xml.hugwi.ch/2018/07/spider/voucher" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:q1="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" xmlns:q2="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher" targetNamespace="http://xml.hugwi.ch/2018/07/spider/voucher" elementFormDefault="qualified">
			<xs:import namespace="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
			<xs:element name="RegisterMachine">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="vendingMachine" type="q1:MachineInfo" nillable="true" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="RegisterMachineResponse">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="RegisterMachineResult" type="xs:int" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="CreateVoucher">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="machineHandle" type="xs:int" minOccurs="0"/>
						<xs:element name="voucherData" type="q2:VoucherData" nillable="true" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="CreateVoucherResponse">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="CreateVoucherResult" type="xs:string" nillable="true" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="UploadPicture">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="machineHandle" type="xs:int" minOccurs="0"/>
						<xs:element name="voucherId" type="xs:string" nillable="true" minOccurs="0"/>
						<xs:element name="backgound" type="xs:int" nillable="true" minOccurs="0"/>
						<xs:element name="image" type="xs:base64Binary" nillable="true" minOccurs="0"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="UploadPictureResponse">
				<xs:complexType>
					<xs:sequence/>
				</xs:complexType>
			</xs:element>
			<xs:element name="Ping">
				<xs:complexType>
					<xs:sequence/>
				</xs:complexType>
			</xs:element>
			<xs:element name="PingResponse">
				<xs:complexType>
					<xs:sequence/>
				</xs:complexType>
			</xs:element>
		</xs:schema>
	</wsdl:types>
	<wsdl:message name="IVoucher_RegisterMachine_InputMessage">
		<wsdl:part name="parameters" element="tns:RegisterMachine"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_RegisterMachine_OutputMessage">
		<wsdl:part name="parameters" element="tns:RegisterMachineResponse"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_RegisterMachine_DataFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q1:DataFault" xmlns:q1="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_RegisterMachine_ProcessingFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q2:ProcessingFault" xmlns:q2="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_CreateVoucher_InputMessage">
		<wsdl:part name="parameters" element="tns:CreateVoucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_CreateVoucher_OutputMessage">
		<wsdl:part name="parameters" element="tns:CreateVoucherResponse"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_CreateVoucher_DataFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q3:DataFault" xmlns:q3="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_CreateVoucher_ProcessingFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q4:ProcessingFault" xmlns:q4="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_UploadPicture_InputMessage">
		<wsdl:part name="parameters" element="tns:UploadPicture"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_UploadPicture_OutputMessage">
		<wsdl:part name="parameters" element="tns:UploadPictureResponse"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_UploadPicture_DataFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q5:DataFault" xmlns:q5="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_UploadPicture_ProcessingFaultFault_FaultMessage">
		<wsdl:part name="detail" element="q6:ProcessingFault" xmlns:q6="http://schemas.datacontract.org/2004/07/Hugwi.SpiderCloud.Voucher"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_Ping_InputMessage">
		<wsdl:part name="parameters" element="tns:Ping"/>
	</wsdl:message>
	<wsdl:message name="IVoucher_Ping_OutputMessage">
		<wsdl:part name="parameters" element="tns:PingResponse"/>
	</wsdl:message>
	<wsdl:portType name="IVoucher">
		<wsdl:operation name="RegisterMachine">
			<wsdl:input message="tns:IVoucher_RegisterMachine_InputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/RegisterMachine"/>
			<wsdl:output message="tns:IVoucher_RegisterMachine_OutputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/RegisterMachineResponse"/>
			<wsdl:fault name="DataFaultFault" message="tns:IVoucher_RegisterMachine_DataFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/RegisterMachineDataFaultFault"/>
			<wsdl:fault name="ProcessingFaultFault" message="tns:IVoucher_RegisterMachine_ProcessingFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/RegisterMachineProcessingFaultFault"/>
		</wsdl:operation>
		<wsdl:operation name="CreateVoucher">
			<wsdl:input message="tns:IVoucher_CreateVoucher_InputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/CreateVoucher"/>
			<wsdl:output message="tns:IVoucher_CreateVoucher_OutputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/CreateVoucherResponse"/>
			<wsdl:fault name="DataFaultFault" message="tns:IVoucher_CreateVoucher_DataFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/CreateVoucherDataFaultFault"/>
			<wsdl:fault name="ProcessingFaultFault" message="tns:IVoucher_CreateVoucher_ProcessingFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/CreateVoucherProcessingFaultFault"/>
		</wsdl:operation>
		<wsdl:operation name="UploadPicture">
			<wsdl:input message="tns:IVoucher_UploadPicture_InputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/UploadPicture"/>
			<wsdl:output message="tns:IVoucher_UploadPicture_OutputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/UploadPictureResponse"/>
			<wsdl:fault name="DataFaultFault" message="tns:IVoucher_UploadPicture_DataFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/UploadPictureDataFaultFault"/>
			<wsdl:fault name="ProcessingFaultFault" message="tns:IVoucher_UploadPicture_ProcessingFaultFault_FaultMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/UploadPictureProcessingFaultFault"/>
		</wsdl:operation>
		<wsdl:operation name="Ping">
			<wsdl:input message="tns:IVoucher_Ping_InputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/Ping"/>
			<wsdl:output message="tns:IVoucher_Ping_OutputMessage" wsaw:Action="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/PingResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="DefaultBinding_IVoucher" type="tns:IVoucher">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="RegisterMachine">
			<soap:operation soapAction="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/RegisterMachine" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="DataFaultFault">
				<soap:fault name="DataFaultFault" use="literal"/>
			</wsdl:fault>
			<wsdl:fault name="ProcessingFaultFault">
				<soap:fault name="ProcessingFaultFault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="CreateVoucher">
			<soap:operation soapAction="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/CreateVoucher" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="DataFaultFault">
				<soap:fault name="DataFaultFault" use="literal"/>
			</wsdl:fault>
			<wsdl:fault name="ProcessingFaultFault">
				<soap:fault name="ProcessingFaultFault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="UploadPicture">
			<soap:operation soapAction="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/UploadPicture" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="DataFaultFault">
				<soap:fault name="DataFaultFault" use="literal"/>
			</wsdl:fault>
			<wsdl:fault name="ProcessingFaultFault">
				<soap:fault name="ProcessingFaultFault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="Ping">
			<soap:operation soapAction="http://xml.hugwi.ch/2018/07/spider/voucher/IVoucher/Ping" style="document"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
</wsdl:definitions>

 

Highlighted
Community Manager

Re: Problem with WSDL

You are actually trying to extract Address not Article Number. To see what is sent in, place a tLogRow after your tESBProviderRequest and before your tXMLMap components. That will show you everything that is sent in.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read