minOccurs maxOccurs don't work with dita? - dita

I had modify the minOccurs = 1 with a element in xsd, and didn't add the element in ditamap. But the dita work well. No warning, No error.
The example is the bookmap which is form samples of dita-ot-3.3.
xsd:
<xs:group name="bookmeta.content">
<xs:sequence>
<xs:group ref="linktext" minOccurs="1"/>
<xs:group ref="searchtitle" minOccurs="1"/>
<xs:group ref="shortdesc" minOccurs="1"/>
<xs:group ref="author" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="source" minOccurs="1"/>
<xs:group ref="publisherinformation" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="critdates" minOccurs="1"/>
<xs:group ref="permissions" minOccurs="1"/>
<xs:group ref="metadata" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="audience" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="category" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="keywords" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="prodinfo" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="othermeta" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="resourceid" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="ux-window" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="bookid" minOccurs="1"/>
<xs:group ref="bookchangehistory" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="bookrights" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="data" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
ditamap:
<bookmeta>
<author>Howe Tuduit</author>
<bookid>
<isbn>071271271X</isbn>
<booknumber>SG99-9999-00</booknumber>
<maintainer>
<organization>Retro Tools</organization>
<person/>
</maintainer>
</bookid>
<bookrights>
<copyrfirst>
<year>2004</year>
</copyrfirst>
<copyrlast>
<year>2007</year>
</copyrlast>
<bookowner>
<organization>Retro Tools, Inc.</organization>
</bookowner>
</bookrights>
</bookmeta>
I think the minOccurs should be work. Output will be fail.

You must have modified another XSD file that is different from DITA-OT references.
If I modify dita-ot-3.3\plugins\org.oasis-open.dita.v1_3\schema\bookmap\xsd\bookmapMod.xsd for testing, DITA-OT build fails with following error. This is expected result.
[bookmapMod.xsd]
<xs:group name="bookmeta.content">
<xs:sequence>
<xs:group ref="linktext" minOccurs="1"/>
<xs:group ref="searchtitle" minOccurs="1"/>
<xs:group ref="shortdesc" minOccurs="1"/>
<xs:group ref="author" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="source" minOccurs="1"/>
<xs:group ref="publisherinformation" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="critdates" minOccurs="1"/>
<xs:group ref="permissions" minOccurs="1"/>
<xs:group ref="metadata" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="audience" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="category" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="keywords" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="prodinfo" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="othermeta" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="resourceid" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="ux-window" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="bookid" minOccurs="1"/>
<xs:group ref="bookchangehistory" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="bookrights" minOccurs="1" maxOccurs="unbounded"/>
<xs:group ref="data" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
[Bookmap]
<?xml version="1.0" encoding="UTF-8"?>
<bookmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:bookmap.xsd">
<booktitle>
<mainbooktitle>BookMapTest</mainbooktitle>
</booktitle>
<bookmeta>
<author>Howe Tuduit</author>
<bookid>
<isbn>071271271X</isbn>
<booknumber>SG99-9999-00</booknumber>
<maintainer>
<organization>Retro Tools</organization>
<person/>
</maintainer>
</bookid>
<bookrights>
<copyrfirst>
<year>2004</year>
</copyrfirst>
<copyrlast>
<year>2007</year>
</copyrlast>
<bookowner>
<organization>Retro Tools, Inc.</organization>
</bookowner>
</bookrights>
</bookmeta>
<chapter navtitle="Chapter"/>
</bookmap>
[Error Log]
BUILD FAILED
D:\DITA-OT\dita-ot-3.3\plugins\org.dita.base\build.xml:31: The
following error occurred while executing this line:
D:\DITA-OT\dita-ot-3.3\plugins\org.dita.base\build_preprocess.xml:62:
Failed to run pipeline: [DOTJ012F][FATAL] Failed to parse the input
file
'file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190402-xsd/Bookmaptest.ditamap'.:
file:/C:/Users/toshi/OneDrive/Documents/test/dita/20190402-xsd/Bookmaptest.ditamap
Line -1:Invalid content was found starting with element 'author'. One
of '{linktext}' is expected.
Total time: 2 seconds
Please note that modifying directly OASIS XSD file is not recommended way. This is only done for testing.
[The answer to HTML Help output]
I modify
dita-ot-3.3\plugins\org.oasis-open.dita.v1_3\schema\bookmap\xsd\bookmapMod.xsd like yours then compile with: dita -f htmlhelp -i
D:\dita-ot-3.3\docsrc\samples\taskbook.ditamap -o F:\Study\Dita\output
-v. Of course, I modify the taskbook references with bookmap.xsd not DTD. The output still fine. No error. –
This is because HTML Help output adopts "preprocess2" introduced below:
Map-first preprocessing
If you modify following line from "preprocess2" to "preprocess" in dita-ot-3.3\plugins\org.dita.htmlhelp\build_dita2htmlhelp.xml, you will surely get the validation error.
<target name="dita2htmlhelp" unless="noMap" depends="dita2htmlhelp.init,
build-init, use-init.envhhcdir, use-init.hhcdir, preprocess2,
htmlhelp.topics, htmlhelp.copy-image, copy-css">
<antcall target="dita.map.htmlhelp"/>
</target>
preprocess.init:
[echo] *****************************************************************
[echo] * input = D:\DITA-OT\dita-ot-3.3\docsrc\samples\taskbook.ditamap
[echo] *****************************************************************
ditaval-merge:
gen-list: [gen-list] Using Xerces grammar pool for DTD and schema
caching. [gen-list] Processing
file:/D:/DITA-OT/dita-ot-3.3/docsrc/samples/taskbook.ditamap Error:
Failed to run pipeline: [DOTJ012F][FATAL] Failed to parse the input
file 'file:/D:/DITA-OT/dita-ot-3.3/docsrc/samples/taskbook.ditamap'.:
file:/D:/DITA-OT/dita-ot-3.3/docsrc/samples/taskbook.ditamap Line
14:cvc-complex-type.2.4.a: Invalid content was found starting with
element 'author'. One of '{linktext}' is expected.

