Support Article
WSDL generation has incorrect content
Summary
Instructions: Create Data mapping rules by importing a complex XSD from local file system using Connector and Metadata Wizard. The XSD file contains a complex structure that has more than one elements. Using the data classes, create Service SOAP and package manually and modify the parse and stream XML rules under the root node. After custom modification of the parse XML and Stream rules refer those rules to create the Service Soap rules and mapping the request and response parameter under the corresponding tabs.
Issue: The WSDL content generated has wrong format. There is an improper “from” tag in the element entity. Below is the code snipped:
This is happening when we import the XSD from local file system. If we import the XSD from a hosted location, there is no issue.
Error Messages
The WSDL content generated has wrong format. There is an improper “from” tag in the element entity. Below is the code snipped:
Generated wrong WSDL content
<element from="qualified" name="nbia_user_sid" type="xsd:string"/>
Correct WSDL content
<element name="nbia_user_sid" type="xsd:string"/>
Steps to Reproduce
1. Import a schema from a file - that has more than one complex elements.
2. Modify the parse and stream XML rules under the root node.
3. Refer those rules to create the Service Soap rules and mapping the request and response parameter under the corresponding tabs.
3. Go to Package instance and generated WSDL.
4. Click on the WSDL and review the content.
ROOT CAUSE
Using the wizard, when user imports any schema (.xsd) from a hosted location and disk file, the “Parse XML: Request” and “XML Stream: Response” the generated has one difference. When import from a hosted location, the value for the “schema URL” field under the “XML tab” for both the rules, get populated with the location URL. http://host:port/xyz.xsd.
However when user import from a file, the value for the “schema URL” field under the “XML tab” for both the rules does not get populated with the schema location and remains blank.
And when the WSDL is generated, the content has format. If user manually updates the schema location, the issue is not reproducible.
Resolution
Perform the following local-change step:
Update the schema URL field with the URL of the XSD document to validate against. The URL entered must be accessible to Pega at runtime. For example file:c:\xsd\NBIASchemaDocument.mod.xsd .
After updating both Parse XML: Request and XML Stream: Response rules, the WSDL generated from the soap service package is correct.
Published May 13, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.