Hello all,
I have a problem with my soap envelope. I need to add in the Header some Sender information. So I added:
- <xsd:element ref="Sender" />
And futher on I defined the Sender and Recipient like the following:
<xsd:element name="Sender">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="PartyNumberId" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PartyNumberId">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyNumber" type="xsd:string" minOccurs="0" />
<xsd:element name="PartyNumberTypeCode" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
-
Piece of the exact code:
<?xml version="1.0" encoding="ISO-8859-1"?>
http://www.w3.org/2001/XMLSchema" xmlns:tns=" http://schemas.xmlsoap.org/soap/envelope/" targetNamespace=" http://schemas.xmlsoap.org/soap/envelope/">
<xsd:element name="Envelope" type="tns:Envelope" />
<xsd:complexType name="Envelope">
<xsd:sequence>
<xsd:element ref="tns:Header" minOccurs="0" />
<xsd:element ref="tns:Body" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Header" type="tns:Header" />
<xsd:complexType name="Header">
<xsd:sequence>
<xsd:element ref="Sender" />
<xsd:element ref="Recipient" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Body" type="tns:Body" />
<xsd:complexType name="Body">
<xsd:sequence>
<xsd:element ref="ORDERS02" minOccurs="0" maxOccurs="99999" />
</xsd:sequence>
</xsd:complexType>
<xsd:attribute name="mustUnderstand">
<xsd:simpleType>
<xsd:restriction base="boolean">
<xsd:pattern value="0|1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="actor" type="anyURI" />
<xsd:attribute name="encodingStyle" type="encodingStyle" />
<xsd:element name="Fault" type="Fault" />
<xsd:element name="Sender">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="PartyNumberId" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Recipient">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="PartyNumberId" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PartyNumberId">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PartyNumber" type="xsd:string" minOccurs="0" />
<xsd:element name="PartyNumberTypeCode" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
-
But the referenced Sender element cannot be found.. does anyone know how to fix this??
Thnx