Related

Unable to read the stream produced by the pipeline when generate CSV without header with send pipeline BizTalk

I have to generate a CSV file without the header line.
So I created the following xsd :
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://Person.Schemas.Person_Export" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Person.Schemas.Person_Export" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standard="Flat File" root_reference="Person_Export" default_pad_char="" pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false"/>
<schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="Person_Export">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" child_order="postfix"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="Person">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_delimiter_type="char" child_delimiter="," child_order="infix"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0"/>
</xs:appinfo>
</xs:annotation>
<xs:element minOccurs="1" name="over_start_date" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" datetime_format="dd-MM-yyyy" sequence_number="1"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="over_end_date" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="2" justification="left" datetime_format="dd-MM-yyyy"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="emp_name" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="3" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="emp_lastname" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="4" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="emp_firstname" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="5" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="EMP_UDF_DATA1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="6" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="EMP_UDF_DATA2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="7" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="EMP_UDF_DATA3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="8" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="emp_birth_date" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="9" justification="left" datetime_format="dd-MM-yyyy"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="EMP_HIRE_DATE" type="xs:date">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="10" justification="left" datetime_format="dd-MM-yyyy"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" default="1" name="WBU_PASSWORD" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="11" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="WBU_EMAIL" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="12" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="WBU_NAME" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="13" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" default="NL OFFICERS" name="WBG_ID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="14" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" default="Dutch" name="WBLL_ID" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="15" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="USER_STATUS" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="16" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" default="N" name="WBU_CAN_PROXY" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="17" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" default="999999" name="EMP_SIN" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="18" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="1" name="EMP_VAL20" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="19" justification="left"/>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The file is generated correctly :
<ns0:Person_Export xmlns:ns0="http://Person.Schemas.Person_Export">
<Person>
<over_start_date>26-11-2022</over_start_date>
<over_end_date/>
<emp_name>000123</emp_name>
<emp_lastname>test</emp_lastname>
<emp_firstname>test</emp_firstname>
<EMP_UDF_DATA1/>
<EMP_UDF_DATA2>+312345678</EMP_UDF_DATA2>
<EMP_UDF_DATA3>012345678</EMP_UDF_DATA3>
<emp_birth_date>29-04-1976</emp_birth_date>
<EMP_HIRE_DATE>03-02-2000</EMP_HIRE_DATE>
<WBU_PASSWORD>1</WBU_PASSWORD>
<WBU_EMAIL>test#hotmail.com</WBU_EMAIL>
<WBU_NAME>000123</WBU_NAME>
<WBG_ID>NL OFFICERS</WBG_ID>
<WBLL_ID>Dutch</WBLL_ID>
<USER_STATUS/>
<WBU_CAN_PROXY>N</WBU_CAN_PROXY>
<EMP_SIN>999999</EMP_SIN>
<EMP_VAL20>M</EMP_VAL20>
</Person>
</ns0:Person_Export>
But the pipeline return this error :
Unable to read the stream produced by the pipeline.
Details: Value cannot be null.
Parameter name: format
The fields over_end_date, EMP_UDF_DATA1 and USER_STATUS must be blank in the output so in the mapping I setted the Value property to empty.
I tested this solution but doesn't resolved my issue.
Ok I managed to find a solution by changing the date type to string type.
The fact that some date in my output must be empty was the reason for this error.

