Using Worklight V6.1 I wanted to try out the new Worklight Application Framework Editor.
My service is a SOAP Webservice and I have the WSDL for the service. I select the Service type of WSDL and add the wsdl file (Copied into the source code window at the bottom of this post) to the dialog.
Then I get my first error saying:
Could not find element definition within schema for :{http://www.DFH0XCMN.DFH0XCP4.Response.com} DFH0XCMNOperationResponse
Despite this error it seems I can continue to unwrap the details view to show the Input variables, but what the main problem is - there is no Output variables detected. This means if I was following the guide:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v610/09_09_Creating_an_application_with_IBM_Worklight_Application_Framework.pdf
When it comes to binding GUI objects to service objects I have no response variables to draw lines between - which means I cannot follow it through to the end.
Please can you advise what is wrong with my WSDL which means that the schema cannot be found - and why Output variables are not detected within the wizard. If we can manually alter the WSDL to make it work - then I would also be interested in what these alterations would be.
The WSDL xml is as follows:
<?xml version="1.0" ?>
<!--
<copyright
notice="cics-lm-source-program"
pids="5655-Y04"
years="2009,2013"
crc="3891213381" >
Licensed Materials - Property of IBM
5655-Y04
(C) Copyright IBM Corp. 2009, 2013 All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
#{[**]copyright.years=2009, 2013}
</copyright>
-->
<definitions targetNamespace="http://www.DFH0XCMN.DFH0XCP4.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:reqns="http://www.DFH0XCMN.DFH0XCP4.Request.com" xmlns:resns="http://www.DFH0XCMN.DFH0XCP4.Response.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.DFH0XCMN.DFH0XCP4.com">
<types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.DFH0XCMN.DFH0XCP4.Request.com" xmlns:tns="http://www.DFH0XCMN.DFH0XCP4.Request.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType abstract="false" block="#all" final="#all" mixed="false" name="ProgramInterface">
<xsd:annotation>
<xsd:documentation source="http://www.ibm.com/software/htp/cics/annotations">This schema was generated for use with CICS.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ca_request_id" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:40 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_return_code" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:40 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="99"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_response_message" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:40 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="79"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_inquire_single" nillable="false">
<xsd:complexType mixed="false">
<xsd:sequence>
<xsd:element name="ca_item_ref_req" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:41 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="filler1" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:41 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="filler2" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:41 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_single_item" nillable="false">
<xsd:complexType mixed="false">
<xsd:sequence>
<xsd:element name="ca_sngl_item_ref" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:42 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_description" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:43 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="40"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_department" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:45 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_cost" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:46 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="in_sngl_stock" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:48 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="on_sngl_order" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:50 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DFH0XCMNOperation" nillable="false" type="tns:ProgramInterface"/>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.DFH0XCMN.DFH0XCP4.Response.com" xmlns:tns="http://www.DFH0XCMN.DFH0XCP4.Response.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType abstract="false" block="#all" final="#all" mixed="false" name="ProgramInterface">
<xsd:annotation>
<xsd:documentation source="http://www.ibm.com/software/htp/cics/annotations">This schema was generated for use with CICS.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ca_request_id" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_return_code" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="99"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_response_message" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="79"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_inquire_single" nillable="false">
<xsd:complexType mixed="false">
<xsd:sequence>
<xsd:element name="ca_item_ref_req" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="filler1" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="filler2" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:58 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_single_item" nillable="false">
<xsd:complexType mixed="false">
<xsd:sequence>
<xsd:element name="ca_sngl_item_ref" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:59 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_description" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:59 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="40"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_department" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:27:59 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ca_sngl_cost" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:28:00 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6"/>
<xsd:whiteSpace value="preserve"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="in_sngl_stock" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:28:00 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="9999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="on_sngl_order" nillable="false">
<xsd:simpleType>
<xsd:annotation>
<xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">#Wed Sep 14 08:28:01 BST 2005
com.ibm.cics.wsdl.properties.synchronized=false
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:unsignedShort">
<xsd:maxInclusive value="999"/>
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DFH0XCMNOperationResponse" nillable="false" type="tns:ProgramInterface"/>
</xsd:schema>
</types>
<message name="DFH0XCMNOperationResponse">
<part element="resns:DFH0XCMNOperationResponse" name="ResponsePart"/>
</message>
<message name="DFH0XCMNOperationRequest">
<part element="reqns:DFH0XCMNOperation" name="RequestPart"/>
</message>
<portType name="DFH0XCMNPort">
<operation name="DFH0XCMNOperation">
<input message="tns:DFH0XCMNOperationRequest" name="DFH0XCMNOperationRequest"/>
<output message="tns:DFH0XCMNOperationResponse" name="DFH0XCMNOperationResponse"/>
</operation>
</portType>
<binding name="DFH0XCMNHTTPSoapBinding" type="tns:DFH0XCMNPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="DFH0XCMNOperation">
<soap:operation soapAction="" style="document"/>
<input name="DFH0XCMNOperationRequest">
<soap:body parts="RequestPart" use="literal"/>
</input>
<output name="DFH0XCMNOperationResponse">
<soap:body parts="ResponsePart" use="literal"/>
</output>
</operation>
</binding>
<service name="DFH0XCMNService">
<port binding="tns:DFH0XCMNHTTPSoapBinding" name="DFH0XCMNPort">
<soap:address location="http://my-server:my-port/exampleApp/inquireSingle"/>
</port>
</service>
</definitions>
Is seems that WL v6.1 indeed has a problem with multiple embedded schemas and showing only one the input of a procedure. The output of the procedure is not being shown because it is defined by a second embedded schema.
This problem was addressed and tested using your WSDL with a newer version of WL (not yet released). You will therefore get it solved in the next update of your Worklight Studio.
If you are an IBM business partner or customer you can open a PMR and request an intermittent iFix.
Related
I am trying to figure out how to craft a SOAP request from just reading the WSDL.
Everything points to use a library or client, which is understandable, but I do want to know how to read a WSDL and craft a response myself if I wanted to do it in cURL or Postman.
(I understand this is very timeconsuming to write out the XML and it's easier to use something like SoapUI, but I'd like to figure out how to build these SOAP requests generally).
I am using the NOAA as an example. http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
<?xml version="1.0"?>
<!-- **********************************************************************
ndfdXML.wsdl
John L. Schattel MDL 4 July 2007
Aniesha L. Alford
Red Hat Linux Apache Server
SOURCE CODE CONTROL INFORMATION
Name:
%PM%
%PID%
Status:
%PS%
History:
%PL%
Change Document History:
%PIRC%
************************************************************************* -->
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl"
xmlns:typens="https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
<types>
<xsd:schema targetNamespace="https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
<xsd:simpleType name="sectorType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='conus'/>
<xsd:enumeration value='nhemi'/>
<xsd:enumeration value='alaska'/>
<xsd:enumeration value='guam'/>
<xsd:enumeration value='hawaii'/>
<xsd:enumeration value='puertori'/>
<xsd:enumeration value='npacocn'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="unitType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='e'/>
<xsd:enumeration value='m'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="formatType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='24 hourly'/>
<xsd:enumeration value='12 hourly'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="productType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='time-series'/>
<xsd:enumeration value='glance'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="latLonPairType">
<xsd:restriction base='xsd:string'>
<xsd:pattern value="[\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="listLatLonType">
<xsd:restriction base='xsd:string'>
<xsd:pattern value="[\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+( [\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+)*" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="zipCodeType">
<xsd:restriction base='xsd:string'>
<xsd:pattern value="\d{5}(\-\d{4})?" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="zipCodeListType">
<xsd:restriction base='xsd:string'>
<xsd:pattern value="\d{5}(\-\d{4})?( \d{5}(\-\d{4})?)*" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="featureTypeType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='Forecast_Gml2Point'/>
<xsd:enumeration value='Forecast_Gml2AllWx'/>
<xsd:enumeration value='Forecast_GmlsfPoint'/>
<xsd:enumeration value='Forecast_GmlObs'/>
<xsd:enumeration value='NdfdMultiPointCoverage'/>
<xsd:enumeration value='Ndfd_KmlPoint'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="compTypeType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value='IsEqual'/>
<xsd:enumeration value='Between'/>
<xsd:enumeration value='GreaterThan'/>
<xsd:enumeration value='GreaterThanEqualTo'/>
<xsd:enumeration value='LessThan'/>
<xsd:enumeration value='LessThanEqualTo'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="listCityNamesType">
<xsd:restriction base='xsd:string'>
<xsd:pattern value="[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z](\|[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z])*" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="displayLevelType">
<xsd:restriction base='xsd:integer'>
<xsd:enumeration value='1'/>
<xsd:enumeration value='2'/>
<xsd:enumeration value='3'/>
<xsd:enumeration value='4'/>
<xsd:enumeration value='12'/>
<xsd:enumeration value='34'/>
<xsd:enumeration value='1234'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="weatherParametersType">
<xsd:all>
<xsd:element name="maxt" type="xsd:boolean"/>
<xsd:element name="mint" type="xsd:boolean"/>
<xsd:element name="temp" type="xsd:boolean"/>
<xsd:element name="dew" type="xsd:boolean"/>
<xsd:element name="pop12" type="xsd:boolean"/>
<xsd:element name="qpf"
type="xsd:boolean"/>
.
.
.
</definitions>
This was very long so I shortened it.
Primarily I want to know:
How to get the endpoints for each operation
What do I put into the body?
What are the QNames and namespace to use in the body's message?
Every resource keeps stating to just use SoapUI or generate with a library and miss out on learning how to read the WSDL. I'm looking for the latter. Please.
How can I build a correct xmldp query to the SSRS webservice in reporting services of visual studio?
I suspect the structure sent to web service is incorrect or types in web service are not synchronized -- so I suspect the web service is getting 0 or null from the reporting service.
this is the schema:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="TATEST" targetNamespace="http://namespace.softwareag.com/entirex/xml/mapping" xmlns:tns="http://namespace.softwareag.com/entirex/xml/mapping" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sn0="somenamespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
- <wsdl:types>
- <xsd:schema targetNamespace="somenamespace">
- <xsd:element name="TATESTResponse">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="_PAR1">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
- <xsd:element name="_PAR2">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="TATEST">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="_PAR1">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
- <xsd:element name="_PAR2">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
……
and the is xmldp query from the ssrs
<Query>
<SoapAction>TATEST</SoapAction>
<Method Name="TATEST" Namespace="somenamespace">
<Parameters>
<Parameter Name="_PAR1">
<DefaultValue>2</DefaultValue>
</Parameter>
<Parameter Name="_PAR2">
<DefaultValue>1</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespace="true">*</ElementPath>
</Query>
First Of All sorry about my bad English :D and Thanks for your help...
I have to write a Delphi web service with xsd schema and the wsdl similar to wsdl at the bottom. Is it possible with Delphi. I have to write a service according to the existing web service client, the wsdl at the bottom belongs to an php web service with nusoap library.
I seem to hear you write this web service with php nusoap, but as you know that Delphi web service can be standalone exe and I need it's ability for our product.
I can write this web service with php no problem, but if it is possible, I want to write this web service with Delphi as a standalone.
I could write this web service with Delphi as standalone.The problem is that WSDL. My service's WSDL have to similar with the WSDL at the bottom. Can I do my service's wsdl similar to wsdl at the bottom? If it is possible,how can I do?
I'm using Delphi XE4.
Thanks again.
<?xml version="1.0" encoding="windows-1252"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:wnposwsdl2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:wnposwsdl2">
<types>
<xsd:schema targetNamespace="urn:wnposwsdl2">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
<xsd:complexType name="wnposreply">
<xsd:all>
<xsd:element name="rtype" type="xsd:string"/>
<xsd:element name="rid" type="xsd:string"/>
<xsd:element name="rval1" type="xsd:string"/>
<xsd:element name="rval2" type="xsd:string"/>
<xsd:element name="rmessage1" type="xsd:string"/>
<xsd:element name="rmessage2" type="xsd:string"/>
<xsd:element name="rmessage3" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="posregister">
<xsd:all>
<xsd:element name="serialno" type="xsd:string"/>
<xsd:element name="posid" type="xsd:string"/>
<xsd:element name="siteid" type="xsd:string"/>
<xsd:element name="sitename" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customercard">
<xsd:all>
<xsd:element name="cctype" type="xsd:string"/>
<xsd:element name="customercode" type="xsd:string"/>
<xsd:element name="ccnumber" type="xsd:string"/>
<xsd:element name="validfrom" type="xsd:string"/>
<xsd:element name="validto" type="xsd:string"/>
<xsd:element name="pin" type="xsd:string"/>
<xsd:element name="ccstatus" type="xsd:string"/>
<xsd:element name="total_d" type="xsd:float"/>
<xsd:element name="total_c" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customer">
<xsd:all>
<xsd:element name="code" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="address1" type="xsd:string"/>
<xsd:element name="address2" type="xsd:string"/>
<xsd:element name="county" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="zip" type="xsd:string"/>
<xsd:element name="tel" type="xsd:string"/>
<xsd:element name="gsm" type="xsd:string"/>
<xsd:element name="email" type="xsd:string"/>
<xsd:element name="web" type="xsd:string"/>
<xsd:element name="listprice" type="xsd:string"/>
<xsd:element name="defdiscount" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="payment">
<xsd:all>
<xsd:element name="id" type="xsd:int"/>
<xsd:element name="val" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ccard">
<xsd:all>
<xsd:element name="customercard" type="tns:customercard"/>
<xsd:element name="customer" type="tns:customer"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ccardarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ccard[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="customertrans">
<xsd:all>
<xsd:element name="ccnumber" type="xsd:string"/>
<xsd:element name="posserialno" type="xsd:string"/>
<xsd:element name="ftransid" type="xsd:string"/>
<xsd:element name="ftype" type="xsd:string"/>
<xsd:element name="ftm" type="xsd:string"/>
<xsd:element name="fno" type="xsd:string"/>
<xsd:element name="excode" type="xsd:string"/>
<xsd:element name="genexp" type="xsd:string"/>
<xsd:element name="sign" type="xsd:string"/>
<xsd:element name="amount" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customertransarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:customertrans[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="payments">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:payment[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="itemtrans">
<xsd:all>
<xsd:element name="ttype" type="xsd:string"/>
<xsd:element name="subtype" type="xsd:string"/>
<xsd:element name="code" type="xsd:string"/>
<xsd:element name="quantity" type="xsd:float"/>
<xsd:element name="bprice" type="xsd:float"/>
<xsd:element name="itemgroupcode" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="itemtransarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:itemtrans[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="receiptheader">
<xsd:all>
<xsd:element name="fno" type="xsd:string"/>
<xsd:element name="ftm" type="xsd:string"/>
<xsd:element name="siteid" type="xsd:string"/>
<xsd:element name="customercard" type="tns:customercard"/>
<xsd:element name="payments" type="tns:payments"/>
<xsd:element name="nettotal" type="xsd:float"/>
<xsd:element name="calculatedtotalpoint" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="receipt">
<xsd:all>
<xsd:element name="ftransid" type="xsd:int"/>
<xsd:element name="serialno" type="xsd:string"/>
<xsd:element name="ctranstype" type="xsd:string"/>
<xsd:element name="header" type="tns:receiptheader"/>
<xsd:element name="items" type="tns:itemtransarray"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="receiptarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:receipt[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="spendingcheck">
<xsd:all>
<xsd:element name="ctrans" type="tns:customertrans"/>
<xsd:element name="basket" type="tns:receipt"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="register_posRequest">
<part name="posrecord" type="tns:posregister"/></message>
<message name="register_posResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="query_cardRequest">
<part name="customercard" type="tns:customercard"/></message>
<message name="query_cardResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="register_customerRequest">
<part name="ccardarray" type="tns:ccardarray"/></message>
<message name="register_customerResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="check_receiptRequest">
<part name="receipt" type="tns:receiptarray"/></message>
<message name="check_receiptResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="add_ctransRequest">
<part name="customertrans" type="tns:customertrans"/></message>
<message name="add_ctransResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="update_ctransRequest">
<part name="customertrans" type="tns:customertrans"/></message>
<message name="update_ctransResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="add_spendingRequest">
<part name="spendingcheck" type="tns:spendingcheck"/></message>
<message name="add_spendingResponse">
<part name="return" type="tns:wnposreply"/></message>
<portType name="wnposwsdl2PortType">
<operation name="register_pos">
<documentation>Register pos...</documentation>
<input message="tns:register_posRequest"/>
<output message="tns:register_posResponse"/>
</operation>
<operation name="query_card">
<documentation>Query customer card...</documentation>
<input message="tns:query_cardRequest"/>
<output message="tns:query_cardResponse"/>
</operation>
<operation name="register_customer">
<documentation>Registers customer(s)/card(s)/giftcard(s) to be used by the server, approval required by the db manager....</documentation>
<input message="tns:register_customerRequest"/>
<output message="tns:register_customerResponse"/>
</operation>
<operation name="check_receipt">
<documentation>Check receipt for gift or point collection..</documentation>
<input message="tns:check_receiptRequest"/>
<output message="tns:check_receiptResponse"/>
</operation>
<operation name="add_ctrans">
<documentation>Add trans..</documentation>
<input message="tns:add_ctransRequest"/>
<output message="tns:add_ctransResponse"/>
</operation>
<operation name="update_ctrans">
<documentation>Update added trans change stage...</documentation>
<input message="tns:update_ctransRequest"/>
<output message="tns:update_ctransResponse"/>
</operation>
<operation name="add_spending">
<documentation>Add spending ..</documentation>
<input message="tns:add_spendingRequest"/>
<output message="tns:add_spendingResponse"/>
</operation>
</portType>
<binding name="wnposwsdl2Binding" type="tns:wnposwsdl2PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="register_pos">
<soap:operation soapAction="urn:wnposwsdl2#register_pos" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="query_card">
<soap:operation soapAction="urn:wnposwsdl2#query_card" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="register_customer">
<soap:operation soapAction="urn:wnposwsdl2#register_customer" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="check_receipt">
<soap:operation soapAction="urn:wnposwsdl2#check_receipt" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="add_ctrans">
<soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="update_ctrans">
<soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="add_spending">
<soap:operation soapAction="urn:wnposwsdl2#spendingcheck" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
</binding>
<service name="wnposwsdl2">
<port name="wnposwsdl2Port" binding="tns:wnposwsdl2Binding">
<soap:address location="http://ksistemdomain.com:88/web.biz/server/wnposserver.php"/>
</port>
</service>
</definitions>
Sure, you can use Delphi to write a SOAP Service out of your wsdl file.
then you can use the result dll to call your service.
you can check out this link for more info.
I'm trying to load the following XML Schema with QXmlSchema, however QXmlSchema::load(const QUrl & source) always returns false. Is there any way to have Qt provide some about what actually went wrong? The schema checks out fine in several validators as far as I can tell (the w3c one provided mysterious output that looked like it passed).
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="message">
<xsd:complexType>
<xsd:choice>
<xsd:element name="login-reply">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Accepted" />
<xsd:enumeration value="Rejected" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="login-request" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="username" type="xsd:string" nillable="false"/>
<xsd:element name="password" type="xsd:string" nillable="false"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="logout-request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="username" type="xsd:string" nillable="false"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="logout-reply">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Accepted" />
<xsd:enumeration value="Rejected" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="tasklist-request" />
<xsd:element name="tasklist-reply">
<xsd:complexType>
<xsd:sequence minOccurs="1">
<xsd:element name="package" minOccurs="1" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="taskgroup" minOccurs="1" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="xsd:integer" minOccurs="1" />
<xsd:element name="task" type="xsd:string" minOccurs="1" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:integer" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:integer" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="starttask-request">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="task-id" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="starttask-reply">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Accepted" />
<xsd:enumeration value="Rejected" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
bool QXmlSchema::load() itself returns only boolean result that is not really useful for debugging. But there this is more better way to get more appropriate error message.
You could use method void QXmlSchema::setMessageHandler(QAbstractMessageHandler *handler).
Here is example from my project.
First subclassing QAbstractMessageHandler
class MessageHandler : public QAbstractMessageHandler
{
public:
MessageHandler()
: QAbstractMessageHandler(),
m_messageType(QtMsgType()),
m_description(),
m_sourceLocation(QSourceLocation())
{}
QString statusMessage() const
{
return m_description;
}
qint64 line() const
{
return m_sourceLocation.line();
}
qint64 column() const
{
return m_sourceLocation.column();
}
protected:
virtual void handleMessage(QtMsgType type,
const QString &description,
const QUrl &identifier,
const QSourceLocation &sourceLocation) Q_DECL_OVERRIDE
{
Q_UNUSED(type);
Q_UNUSED(identifier);
m_messageType = type;
m_description = description;
m_sourceLocation = sourceLocation;
}
private:
QtMsgType m_messageType;
QString m_description;
QSourceLocation m_sourceLocation;
};
Then before loading set message handler.
QFile file("myschema.xsd");
file.open(QIODevice::ReadOnly);
MessageHandler messageHandler;
QXmlSchema sch;
sch.setMessageHandler(&messageHandler);
if (sch.load(&file, QUrl::fromLocalFile(file.fileName()))==false)
{
QString error = messageHandler.statusMessage();
qint64 line = messageHandler.line();
qint64 column = messageHandler.column();
/*Do what need if error*/
}
bool QXmlSchema::load() returns false on multiple conditions according to this source documentation
So the answer to my question: No, there is no way to get an error message from Qts parser per Qt 4.7.3 and there is no way via Qts APIs to differentiate between an I/O error and a schema error, since load returns false on both.
I have the following xsd
<xsd:complexType name="myID">
<xsd:choice>
<xsd:element name="testID" type="priv:testID"/>
<xsd:sequence>
<xsd:element name="newID" type="priv:newID"/>
<xsd:element name="testID" type="priv:testID" minOccurs="0"/>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
Everything is under priv namespace. The problem is that it looks like that myID is a union. It might be a testID or a sequence with newID and testID. When I compile it with wsdl2h from gsoap I am taking the message:
Note: <xs:choice> with embedded
<xs:sequence> or <xs:group>
prevents the use of a union
Is the above XSD correct?
In general the XML type myID can be declared as you described. The conflict exist probably in connection with your definition of the types priv:testID and priv:testID which definition you not included. For example the schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://www.ok-soft-gmbh.com/xml/xsd/1.0/XMLSchema.xsd"
elementFormDefault="qualified"
xmlns:priv="http://www.ok-soft-gmbh.com/xml/xsd/1.0/XMLSchema.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<xsd:simpleType name="testID">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="newID">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:complexType name="myID">
<xsd:choice>
<xsd:element name="testID" type="priv:testID"/>
<xsd:sequence>
<xsd:element name="newID" type="priv:newID"/>
<xsd:element name="testID" type="priv:testID" minOccurs="0"/>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
<xsd:element name="root" type="priv:myID"/>
</xsd:schema>
will be correct. So if an error exist, it is not in the part which you posted.