on 08-13-2013 8:48 AM
Hi Experts
A very good day
I am again stuck with a problem where:
# I made a scenario using Oasis standard XSDs and made a WSDL out of it. Then I provided the client with all the XSDs required along with the WSDL.
# Client is using Websphere message broker toolkit to consume the WSDL.
# He made an Application workset and put all the XSDs in one of its folders and tried consuming the WSDL there.
# Problem: When the client trying to import the WSDL it gives him the following error:
1. XSD: The location 'has not been resolved, Line: 1,Column: 1
2. XSD: Element reference 'urn:oasis*********Field1' is unresolved Line: 1,Column: 1
3. XSD: Element reference 'urn:oasis*********Field2' is unresolved Line: 1,Column: 1
And so on for all the fields that are there in the WSDL and referencing any of the XSDs.
Could anyone please suggest how to move further in it as I cannot have access to client's system.
Regards
Neha
Hello Neha,
Check if this helps you - Importing XSD’s Schema With External References (step-by-step guide).
Regards
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying to consume this WSDL and the related xsd in Netbeans and I am also getting the same error.
Where do I need to put the XSD so that the WSDL can reference it properly ?
I have put it in the same folder as WSDL as of now but these are standard OASIS schema that we are using and this is the path where I think these placed
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" schemaLocation="UBL-nameofXSD-2.0.xsd"/>
and then in the final request XSD whereall these are used I put it as
?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="MI_OS_Customer" targetNamespace="*****************" xmlns:p3="urn:oasis:names:specification:ubl:schema:xsd:Response-2" xmlns:p2="urn:oasis:names:specification:ubl:schema:xsd:Customer-2" xmlns:p1="http://royalmail.com/***************************" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><xsd:schema targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:Customer-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Customer-2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" /><xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" />
Please help me with this.
Regards
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Neha,
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" />
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:nameofXSD-2" />
All I see are import namespaces, the attribute schemaLocation is missing e.g
<xsd:import namespace="urn:oasis:name:specification:ubl:schema:xsd:nameOfXsd" schemaLocation="locationOfXsdAndXsdName">
e.g schemaLocation="nameOfXsd.xsd" means that the xsd is in the same directory as your wsdl
schemaLocation="../nameOfXsd.xsd" means that the xsd is in another folder in the same directory as your wsdl etc,etc.
Hope this helps,
Mark
Hi Mark
Thanks but I already added schema location it worked for the OLD WSDL that I had then I made some changes in one of the XSD and tried consuming it again
then i got the following error:
supplied wsdl must declare atleast one wsdl binding to be used
and the new and old wsdl have same binding as the new wsdl is the copy of old old wsdl with only version change and few added fields.
Regards
Neha
Hello Neha,
Thanks but I already added schema location it worked for the OLD WSDL that I had then I made some changes in one of the XSD and tried consuming it again
Changing referenced xsds is not always simple. You could use a third-party tool like Altova, make your changes and re-validate the new xsd.
Regards,
Mark
Mark
I used Altova only to make changes in the XSD then I added the XSD into the external definition of repository and made a scenario out of it. I then made a WSDL and gave it to the client along with all the referenced XSDs but then it is showing this error:
supplied wsdl must declare atleast one wsdl binding to be used
What I understood is binding is linked with this part of the WSDL:
<wsdl:binding name=XYZBinding" type="p1:XYZ" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /><wsdl:operation name="XYZ"><soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /><wsdl:input><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></wsdl:input><wsdl:output><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="XYZService"><wsdl:port name="XYZPort" binding="p1:XYZBinding" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
and this is same as the OLD WSDL that worked for me.
Regards
Neha
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.