how to write a wfs- transaction insert with geoserver/postgrsql

I have a database and a server tomcat / geoserver and I try to exchange data from openlayers.
So i am trying to write a wfs transaction without success. I do not know what's wrong, geometry?
I tried to copy the example provided in the demonstration without further success:
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://ip_address:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"><ows:Exception exceptionCode="InvalidParameterValue"><ows:ExceptionText>Error performing insert: Error inserting features</ows:ExceptionText></ows:Exception></ows:ExceptionReport>
my try :
<wfs:Transaction service="WFS" version="1.1.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:cite="http://www.opengeospatial.net/cite"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd http://www.opengeospatial.net/cite http://ip_address:8080/geoserver/wfs/DescribeFeatureType?typename=cite:administration">
<wfs:Insert>
<cite:administration>
<cite:geom>
<gml:MultiPolygon xmlns="http://www.opengis.net/gml" srsName="EPSG:2154"><gml:polygonMember><gml:Polygon srsName="EPSG:3857"><gml:exterior><gml:LinearRing srsName="EPSG:2154"><gml:posList srsDimension="2">1033195.5041126036 6284576.928642391 1033176.0281535687 6284534.392003635 1033215.4422350351 6284544.237956143 1033195.5041126036 6284576.928642391</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:polygonMember></gml:MultiPolygon>
</cite:geom>
</cite:administration>
</wfs:Insert>
</wfs:Transaction>
the describeFeatuyreType
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:wfs="http://www.opengis.net/wfs/2.0" elementFormDefault="qualified" targetNamespace="http://www.opengeospatial.net/cite">
<xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="ip_address:8080/geoserver/schemas/gml/3.2.1/gml.xsd"/>
<xsd:complexType name="administrationType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="surface" nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="annee_prescription" nillable="true" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" name="ro" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="numope" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="typope" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geom" nillable="true" type="gml:MultiSurfacePropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="typemp" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="nomope" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="numoa" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="numprescr" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="tranche" nillable="true" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" name="code_tranche" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="surfaceC_ha" nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="ratioC_ha" nillable="true" type="xsd:decimal"/>
<xsd:element maxOccurs="1" minOccurs="0" name="amenageur" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="opérateur" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="prescripteur" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="statut_contractuel" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="statut_operationnel" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="administration" substitutionGroup="gml:AbstractFeature" type="cite:administrationType"/>
</xsd:schema>
The srs is EPSG:2154
the openlayers transaction that does not work either :
var wfst = new ol.format.WFS({
featureNS: "http://www.opengeospatial.net/cite",
featureType: "cite:administration"
});
var options = {
srsName: "EPSG:2154",
featureNS: "http://www.opengeospatial.net/cite",
featurePrefix:'cite',
featureType: "cite:administration",
gmlOptions:{featureNS: "http://www.opengeospatial.net/cite",featureType: "cite:administration",srsName: "EPSG:2154"}
};
var node = wfst.writeTransaction(features2154,null,null,options);
console.log('node',node);
var s = new XMLSerializer();
var str = s.serializeToString(node);
result str =
<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Insert><cite:administration xmlns:cite="http://www.opengeospatial.net/cite"><cite:geometry><MultiPolygon xmlns="http://www.opengis.net/gml" srsName="EPSG:2154"><polygonMember><Polygon srsName="EPSG:2154"><exterior><LinearRing srsName="EPSG:2154"><posList srsDimension="2">1033187.44577774 6284581.696198352 1033171.7481650712 6284533.302464095 1033221.5049866531 6284544.554293833 1033187.44577774 6284581.696198352</posList></LinearRing></exterior></Polygon></polygonMember></MultiPolygon></cite:geometry><cite:collectedProperties>[object Object]</cite:collectedProperties></cite:administration></Insert></Transaction>
my response :
it lacked the necessary attributes for transaction (not null values in POSTGIS exception)
<wfs:Transaction service="WFS" version="1.1.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:cite="http://www.opengeospatial.net/cite"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd http://www.opengeospatial.net/cite http://IP:8080/geoserver/wfs/DescribeFeatureType?typename=cite:prescription">
<wfs:Insert>
<cite:prescription>
<cite:geom>
<gml:MultiPolygon xmlns="http://www.opengis.net/gml" srsName="EPSG:2154"><gml:polygonMember><gml:Polygon srsName="EPSG:2154"><gml:exterior><gml:LinearRing srsName="EPSG:2154"><gml:posList srsDimension="2">1033195.5041126036 6284576.928642391 1033176.0281535687 6284534.392003635 1033215.4422350351 6284544.237956143 1033195.5041126036 6284576.928642391</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:polygonMember></gml:MultiPolygon>
</cite:geom>
<cite:numope>D000000</cite:numope>
<cite:numoa>11111111</cite:numoa>
<cite:annee_prescription>2020</cite:annee_prescription>
<cite:ro>albert</cite:ro>
<cite:typope>diagnostic</cite:typope>
<cite:typemp>prescrite</cite:typemp>
</cite:prescription>
</wfs:Insert>
</wfs:Transaction>

