on 11-28-2007 2:14 PM
Dear all,
I need to use in a message mapping a message type imported as an external definition.
This message type contains complex types defined as extensions of other types.
For example :
<xsd:complexType name="ProfessionnelType">
<xsd:annotation>
<xsd:documentation>
Classe Professionnel.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<b><xsd:extension base="UtilisateurType"></b>
<xsd:sequence>
<xsd:element name="raisonSociale" type="dico:ProfessionnelRaisonSocialeType" minOccurs="0" /> <xsd:element name="codeAPE" type="dico:ProfessionnelCodeAPEType" minOccurs="0" />
<xsd:element name="numeroSIRET" type="dico:ProfessionnelNumeroSIRETType" minOccurs="0" />
<xsd:element name="clientPrioritaire" type="dico:ProfessionnelClientPrioritaireType" minOccurs="0" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
The problem I have is when I want to use my message type in a message mapping, I only see the fields of the basic types, not the ones of the extended types. So of course I am not able to use the data contained in these fields.
The first workaround I thought about was creating a user-defined function in the mapping that would allow me to access via the java coding the elements I could not see in the graphical interface, but I am not sure it is possible. Is it correct ? Or does someone have a code sample to do this ?
Or is there another solution ? XSLT ? java mapping ? ABAP mapping ?
Thanks in advance for your help.
Best regards,
Julien
PS : the XSDs are provided by the cusomer and I have to use them as they are, I am not allowed to modify them
Hi,
I would check if this is supported in PI.
<xsd:extension>
It is feasible that this is not.
If it is not, there is an option of using XSLT mapping to output the message in the format you need instead of using the external definition.
I have done this where I could not use the WSDL provided by the supplier.
Cheers
Colin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julien,
When you load the external definition (WSDL), click on the tab for "External References".
Is anything shown here ? I would expect each of the types referenced in the WSDL to be listed.
Cheers
Colin.
Message was edited by:
Colin Bickell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry - this was a typo.
When you load the WSDL and under the External References, you say that you can see two External References.
There are two columns - source and name.
The source field will list the 2 XSDs that are referenced. Do you have these to load as "External Definitions" - if not you will need to get these from the customer and load into XI as "Exterrnal Definitions" as well.
Once you have confirmed these are loaded into XI, I will let you know how to link them all together so you can see all sub-elements.
Cheers
Colin.
Hi,
OK, here is what you need to do to link them together:
1. On each of the referenced XSDs, type the source name (from the WSDL external references) in the field <b>Source</b> under the field Filename.
2. Save the XSDs changes and activate.
3. View the WSDL external definition external references and you should now see the column Name has been filled in with your referenced XSD that you loaded separately.
This is all you need to do. You will now be able to see the sub-elements in mapping.
Post back if any queries.
Cheers
Colin.
Hi,
Your xsd is wrong. Use this one. The namespace was missing which is required in any xsd. if you are not getting this from your customer then ask him to provide that. Now i have added and tested and working fine.
<b><?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"></b>
<xsd:complexType name="ProfessionnelType">
<xsd:annotation>
<xsd:documentation>
Classe Professionnel.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="UtilisateurType">
<xsd:sequence>
<xsd:element name="raisonSociale" type="dico:ProfessionnelRaisonSocialeType" minOccurs="0" />
<xsd:element name="codeAPE" type="dico:ProfessionnelCodeAPEType" minOccurs="0" />
<xsd:element name="numeroSIRET" type="dico:ProfessionnelNumeroSIRETType" minOccurs="0" />
<xsd:element name="clientPrioritaire" type="dico:ProfessionnelClientPrioritaireType" minOccurs="0" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<b></xsd:schema></b>
There is no question of using any other mapping like JAVA or ABAP as you have mentioned.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarvesh,
thanks for your answer, but the example I gave was just a sample of the full file. The XSD is embedded in a WSDL, which starts like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.mycustomernamespace.com">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dico="http://www.mycustomer.fr/myproject/xsd/dictionnaire/" xmlns="http://www.mycustomer.fr/myproject/xsd/SituationContractuelle/" targetNamespace="http://www.mycustomer.fr/myproject/xsd/SituationContractuelle/" elementFormDefault="qualified" attributeFormDefault="unqualified">
As I said, there is no way I can modify the WSDL or referenced XSD files.
Best regards,
Julien
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.