firewall, trusted network, URL certification or authorization issues. But once all the network and authorization issues are resolved, if you still get error in WSDL/Schema, then it is highly possible that your Web Service URL has the link to Schema Location which it cannot identify at runtime wizard while creating the Consumer Proxy.
Say you are trying to create consumer proxy in SE80 likeshown below.
You give the name and proceed with the Enterprise ServicesCreate Wizard.
But you are stuck in the step “Enter the URL for accessing the WSDL/Schema”.
Errors can be like below: “500 Internal Server Error”.
Error can be like “500 SSL Peer Certificate Untrusted”.
Error in URL accessing the WSDL/Schema can also be for .XSDlike below.
Sample xsd errors in WSDL URL:
“Error while uploading the xsd file(schema) in web services definition”
“File ContractService.xsd was not attached because it has an invalid file extension not allowed by the system settings”
“Exception occurred in communication framework: Error in HTTP Framework:500Internal Server Error”
“…<WSDL URL>.xsd “ error
by the way XSD means XML Schema Definition
Most of the time, WSDL URL has the hyper link (URL) to the schema location. Instead of the <xsd:schema>definition </xsd:schema>, it has a URL link to schema location where we can see the actual schema definition and properties. In such Web Services, if we try to consume the WSDL URL, we get error. In order to avoid that error, we need to use the WSDL local file. Do not worry, the local WSDL file would be dynamic and would work exactly like the WSDL URL. But we need to do a small tweak in the local WSDL file.
We need to replace the link to schema location with the exact schema definition from the schema location URL in the WSDL local file. Once we have the complete schema definition replaced in the WSDL, we should be able to create the consumer proxy using the local WSDL file.
Below steps would demonstrate in details, how we can replace the xsd schema location with the exact xsd schema definition. We have taken the public dnb toolkit web service for our example.
Step 1 – Refer to below link for dnb WSDL
We are referring to GDP_V4.wsdl.
Step 2 – Open the Web Service
Step 3 – Save the Web Service as .txt file
Save the WSDL file as .txt in your local machine. Screenshot of the txt file opened in wordpad below.
Step 4 – Look for <xsd:schema> Key Word
Take a look at the <xsd:schema>either in the txt file (screenshot above) or on WSDL in browser (screenshot below).
Step 5 – Expand <xsd:schema> </xsd:schema>
<xsd:schema><xsd:import namespace=”http://www.dnb.com/DNB_WebServices/Providers/OrderAndInvestigations/GDP_V4/wsp_GDP_V4” schemaLocation=”https://toolkit-wsdl.dnb.com/ws/DNB_WebServices.Providers.OrderAndInvestigations.GDP_V4:wsp_GDP_V4?WSDL&fingerprint=P6DCJGGOL7NVDOIVFGQWX7EKOTZNG45M.xsd” /></xsd:schema>
Step 6 – Look for schemaLoation Key Word and schemaLocation Path
Forthis WSDL the schemaLocation path is:
Step 7 – Replace the xsd:schema in the WSDL file with the exact definition from the schemaLocation.
Open the schemaLocation Path URL in another Tab in the browser. It will give the full Type definition of the xsd:schema.
Do not forget to expand all <xsd:sequence> before youcopy the full definition.
Once it is expanded, it is no more yellow.
The easy way to expand all the sequence is by going to page source. Right click on any area and go to View page source
Step 8 – Copy XSD Schema Definition and Replace
Copy the full xsd:schema and replace in the original WSDL.txt file with the xsd:schema from the schemaLocation.
PS: Do not copy the first line of the page source (as marked in image above).
Tips:<xsd:schema> </xsd:schema> should be between <wsdl:types></wsdl:types>.
Step 9 – Save the Web Service file with .WSDL extension
Step 10 – Choose the WSDL Source as Local File in the Wizard
Now, wherever you were trying to use the WSDL URL, replace it with your local WSDL file. The xsd schema error should be resolved.
Screenshot of sample Consumer Proxy we created.
This should fix the Web Service XSD Schema issue.
Thank you Mastan Raju!!
A special thanks to Mastan Raju, who helped us with a video explaining the root cause. He helped us figuring out the issue and even sent us a sample WSDL file. With his help, we were able to create the consumer proxy from local WSDL file and consume the external Web Service.
If you want to have real time discussions and resolutions, do join our SAP Technical Telegram Group where we have more than 4670+ active SAP consultants from 6 Continents.
Please Note: You need to install Telegram App on your mobile first and then you can join the group using the above link.