How to pass complex arguments with zeep in Python

I have a WSDL that contains a complex type like so:
<s:element name="BatchBillPaymentRequest">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="requestData" type="tns:ClientBatchBillPaymentRequestData"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ClientBatchBillPaymentRequestData">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CallBackUrl" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="BillItems" type="tns:ArrayOfClientBatchBillPaymentRequestDataItem"/>
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfClientBatchBillPaymentRequestDataItem">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="ClientBatchBillPaymentRequestDataItem" nillable="true" type="tns:ClientBatchBillPaymentRequestDataItem"/>
</s:sequence>
</s:complexType>
<s:complexType name="ClientBatchBillPaymentRequestDataItem">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="BillId" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="PayId" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="LoginAccount" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="OrderId" type="s:long"/>
<s:element minOccurs="0" maxOccurs="1" name="AdditionalData" type="s:string"/>
</s:sequence>
</s:complexType>
<s:element name="BatchBillPaymentRequestResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="BatchBillPaymentRequestResult" type="tns:ClientBatchBillPaymentResponseData"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ClientBatchBillPaymentResponseData">
<s:complexContent mixed="false">
<s:extension base="tns:ResponseDataViewModelBase">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="TotalAmount" type="s:long"/>
<s:element minOccurs="1" maxOccurs="1" name="BatchToken" type="s:long"/>
<s:element minOccurs="0" maxOccurs="1" name="BillItems" type="tns:ArrayOfClientBatchBillPaymentResponseDataItem"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>
and I did to the following :
client = Client('https://pec.shaparak.ir/newipgservices/bill/billservice.asmx?WSDL')
result = client.service.BatchBillPaymentRequest(CallBackUrl=_callBackUrl, BillItems=[{'BillId': '7381116907223',
'PayId': '15870210',
'LoginAccount': 'qazwsx',
'OrderId': 1000,
'AdditionalData': '1'}])
print(result)
the result return this error:
BatchBillPaymentRequest() got an unexpected keyword argument
'BillItems'. Signature: `requestData
and when I use this code instead of above code:
data = []
data.append({'BillId': '7381116907223', 'PayId': '15870210', 'LoginAccount': 'qazwsx', 'OrderId': 1000, 'AdditionalData': '1'})
wsdl = "https://pec.shaparak.ir/newipgservices/bill/billservice.asmx?WSDL"
client = Client(wsdl=wsdl)
d = dict(CallBackUrl=_callBackUrl, BillItems=data)
result = client.service.BatchBillPaymentRequest(d)
print(result)
in this case the result is: "The input parameter or some of its properties is empty"
webservice link is : webservice link
and method is : method
If anyone knows how to use the above type from the WSDL with zeep, I would be grateful. Thanks.
solved problem ,by this code :
from zeep import Client
data = []
data.append(
{'BillId': '7381116907223',
'PayId': '15870210',
'LoginAccount': 'qazwsx',
'OrderId': '1000',
'AdditionalData': '5'})
client = Client(wsdl=_webservice)
d = {
'CallBackUrl': 'myweb.ir',
'BillItems': {
'ClientBatchBillPaymentRequestDataItem': data
}
}
result = client.service.BatchBillPaymentRequest(d)
print(result)

Error generating web service client from wsdl using apache CXF 3

I am trying to generate the web service client from WSDL , I am quiet new to this so can't figure out the error.
I have tried:
wsimport -keep path-to-wsdl
which gives me this error :
C:\WINDOWS\system32>wsimport -keep E:\NIEsocketWork\sdl.wsdl
parsing WSDL...
[WARNING] src-resolve.4.2: Error resolving component 'tns:GetMerchantRateRequest'. It was detected that 'tns:GetMerchantRateRequest' is in namespace 'http://www.fexcodcc.com/DCC20071126', but components from this namespace are not referenceable from schema document 'file:/E:/NIEsocketWork/sdl.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'tns:GetMerchantRateRequest' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/E:/NIEsocketWork/sdl.wsdl#types?schema1'.
line 20 of file:/E:/NIEsocketWork/sdl.wsdl#types?schema1
[WARNING] src-resolve: Cannot resolve the name 'tns:GetMerchantRateRequest' to a(n) 'type definition' component.
line 20 of file:/E:/NIEsocketWork/sdl.wsdl#types?schema1
[ERROR] undefined simple or complex type 'tns:GetMerchantRateRequest'
line 20 of file:/E:/NIEsocketWork/sdl.wsdl
[ERROR] undefined simple or complex type 'tns:GetMerchantRateResponse'
line 26 of file:/E:/NIEsocketWork/sdl.wsdl
[ERROR] undefined simple or complex type 'tns:GetCardRateRequest'
line 79 of file:/E:/NIEsocketWork/sdl.wsdl
[ERROR] undefined simple or complex type 'tns:GetCardRateResponse'
line 85 of file:/E:/NIEsocketWork/sdl.wsdl
Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:129)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2283)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:183)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:126)
at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:429)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)
I have also tried apache cxf 3.1.1 to generate the web service client in eclipse but get this error :
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -client -d C:\Users\Hamza\GalileoWorkspace\NIDCCFexco\.cxftmp/src -classdir C:\Users\Hamza\GalileoWorkspace\NIDCCFexco\build\classes -p http://www.fexcodcc.com/DCC20071126=com.fexcodcc.dcc20071126 -impl -validate -exsh false -dns true -dex true -wsdlLocation file:///E:/NIEsocketWork/sdl.wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 file:/E:/NIEsocketWork/sdl.wsdl
wsdl2java - Apache CXF 3.1.1
WSDLToJava Error:
Summary: Failures: 4, Warnings: 0
<<< ERROR!
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateOut> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateResult> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetCardRateOut> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetCardRateResult> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetCardRateIn> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetCardRate> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateIn> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetMerchantRate> can not be found in the schemas
org.apache.cxf.tools.common.ToolException:
Summary: Failures: 4, Warnings: 0
<<< ERROR!
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateOut> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateResult> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetCardRateOut> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetCardRateResult> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetCardRateIn> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetCardRate> can not be found in the schemas
Part <parameters> in Message <{http://www.fexcodcc.com/DCC20071126}GetMerchantRateIn> referenced Type <{http://www.fexcodcc.com/DCC20071126}GetMerchantRate> can not be found in the schemas
at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:139)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:207)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:204)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
My WSDL file is :
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions targetNamespace="http://www.fexcodcc.com/DCC20071126"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:tns="http://www.fexcodcc.com/DCC20071126"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation>DCC Gateway (Provides functionality to make requests to the DCC for availability)</wsdl:documentation>
<!-- Types --> <wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http:// www.fexcodcc.com/DCC20071126" xmlns:dhs="urn:dhs">
<!-- Type definitions -->
<xsd:element name="GetMerchantRate"> <xsd:complexType>
<xsd:sequence>
<xsd:element name="GetMerchantRateRequest" type="tns:GetMerchantRateRequest" minOccurs="1" maxOccurs="1"/>
</xsd:sequence> </xsd:complexType>
</xsd:element>
<xsd:element name="GetMerchantRateResult"> <xsd:complexType>
<xsd:sequence>
<xsd:element name="GetMerchantRateResponse" type="tns:GetMerchantRateResponse" minOccurs="1" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
</xsd:element>
<!-- Complex type definitions -->
<xsd:complexType name="GetMerchantRateResponse"> <xsd:sequence>
<xsd:element name="ReferenceNumber" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="ExchangeRate" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="FgnCurCode" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="FgnAmount" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="DccOffered" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ValidHours" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="MarginRatePercentage" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ExchangeRateSourcename" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="CommissionPercentage" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ExchangerateSourceTimestamp" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="MinorUnits" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ResponseCode" type="xsd:string" minOccurs="1" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
<xsd:complexType name="GetMerchantRateRequest"> <xsd:sequence>
<xsd:element name="ReferenceNumber" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="MerchantId" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="Acquirer" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="FgnCurCode" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="BaseAmount" type="xsd:string" minOccurs="0" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
<xsd:element name="GetCardRate"> <xsd:complexType>
<xsd:sequence>
<xsd:element name="GetCardRateRequest" type="tns:GetCardRateRequest" minOccurs="1" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
</xsd:element>
<xsd:element name="GetCardRateResult"> <xsd:complexType>
<xsd:sequence>
<xsd:element name ="GetCardRateResponse" type="tns:GetCardRateResponse" minOccurs="1" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
</xsd:element>
<!-- Complex type definitions --> <xsd:complexType name="GetCardRateResponse">
<xsd:sequence>
<xsd:element name="ReferenceNumber" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="ExchangeRate" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="FgnCurCode" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="FgnAmount" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="DccOffered" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ValidHours" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="MarginRatePercentage" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ExchangeRateSourceName" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="CommissionPercentage" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="ExchangeRateSourceTimestamp" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="MinorUnits" type="xsd:string" minOccurs="0" maxOccurs="1" /><xsd:element name="ResponseCode" type="xsd:string" minOccurs="1" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
<xsd:complexType name="GetCardRateRequest"> <xsd:sequence>
<xsd:element name="ReferenceNumber" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="CardId" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="MerchantId" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="Acquirer" type="xsd:string" minOccurs="1" maxOccurs="1" />
<xsd:element name="BaseAmount" type="xsd:string" minOccurs="0" maxOccurs="1" />
</xsd:sequence> </xsd:complexType>
</xsd:schema> </wsdl:types>
<!-- Dhs Server Messages --> <wsdl:message name="GetMerchantRateIn">
<wsdl:part name="parameters" element="tns:GetMerchantRate" /> </wsdl:message>
<wsdl:message name="GetMerchantRateOut">
<wsdl:part name="parameters" element="tns:GetMerchantRateResult" /> </wsdl:message>
<wsdl:message name="GetCardRateIn">
<wsdl:part name="parameters" element="tns:GetCardRate" /> </wsdl:message>
<wsdl:message name="GetCardRateOut">
<wsdl:part name="parameters" element="tns:GetCardRateResult" /> </wsdl:message>
<!-- End of Dhs Server Messages -->
<!-- Port types --> <wsdl:portType name="DHS">
<wsdl:operation name="getMerchantRate">
<wsdl:documentation>Get Exchange Rate for merchant</wsdl:documentation> <wsdl:input message="tns:GetMerchantRateIn" />
<wsdl:output message="tns:GetMerchantRateOut" /> </wsdl:operation>
<wsdl:operation name="getCardRate">
<wsdl:documentation>Get Dynamic Currency conversion</wsdl:documentation> <wsdl:input message="tns:GetCardRateIn" />
<wsdl:output message="tns:GetCardRateOut" /> </wsdl:operation>
<!-- End of Dhs Server Operations --> </wsdl:portType>
<!-- WSDL bindings -->
<wsdl:binding name="DHS12" type="tns:DHS"> <wsdl:documentation>
<wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.1" /> </wsdl:documentation>
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="getMerchantRate">
<soap12:operation soapAction="http://www.fexcodcc.com/DCC20071126/ getMerchantRate" style="document" />
<wsdl:input>
<soap12:body use="literal" /> </wsdl:input>
<wsdl:output>
<soap12:body use="literal" /> </wsdl:output>
</wsdl:operation>
<wsdl:operation name="getCardRate">
<soap12:operation soapAction="http://www.fexcodcc.com/DCC20071126/ getCardRate" style="document" />
<wsdl:input>
<soap12:body use="literal" /> </wsdl:input>
<wsdl:output>
<soap12:body use="literal" /> </wsdl:output>
</wsdl:operation> </wsdl:binding>
<!-- WSDL service -->
<wsdl:service name="DHS">
<wsdl:documentation> DHS Server(Provides functionality to make DCC availability requests)</wsdl:documentation>
<wsdl:port name="DHS12" binding="tns:DHS12">
<soap12:address location="dhstest2.fexcodccapps.com/axis2/services/DHS" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
please help me figure out the error in any of the ways, whether wsimport or apache cxf. I will be really grateful.
in the schema declaration there is a space too much after the slashes: http:// www.fexcodcc.com/DCC20071126 instead of http://www.fexcodcc.com/DCC20071126.
try removing that space and it validates.

Error in Sabre SOAP Error : USG_COULD_NOT_COMPLETE_REQUEST

We just started developing our own sabre app and we are trying to create a session to proceed with other services.
But an exception returned :
com.sabre.universalservices.base.exception.ApplicationException: errors.general.USG_COULD_NOT_COMPLETE_REQUEST
This is the code used :
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:eb='http://www.ebxml.org/namespaces/messageHeader' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsd='http://www.w3.org/1999/XMLSchema'>
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand='1' eb:version='1.0'>
<eb:ConversationId>*myConversationId*</eb:ConversationId>
<eb:From>
<eb:PartyId type='urn:x12.org:IO5:01'>999999</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId type='urn:x12.org:IO5:01'>123123</eb:PartyId>
</eb:To>
<eb:CPAId>IPCC</eb:CPAId>
<eb:Service eb:type='OTA'>SessionCreateRQ</eb:Service>
<eb:Action>SessionCreateRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>1000</eb:MessageId>
<eb:Timestamp>2016-04-06T01:14:12Z</eb:Timestamp>
<eb:TimeToLive>2016-04-06T02:14:12Z</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse='http://schemas.xmlsoap.org/ws/2002/12/secext' xmlns:wsu='http://schemas.xmlsoap.org/ws/2002/12/utility'>
<wsse:UsernameToken>
<wsse:Username>*Username*</wsse:Username>
<wsse:Password>*Password*</wsse:Password>
<Organization>IPCC;</Organization>
<Domain>DEFAULT</Domain>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest SOAP-ENV:mustUnderstand='1' eb:version='1.0'>
<eb:Reference xmlns:xlink='http://www.w3.org/1999/xlink' xlink:href='cid:rootelement' xlink:type='simple'/>
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And here is the returned response :
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<DataSet xmlns="http://tempuri.org/">
<xs:schema xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:app1="http://www.ebxml.org/namespaces/messageHeader" xmlns:app2="http://schemas.xmlsoap.org/ws/2002/12/secext" id="Envelope" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:import namespace="http://www.ebxml.org/namespaces/messageHeader"/>
<xs:import namespace="http://schemas.xmlsoap.org/ws/2002/12/secext"/>
<xs:attribute name="mustUnderstand" msdata:Prefix="soap-env" type="xs:string"/>
<xs:element name="Envelope" msdata:IsDataSet="true" msdata:Locale="en-US" msdata:Prefix="soap-env">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="app1:PartyId"/>
<xs:element name="Header" msdata:Prefix="soap-env">
<xs:complexType>
<xs:sequence>
<xs:element ref="app2:Security" minOccurs="0"/>
<xs:element ref="app1:MessageHeader"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Body" msdata:Prefix="soap-env">
<xs:complexType>
<xs:sequence>
<xs:element name="Fault" msdata:Prefix="soap-env" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="faultcode" form="unqualified" type="xs:string" minOccurs="0"/>
<xs:element name="faultstring" form="unqualified" type="xs:string" minOccurs="0"/>
<xs:element name="detail" form="unqualified">
<xs:complexType>
<xs:sequence>
<xs:element name="StackTrace" form="unqualified" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:app2="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:app1="http://www.ebxml.org/namespaces/messageHeader" targetNamespace="http://schemas.xmlsoap.org/ws/2002/12/secext" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:import namespace="http://www.ebxml.org/namespaces/messageHeader"/>
<xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"/>
<xs:element name="Security" msdata:Prefix="wsse" type="xs:string"/>
</xs:schema>
<xs:schema xmlns:mstns="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ebxml.org/namespaces/messageHeader" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:app1="http://www.ebxml.org/namespaces/messageHeader" xmlns:app2="http://schemas.xmlsoap.org/ws/2002/12/secext" targetNamespace="http://www.ebxml.org/namespaces/messageHeader" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"/>
<xs:import namespace="http://schemas.xmlsoap.org/ws/2002/12/secext"/>
<xs:element name="PartyId" msdata:Prefix="eb" nillable="true">
<xs:complexType>
<xs:simpleContent msdata:Prefix="eb" msdata:ColumnName="PartyId_Text" msdata:Ordinal="1">
<xs:extension base="xs:string">
<xs:attribute name="type" msdata:Prefix="eb" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="MessageHeader" msdata:Prefix="eb">
<xs:complexType>
<xs:sequence>
<xs:element name="CPAId" msdata:Prefix="eb" type="xs:string" minOccurs="0" msdata:Ordinal="1"/>
<xs:element name="ConversationId" msdata:Prefix="eb" type="xs:string" minOccurs="0" msdata:Ordinal="2"/>
<xs:element name="Action" msdata:Prefix="eb" type="xs:string" minOccurs="0" msdata:Ordinal="3"/>
<xs:element name="From" msdata:Prefix="eb" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element ref="PartyId" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="To" msdata:Prefix="eb" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element ref="PartyId" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Service" msdata:Prefix="eb" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent msdata:Prefix="eb" msdata:ColumnName="Service_Text" msdata:Ordinal="1">
<xs:extension base="xs:string">
<xs:attribute name="type" msdata:Prefix="eb" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="MessageData" msdata:Prefix="eb" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="MessageId" msdata:Prefix="eb" type="xs:string" minOccurs="0"/>
<xs:element name="Timestamp" msdata:Prefix="eb" type="xs:string" minOccurs="0"/>
<xs:element name="RefToMessageId" msdata:Prefix="eb" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" msdata:Prefix="eb" type="xs:string"/>
<xs:attribute ref="mstns:mustUnderstand"/>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header diffgr:id="Header1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenHeader_Id="0">
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"/>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" diffgr:id="MessageHeader1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenMessageHeader_Id="0" eb:version="1.0" soap-env:mustUnderstand="1" msdata:hiddenHeader_Id="0">
<eb:CPAId>IPCC</eb:CPAId>
<eb:ConversationId>www.tiitco.com10:16</eb:ConversationId>
<eb:Action>ErrorRS</eb:Action>
<eb:From diffgr:id="From1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenFrom_Id="0" msdata:hiddenMessageHeader_Id="0">
<eb:PartyId diffgr:id="PartyId1" msdata:rowOrder="0" diffgr:hasChanges="inserted" eb:type="URI" msdata:hiddenFrom_Id="0">123123</eb:PartyId>
</eb:From>
<eb:To diffgr:id="To1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenTo_Id="0" msdata:hiddenMessageHeader_Id="0">
<eb:PartyId diffgr:id="PartyId2" msdata:rowOrder="1" diffgr:hasChanges="inserted" eb:type="URI" msdata:hiddenTo_Id="0">999999</eb:PartyId>
</eb:To>
<eb:Service diffgr:id="Service1" msdata:rowOrder="0" diffgr:hasChanges="inserted" eb:type="OTA" msdata:hiddenMessageHeader_Id="0">SessionCreateRQ</eb:Service>
<eb:MessageData diffgr:id="MessageData1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenMessageHeader_Id="0">
<eb:MessageId>b00c9239-c921-4983-a8ed-831732f54b84#176</eb:MessageId>
<eb:Timestamp>2016-04-06T07:19:41</eb:Timestamp>
<eb:RefToMessageId>1000</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
</soap-env:Header>
<soap-env:Body diffgr:id="Body1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenBody_Id="0">
<soap-env:Fault diffgr:id="Fault1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenFault_Id="0" msdata:hiddenBody_Id="0">
<faultcode xmlns="">soap-env:Server.SystemFailure</faultcode>
<faultstring xmlns="">SOAPException: Could not complete the request</faultstring>
<detail xmlns="" diffgr:id="detail1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenFault_Id="0">
<StackTrace>
com.sabre.universalservices.base.exception.ApplicationException: errors.general.USG_COULD_NOT_COMPLETE_REQUEST
</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
</diffgr:diffgram>
</DataSet>
Does anyone have an idea on what could be the problem?
The returned response looks more like a schema declaration in an xsd file.
Is that what you are getting back?
Anyway, the error USG_COULD_NOT_COMPLETE_REQUEST is included on the error codes list:
https://developer.sabre.com/docs/read/soap_basics/status_codes_and_errors
What is the endpoint you are trying to hit?
Customer Acceptance Testing/CERT?
https://developer.sabre.com/docs/read/soap_basics/environments
Are you using a SOAP client tool? Any language?
More info will help.
This seems like an authentication error of some sorts. Here is some working XML for creating a session, compare. Like fcarreno said you are likely missing the PseudoCityCode node.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId type="urn:x12.org:IO5:01">*or</PartyId>
</From>
<To>
<PartyId type="urn:x12.org:IO5:01">Sabre</PartyId>
</To>
<CPAId>X2TH</CPAId>
<ConversationId>1473816876</ConversationId>
<Service type="sabreXML">SessionCreateRQ</Service>
<Action>SessionCreateRQ</Action>
<MessageData>
<MessageId>1473816876</MessageId>
<Timestamp>2016-09-14T01:34:36</Timestamp>
<TimeToLive>2016-09-14T02:34:36</TimeToLive>
</MessageData>
</MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
<wsse:UsernameToken>
<wsse:Username>*user</wsse:Username>
<wsse:Password>*pass</wsse:Password>
<Organization>*ipcc</Organization>
<Domain>DEFAULT</Domain>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<SessionCreateRQ xmlns="http://www.opentravel.org/OTA/2002/11">
<POS>
<Source PseudoCityCode="*ipcc" />
</POS>
</SessionCreateRQ>
</soapenv:Body>
</soapenv:Envelope>