| Home » Language IDEs » ServerTools (WTP) » WSDL Issues - Namespaces
 Goto Forum:| 
| WSDL Issues - Namespaces [message #85882] | Tue, 22 March 2005 15:34  |  | 
| Eclipse User  |  |  |  |  | I'm having some issues with a WSDL file I'm using.  Eclipse/webtools seems to be ignoring the namespace prefix within the wsdl file when I bring it
 into eclipse.  I can successfully invoke the webservice via the Web
 Services Explorer. But it inserts its own prefix instead of what is
 defined in the WSDL file.  It uses "q0" instead of what is in the WSDL.
 I'm having the same problem with the IBM WSAD version except it is using
 "p2" as the prefix and ignoring what is in the WSDL file.
 
 This is the error that I get when trying to create a web service from the
 wsdl.
 
 IWAB0380E Errors were encountered while validating XML schemas.
 XSD: The location '' has not been resolved
 XSD: Element reference
 'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 is unresolved
 IWAB0381I
 file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 was successfully opened.
 
 Here is the WSDL I used.  Is there something in the WSDL that is causing
 this problem. I'm not having any issues getting it to work with .Net. I
 sure would like it better in Java though.
 
 
 
 <?xml version="1.0" encoding="UTF-8"?>
 <wsdl:definitions name="PgnServiceRequest_publish"
 targetNamespace="http://sn000046/PgnServiceRequest/publish/"
 xmlns:webM="http://www.webMethods.com/noNamespace/"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
 xmlns:tns="http://sn000046/PgnServiceRequest/publish/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 xmlns:wsdns1="http://sn000046/PgnServiceRequest/publish"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <wsdl:types>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 targetNamespace="http://sn000046/PgnServiceRequest/publish"
 xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 <xsd:element name="firstname" type="xsd:string"/>
 <xsd:element name="lastname" type="xsd:string"/>
 <xsd:element name="employeenumber" type="xsd:string"/>
 <xsd:element name="problemcode" type="xsd:string"/>
 <xsd:element name="problemdescription" type="xsd:string"/>
 <xsd:element name="contact" type="xsd:string"/>
 <xsd:element name="createTicket">
 <xsd:complexType>
 <xsd:sequence>
 <xsd:element ref="ti:firstname"/>
 <xsd:element ref="ti:lastname"/>
 <xsd:element ref="ti:employeenumber"/>
 <xsd:element ref="ti:problemcode"/>
 <xsd:element ref="ti:problemdescription"/>
 <xsd:element ref="ti:contact"/>
 </xsd:sequence>
 </xsd:complexType>
 </xsd:element>
 <xsd:element name="success" type="xsd:string"/>
 <xsd:element name="status">
 <xsd:complexType>
 <xsd:sequence>
 <xsd:element ref="ti:success"/>
 </xsd:sequence>
 </xsd:complexType>
 </xsd:element>
 </xsd:schema>
 
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 targetNamespace="http://localhost/PgnServiceRequest/publish/createTicket"
 xmlns:tns="http://localhost/PgnServiceRequest/publish/createTicket"
 xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 <xsd:import
 namespace="http://sn000046/PgnServiceRequest/publish"/>
 <xsd:complexType name="createTicket">
 <xsd:sequence>
 <xsd:element ref="ti:createTicket"/>
 <xsd:any processContents="lax"/>
 </xsd:sequence>
 <xsd:anyAttribute processContents="lax"/>
 </xsd:complexType>
 <xsd:complexType name="status">
 <xsd:sequence>
 <xsd:element ref="ti:status"/>
 <xsd:any processContents="lax"/>
 </xsd:sequence>
 <xsd:anyAttribute processContents="lax"/>
 </xsd:complexType>
 </xsd:schema>
 
 </wsdl:types>
 
 <wsdl:message name="createTicket">
 <wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 </wsdl:message>
 
 <wsdl:message name="createTicketOutput">
 <wsdl:part name="status" element="wsdns1:status"/>
 </wsdl:message>
 <wsdl:portType name="PgnServiceRequest_publishPortType">
 <wsdl:operation name="createTicket">
 <wsdl:input message="tns:createTicket"/>
 <wsdl:output message="tns:createTicketOutput"/>
 </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="PgnServiceRequest_publishBinding"
 type="tns:PgnServiceRequest_publishPortType">
 <soap:binding style="document"
 transport="http://schemas.xmlsoap.org/soap/http"/>
 <wsdl:operation name="createTicket">
 <soap:operation soapAction=""/>
 <wsdl:input>
 <soap:body use="literal"/>
 </wsdl:input>
 <wsdl:output>
 <soap:body use="literal"/>
 </wsdl:output>
 </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="PgnServiceRequest_publishService">
 <wsdl:port name="PgnServiceRequest_publishPort0"
 binding="tns:PgnServiceRequest_publishBinding">
 <soap:address location="http://sn000046:9999/soap/default"/>
 </wsdl:port>
 </wsdl:service>
 </wsdl:definitions>
 
 thanks for any suggestions.
 |  |  |  |  |  |  |  |  | 
| Re: WSDL Issues - Namespaces [message #86506 is a reply to message #85882] | Wed, 23 March 2005 14:03   |  | 
| Eclipse User  |  |  |  |  | Hi Mark, 
 prefix is just a pointer to the namespace declaration, as far as I know, the
 name of the prefix does not matter as long as it points to the same
 namespace. For example,
 
 <ti:firstname xmlns:ti="http://sn000046/PgnServiceRequest/publish"/>
 
 <q0:firstname xmlns:q0="http://sn000046/PgnServiceRequest/publish"/>
 
 Is there any reason why the prefix in the SOAP message must match the prefix
 used in the WSDL file? Any namespace aware XML parser should handle this
 correctly.
 
 As for the error messages:
 
 > IWAB0380E Errors were encountered while validating XML schemas.
 > XSD: The location '' has not been resolved
 > XSD: Element reference
 > 'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 > XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 > is unresolved
 > IWAB0381I
 >
 file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 > was successfully opened.
 
 They are harmless and have nothing to do with the prefix issue you mention
 above. The technical answer to the error message is... The Web Services
 Explorer uses the XSD parser to parse the <xsd:schema>...</xsd:schema>
 elements defined in the WSDL file. The XSD parser can only parse one
 <xsd:schema/> element at a time. If you take a look at the WSDL file below,
 there are two <xsd:schema/> elements in it. Therefore, the Explorer needs to
 run the XSD parser twice. The problem is that the XSD parser does not allow
 you to store any meta information about other <xsd:schema/> elements, it
 only knows about the <xsd:schema/> element that it is currently parsing.
 What this means is that if the two <xsd:schema/> elements have references to
 each other, the XSD parser does not know about such reference and will
 therefore throw an warning/error back to the caller (the Explorer) saying
 you have an unresolvable reference. This is not true because the Explorer
 knows that there are two <xsd:schema/> elements, and the Explorer has some
 custom logic to handle this situation... However, when the Explorer receives
 a warning/error from the XSD parser, there's no way to tell whether they are
 legitimate error messages or they are really limitation mentioned above. The
 decision was to leave the message in because we don't want to suppress any
 legitimate errors by accident. Hope this helps.
 
 Thanks,
 
 Jeff
 
 "Mark Griffin" <mark.griffin@pgnmail.com> wrote in message
 news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org...
 > I'm having some issues with a WSDL file I'm using.  Eclipse/webtools seems
 > to be ignoring the namespace prefix within the wsdl file when I bring it
 > into eclipse.  I can successfully invoke the webservice via the Web
 > Services Explorer. But it inserts its own prefix instead of what is
 > defined in the WSDL file.  It uses "q0" instead of what is in the WSDL.
 > I'm having the same problem with the IBM WSAD version except it is using
 > "p2" as the prefix and ignoring what is in the WSDL file.
 >
 > This is the error that I get when trying to create a web service from the
 > wsdl.
 >
 > IWAB0380E Errors were encountered while validating XML schemas.
 > XSD: The location '' has not been resolved
 > XSD: Element reference
 > 'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 > XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 > is unresolved
 > IWAB0381I
 >
 file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 > was successfully opened.
 >
 > Here is the WSDL I used.  Is there something in the WSDL that is causing
 > this problem. I'm not having any issues getting it to work with .Net. I
 > sure would like it better in Java though.
 >
 >
 >
 > <?xml version="1.0" encoding="UTF-8"?>
 > <wsdl:definitions name="PgnServiceRequest_publish"
 > targetNamespace="http://sn000046/PgnServiceRequest/publish/"
 > xmlns:webM="http://www.webMethods.com/noNamespace/"
 > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
 > xmlns:tns="http://sn000046/PgnServiceRequest/publish/"
 > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 > xmlns:wsdns1="http://sn000046/PgnServiceRequest/publish"
 > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 > <wsdl:types>
 >         <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 > targetNamespace="http://sn000046/PgnServiceRequest/publish"
 > xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >           <xsd:element name="firstname" type="xsd:string"/>
 >           <xsd:element name="lastname" type="xsd:string"/>
 >           <xsd:element name="employeenumber" type="xsd:string"/>
 >           <xsd:element name="problemcode" type="xsd:string"/>
 >           <xsd:element name="problemdescription" type="xsd:string"/>
 >           <xsd:element name="contact" type="xsd:string"/>
 >           <xsd:element name="createTicket">
 >             <xsd:complexType>
 >               <xsd:sequence>
 >                 <xsd:element ref="ti:firstname"/>
 >                 <xsd:element ref="ti:lastname"/>
 >                 <xsd:element ref="ti:employeenumber"/>
 >                 <xsd:element ref="ti:problemcode"/>
 >                 <xsd:element ref="ti:problemdescription"/>
 >                 <xsd:element ref="ti:contact"/>
 >               </xsd:sequence>
 >             </xsd:complexType>
 >           </xsd:element>
 >           <xsd:element name="success" type="xsd:string"/>
 >           <xsd:element name="status">
 >             <xsd:complexType>
 >               <xsd:sequence>
 >                 <xsd:element ref="ti:success"/>
 >               </xsd:sequence>
 >             </xsd:complexType>
 >           </xsd:element>
 >         </xsd:schema>
 >
 >         <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 > targetNamespace="http://localhost/PgnServiceRequest/publish/createTicket"
 > xmlns:tns="http://localhost/PgnServiceRequest/publish/createTicket"
 > xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >           <xsd:import
 > namespace="http://sn000046/PgnServiceRequest/publish"/>
 >           <xsd:complexType name="createTicket">
 >             <xsd:sequence>
 >               <xsd:element ref="ti:createTicket"/>
 >               <xsd:any processContents="lax"/>
 >             </xsd:sequence>
 >             <xsd:anyAttribute processContents="lax"/>
 >           </xsd:complexType>
 >           <xsd:complexType name="status">
 >             <xsd:sequence>
 >               <xsd:element ref="ti:status"/>
 >               <xsd:any processContents="lax"/>
 >             </xsd:sequence>
 >             <xsd:anyAttribute processContents="lax"/>
 >           </xsd:complexType>
 >         </xsd:schema>
 >
 > </wsdl:types>
 >
 > <wsdl:message name="createTicket">
 > <wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 > </wsdl:message>
 >
 > <wsdl:message name="createTicketOutput">
 > <wsdl:part name="status" element="wsdns1:status"/>
 > </wsdl:message>
 > <wsdl:portType name="PgnServiceRequest_publishPortType">
 > <wsdl:operation name="createTicket">
 > <wsdl:input message="tns:createTicket"/>
 > <wsdl:output message="tns:createTicketOutput"/>
 > </wsdl:operation>
 > </wsdl:portType>
 > <wsdl:binding name="PgnServiceRequest_publishBinding"
 > type="tns:PgnServiceRequest_publishPortType">
 > <soap:binding style="document"
 > transport="http://schemas.xmlsoap.org/soap/http"/>
 > <wsdl:operation name="createTicket">
 > <soap:operation soapAction=""/>
 > <wsdl:input>
 > <soap:body use="literal"/>
 > </wsdl:input>
 > <wsdl:output>
 > <soap:body use="literal"/>
 > </wsdl:output>
 > </wsdl:operation>
 > </wsdl:binding>
 > <wsdl:service name="PgnServiceRequest_publishService">
 > <wsdl:port name="PgnServiceRequest_publishPort0"
 > binding="tns:PgnServiceRequest_publishBinding">
 > <soap:address location="http://sn000046:9999/soap/default"/>
 > </wsdl:port>
 > </wsdl:service>
 > </wsdl:definitions>
 >
 > thanks for any suggestions.
 >
 |  |  |  |  | 
| Re: WSDL Issues - Namespaces [message #86660 is a reply to message #86506] | Wed, 23 March 2005 20:41   |  | 
| Eclipse User  |  |  |  |  | Thanks Jeff, this helps. It's causing a minor problem in the product I'm using to parse the soap messages with. I'm querying on the element but
 I'm not supplying the prefix. When a prefix shows up it causes the query
 to fail. The difference being firstname versus q0:firstname or in
 websphere's case p2:firstname .  I can work around this I believe, but
 I'm curious as to why the products would not just use what is defined in
 the WSDL document.
 
 I confess I'm pretty much a novice at this stage in working with soap
 and wsdl.  Is it possible that this could cause problems when multiple
 clients(various technologies) are accessing a web services interface and
 all send their own version of the prefix?  ie the soap message may
 contain two firstname elements that are namespace qualified but the
 particular web service may be interested in only a certain one.  Would
 it not need to know how to find that element? Sorry if this is a basic
 question.
 
 markg
 
 
 Jeff Liu wrote:
 > Hi Mark,
 >
 > prefix is just a pointer to the namespace declaration, as far as I know, the
 > name of the prefix does not matter as long as it points to the same
 > namespace. For example,
 >
 > <ti:firstname xmlns:ti="http://sn000046/PgnServiceRequest/publish"/>
 >
 > <q0:firstname xmlns:q0="http://sn000046/PgnServiceRequest/publish"/>
 >
 > Is there any reason why the prefix in the SOAP message must match the prefix
 > used in the WSDL file? Any namespace aware XML parser should handle this
 > correctly.
 >
 > As for the error messages:
 >
 >
 >>IWAB0380E Errors were encountered while validating XML schemas.
 >>XSD: The location '' has not been resolved
 >>XSD: Element reference
 >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 >>XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 >>is unresolved
 >>IWAB0381I
 >>
 >
 >  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 >
 >>was successfully opened.
 >
 >
 > They are harmless and have nothing to do with the prefix issue you mention
 > above. The technical answer to the error message is... The Web Services
 > Explorer uses the XSD parser to parse the <xsd:schema>...</xsd:schema>
 > elements defined in the WSDL file. The XSD parser can only parse one
 > <xsd:schema/> element at a time. If you take a look at the WSDL file below,
 > there are two <xsd:schema/> elements in it. Therefore, the Explorer needs to
 > run the XSD parser twice. The problem is that the XSD parser does not allow
 > you to store any meta information about other <xsd:schema/> elements, it
 > only knows about the <xsd:schema/> element that it is currently parsing.
 > What this means is that if the two <xsd:schema/> elements have references to
 > each other, the XSD parser does not know about such reference and will
 > therefore throw an warning/error back to the caller (the Explorer) saying
 > you have an unresolvable reference. This is not true because the Explorer
 > knows that there are two <xsd:schema/> elements, and the Explorer has some
 > custom logic to handle this situation... However, when the Explorer receives
 > a warning/error from the XSD parser, there's no way to tell whether they are
 > legitimate error messages or they are really limitation mentioned above. The
 > decision was to leave the message in because we don't want to suppress any
 > legitimate errors by accident. Hope this helps.
 >
 > Thanks,
 >
 > Jeff
 >
 > "Mark Griffin" <mark.griffin@pgnmail.com> wrote in message
 > news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org...
 >
 >>I'm having some issues with a WSDL file I'm using.  Eclipse/webtools seems
 >>to be ignoring the namespace prefix within the wsdl file when I bring it
 >>into eclipse.  I can successfully invoke the webservice via the Web
 >>Services Explorer. But it inserts its own prefix instead of what is
 >>defined in the WSDL file.  It uses "q0" instead of what is in the WSDL.
 >>I'm having the same problem with the IBM WSAD version except it is using
 >>"p2" as the prefix and ignoring what is in the WSDL file.
 >>
 >>This is the error that I get when trying to create a web service from the
 >>wsdl.
 >>
 >>IWAB0380E Errors were encountered while validating XML schemas.
 >>XSD: The location '' has not been resolved
 >>XSD: Element reference
 >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 >>XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 >>is unresolved
 >>IWAB0381I
 >>
 >
 >  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 >
 >>was successfully opened.
 >>
 >>Here is the WSDL I used.  Is there something in the WSDL that is causing
 >>this problem. I'm not having any issues getting it to work with .Net. I
 >>sure would like it better in Java though.
 >>
 >>
 >>
 >><?xml version="1.0" encoding="UTF-8"?>
 >><wsdl:definitions name="PgnServiceRequest_publish"
 >>targetNamespace="http://sn000046/PgnServiceRequest/publish/"
 >>xmlns:webM="http://www.webMethods.com/noNamespace/"
 >>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 >>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
 >>xmlns:tns="http://sn000046/PgnServiceRequest/publish/"
 >>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 >>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 >>xmlns:wsdns1="http://sn000046/PgnServiceRequest/publish"
 >>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 >><wsdl:types>
 >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >>targetNamespace="http://sn000046/PgnServiceRequest/publish"
 >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >>          <xsd:element name="firstname" type="xsd:string"/>
 >>          <xsd:element name="lastname" type="xsd:string"/>
 >>          <xsd:element name="employeenumber" type="xsd:string"/>
 >>          <xsd:element name="problemcode" type="xsd:string"/>
 >>          <xsd:element name="problemdescription" type="xsd:string"/>
 >>          <xsd:element name="contact" type="xsd:string"/>
 >>          <xsd:element name="createTicket">
 >>            <xsd:complexType>
 >>              <xsd:sequence>
 >>                <xsd:element ref="ti:firstname"/>
 >>                <xsd:element ref="ti:lastname"/>
 >>                <xsd:element ref="ti:employeenumber"/>
 >>                <xsd:element ref="ti:problemcode"/>
 >>                <xsd:element ref="ti:problemdescription"/>
 >>                <xsd:element ref="ti:contact"/>
 >>              </xsd:sequence>
 >>            </xsd:complexType>
 >>          </xsd:element>
 >>          <xsd:element name="success" type="xsd:string"/>
 >>          <xsd:element name="status">
 >>            <xsd:complexType>
 >>              <xsd:sequence>
 >>                <xsd:element ref="ti:success"/>
 >>              </xsd:sequence>
 >>            </xsd:complexType>
 >>          </xsd:element>
 >>        </xsd:schema>
 >>
 >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >>targetNamespace="http://localhost/PgnServiceRequest/publish/createTicket"
 >>xmlns:tns="http://localhost/PgnServiceRequest/publish/createTicket"
 >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >>          <xsd:import
 >>namespace="http://sn000046/PgnServiceRequest/publish"/>
 >>          <xsd:complexType name="createTicket">
 >>            <xsd:sequence>
 >>              <xsd:element ref="ti:createTicket"/>
 >>              <xsd:any processContents="lax"/>
 >>            </xsd:sequence>
 >>            <xsd:anyAttribute processContents="lax"/>
 >>          </xsd:complexType>
 >>          <xsd:complexType name="status">
 >>            <xsd:sequence>
 >>              <xsd:element ref="ti:status"/>
 >>              <xsd:any processContents="lax"/>
 >>            </xsd:sequence>
 >>            <xsd:anyAttribute processContents="lax"/>
 >>          </xsd:complexType>
 >>        </xsd:schema>
 >>
 >></wsdl:types>
 >>
 >><wsdl:message name="createTicket">
 >><wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 >></wsdl:message>
 >>
 >><wsdl:message name="createTicketOutput">
 >><wsdl:part name="status" element="wsdns1:status"/>
 >></wsdl:message>
 >><wsdl:portType name="PgnServiceRequest_publishPortType">
 >><wsdl:operation name="createTicket">
 >><wsdl:input message="tns:createTicket"/>
 >><wsdl:output message="tns:createTicketOutput"/>
 >></wsdl:operation>
 >></wsdl:portType>
 >><wsdl:binding name="PgnServiceRequest_publishBinding"
 >>type="tns:PgnServiceRequest_publishPortType">
 >><soap:binding style="document"
 >>transport="http://schemas.xmlsoap.org/soap/http"/>
 >><wsdl:operation name="createTicket">
 >><soap:operation soapAction=""/>
 >><wsdl:input>
 >><soap:body use="literal"/>
 >></wsdl:input>
 >><wsdl:output>
 >><soap:body use="literal"/>
 >></wsdl:output>
 >></wsdl:operation>
 >></wsdl:binding>
 >><wsdl:service name="PgnServiceRequest_publishService">
 >><wsdl:port name="PgnServiceRequest_publishPort0"
 >>binding="tns:PgnServiceRequest_publishBinding">
 >><soap:address location="http://sn000046:9999/soap/default"/>
 >></wsdl:port>
 >></wsdl:service>
 >></wsdl:definitions>
 >>
 >>thanks for any suggestions.
 >>
 >
 >
 >
 |  |  |  |  | 
| Re: WSDL Issues - Namespaces [message #86996 is a reply to message #86660] | Thu, 24 March 2005 14:05   |  | 
| Eclipse User  |  |  |  |  | --------------7663F748B8962C5FFD0C05DC Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Mark,
 there are no basic questions when it comes to Schema. The short answer to your question is
 that the value of the prefix itself is not significant outside of the document within which it
 is used. It's the namespace bound to the prefix that matters. Since the WSDL and the SOAP
 documents are distinct from one another, they are free to use whatever prefixes they want
 independent of each other.
 
 From the W3C Namespaces in XML 1.1 spec [1]: "Note that the prefix functions only as a
 placeholder for a namespace name. Applications SHOULD use the namespace name, not the prefix,
 in constructing names whose scope extends beyond the containing document."
 
 [1] http://www.w3.org/TR/xml-names11/
 
 Cheers - CB.
 
 Griffin wrote:
 
 > Thanks Jeff, this helps. It's causing a minor problem in the product I'm
 > using to parse the soap messages with. I'm querying on the element but
 > I'm not supplying the prefix. When a prefix shows up it causes the query
 > to fail. The difference being firstname versus q0:firstname or in
 > websphere's case p2:firstname .  I can work around this I believe, but
 > I'm curious as to why the products would not just use what is defined in
 > the WSDL document.
 >
 > I confess I'm pretty much a novice at this stage in working with soap
 > and wsdl.  Is it possible that this could cause problems when multiple
 > clients(various technologies) are accessing a web services interface and
 > all send their own version of the prefix?  ie the soap message may
 > contain two firstname elements that are namespace qualified but the
 > particular web service may be interested in only a certain one.  Would
 > it not need to know how to find that element? Sorry if this is a basic
 > question.
 >
 > markg
 >
 > Jeff Liu wrote:
 > > Hi Mark,
 > >
 > > prefix is just a pointer to the namespace declaration, as far as I know, the
 > > name of the prefix does not matter as long as it points to the same
 > > namespace. For example,
 > >
 > > <ti:firstname xmlns:ti="http://sn000046/PgnServiceRequest/publish"/>
 > >
 > > <q0:firstname xmlns:q0="http://sn000046/PgnServiceRequest/publish"/>
 > >
 > > Is there any reason why the prefix in the SOAP message must match the prefix
 > > used in the WSDL file? Any namespace aware XML parser should handle this
 > > correctly.
 > >
 > > As for the error messages:
 > >
 > >
 > >>IWAB0380E Errors were encountered while validating XML schemas.
 > >>XSD: The location '' has not been resolved
 > >>XSD: Element reference
 > >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 > >>XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 > >>is unresolved
 > >>IWAB0381I
 > >>
 > >
 > >  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 > >
 > >>was successfully opened.
 > >
 > >
 > > They are harmless and have nothing to do with the prefix issue you mention
 > > above. The technical answer to the error message is... The Web Services
 > > Explorer uses the XSD parser to parse the <xsd:schema>...</xsd:schema>
 > > elements defined in the WSDL file. The XSD parser can only parse one
 > > <xsd:schema/> element at a time. If you take a look at the WSDL file below,
 > > there are two <xsd:schema/> elements in it. Therefore, the Explorer needs to
 > > run the XSD parser twice. The problem is that the XSD parser does not allow
 > > you to store any meta information about other <xsd:schema/> elements, it
 > > only knows about the <xsd:schema/> element that it is currently parsing.
 > > What this means is that if the two <xsd:schema/> elements have references to
 > > each other, the XSD parser does not know about such reference and will
 > > therefore throw an warning/error back to the caller (the Explorer) saying
 > > you have an unresolvable reference. This is not true because the Explorer
 > > knows that there are two <xsd:schema/> elements, and the Explorer has some
 > > custom logic to handle this situation... However, when the Explorer receives
 > > a warning/error from the XSD parser, there's no way to tell whether they are
 > > legitimate error messages or they are really limitation mentioned above. The
 > > decision was to leave the message in because we don't want to suppress any
 > > legitimate errors by accident. Hope this helps.
 > >
 > > Thanks,
 > >
 > > Jeff
 > >
 > > "Mark Griffin" <mark.griffin@pgnmail.com> wrote in message
 > > news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org...
 > >
 > >>I'm having some issues with a WSDL file I'm using.  Eclipse/webtools seems
 > >>to be ignoring the namespace prefix within the wsdl file when I bring it
 > >>into eclipse.  I can successfully invoke the webservice via the Web
 > >>Services Explorer. But it inserts its own prefix instead of what is
 > >>defined in the WSDL file.  It uses "q0" instead of what is in the WSDL.
 > >>I'm having the same problem with the IBM WSAD version except it is using
 > >>"p2" as the prefix and ignoring what is in the WSDL file.
 > >>
 > >>This is the error that I get when trying to create a web service from the
 > >>wsdl.
 > >>
 > >>IWAB0380E Errors were encountered while validating XML schemas.
 > >>XSD: The location '' has not been resolved
 > >>XSD: Element reference
 > >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 > >>XSD: Element reference 'http://sn000046/PgnServiceRequest/publish#status'
 > >>is unresolved
 > >>IWAB0381I
 > >>
 > >
 > >  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 > >
 > >>was successfully opened.
 > >>
 > >>Here is the WSDL I used.  Is there something in the WSDL that is causing
 > >>this problem. I'm not having any issues getting it to work with .Net. I
 > >>sure would like it better in Java though.
 > >>
 > >>
 > >>
 > >><?xml version="1.0" encoding="UTF-8"?>
 > >><wsdl:definitions name="PgnServiceRequest_publish"
 > >>targetNamespace="http://sn000046/PgnServiceRequest/publish/"
 > >>xmlns:webM="http://www.webMethods.com/noNamespace/"
 > >>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 > >>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
 > >>xmlns:tns="http://sn000046/PgnServiceRequest/publish/"
 > >>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 > >>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 > >>xmlns:wsdns1="http://sn000046/PgnServiceRequest/publish"
 > >>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 > >><wsdl:types>
 > >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 > >>targetNamespace="http://sn000046/PgnServiceRequest/publish"
 > >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 > >>          <xsd:element name="firstname" type="xsd:string"/>
 > >>          <xsd:element name="lastname" type="xsd:string"/>
 > >>          <xsd:element name="employeenumber" type="xsd:string"/>
 > >>          <xsd:element name="problemcode" type="xsd:string"/>
 > >>          <xsd:element name="problemdescription" type="xsd:string"/>
 > >>          <xsd:element name="contact" type="xsd:string"/>
 > >>          <xsd:element name="createTicket">
 > >>            <xsd:complexType>
 > >>              <xsd:sequence>
 > >>                <xsd:element ref="ti:firstname"/>
 > >>                <xsd:element ref="ti:lastname"/>
 > >>                <xsd:element ref="ti:employeenumber"/>
 > >>                <xsd:element ref="ti:problemcode"/>
 > >>                <xsd:element ref="ti:problemdescription"/>
 > >>                <xsd:element ref="ti:contact"/>
 > >>              </xsd:sequence>
 > >>            </xsd:complexType>
 > >>          </xsd:element>
 > >>          <xsd:element name="success" type="xsd:string"/>
 > >>          <xsd:element name="status">
 > >>            <xsd:complexType>
 > >>              <xsd:sequence>
 > >>                <xsd:element ref="ti:success"/>
 > >>              </xsd:sequence>
 > >>            </xsd:complexType>
 > >>          </xsd:element>
 > >>        </xsd:schema>
 > >>
 > >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 > >>targetNamespace="http://localhost/PgnServiceRequest/publish/createTicket"
 > >>xmlns:tns="http://localhost/PgnServiceRequest/publish/createTicket"
 > >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 > >>          <xsd:import
 > >>namespace="http://sn000046/PgnServiceRequest/publish"/>
 > >>          <xsd:complexType name="createTicket">
 > >>            <xsd:sequence>
 > >>              <xsd:element ref="ti:createTicket"/>
 > >>              <xsd:any processContents="lax"/>
 > >>            </xsd:sequence>
 > >>            <xsd:anyAttribute processContents="lax"/>
 > >>          </xsd:complexType>
 > >>          <xsd:complexType name="status">
 > >>            <xsd:sequence>
 > >>              <xsd:element ref="ti:status"/>
 > >>              <xsd:any processContents="lax"/>
 > >>            </xsd:sequence>
 > >>            <xsd:anyAttribute processContents="lax"/>
 > >>          </xsd:complexType>
 > >>        </xsd:schema>
 > >>
 > >></wsdl:types>
 > >>
 > >><wsdl:message name="createTicket">
 > >><wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 > >></wsdl:message>
 > >>
 > >><wsdl:message name="createTicketOutput">
 > >><wsdl:part name="status" element="wsdns1:status"/>
 > >></wsdl:message>
 > >><wsdl:portType name="PgnServiceRequest_publishPortType">
 > >><wsdl:operation name="createTicket">
 > >><wsdl:input message="tns:createTicket"/>
 > >><wsdl:output message="tns:createTicketOutput"/>
 > >></wsdl:operation>
 > >></wsdl:portType>
 > >><wsdl:binding name="PgnServiceRequest_publishBinding"
 > >>type="tns:PgnServiceRequest_publishPortType">
 > >><soap:binding style="document"
 > >>transport="http://schemas.xmlsoap.org/soap/http"/>
 > >><wsdl:operation name="createTicket">
 > >><soap:operation soapAction=""/>
 > >><wsdl:input>
 > >><soap:body use="literal"/>
 > >></wsdl:input>
 > >><wsdl:output>
 > >><soap:body use="literal"/>
 > >></wsdl:output>
 > >></wsdl:operation>
 > >></wsdl:binding>
 > >><wsdl:service name="PgnServiceRequest_publishService">
 > >><wsdl:port name="PgnServiceRequest_publishPort0"
 > >>binding="tns:PgnServiceRequest_publishBinding">
 > >><soap:address location="http://sn000046:9999/soap/default"/>
 > >></wsdl:port>
 > >></wsdl:service>
 > >></wsdl:definitions>
 > >>
 > >>thanks for any suggestions.
 > >>
 > >
 > >
 > >
 
 --------------7663F748B8962C5FFD0C05DC
 Content-Type: text/html; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
 Mark,
 <br>there are no basic questions when it comes to Schema. The short answer
 to your question is that the value of the prefix itself is not significant
 outside of the document within which it is used. It's the namespace bound
 to the prefix that matters. Since the WSDL and the SOAP documents are distinct
 from one another, they are free to use whatever prefixes they want independent
 of each other.
 <p>From the W3C Namespaces in XML 1.1 spec [1]: "Note that the prefix functions
 only as a placeholder for a namespace name. Applications SHOULD use the
 namespace name, not the prefix, in constructing names whose scope extends
 beyond the containing document."
 <p>[1] <A HREF="http://www.w3.org/TR/xml-names11/">http://www.w3.org/TR/xml-names11/</A>
 <p>Cheers - CB.
 <p>Griffin wrote:
 <blockquote TYPE=CITE>Thanks Jeff, this helps. It's causing a minor problem
 in the product I'm
 <br>using to parse the soap messages with. I'm querying on the element
 but
 <br>I'm not supplying the prefix. When a prefix shows up it causes the
 query
 <br>to fail. The difference being firstname versus q0:firstname or in
 <br>websphere's case p2:firstname .  I can work around this I believe,
 but
 <br>I'm curious as to why the products would not just use what is defined
 in
 <br>the WSDL document.
 <p>I confess I'm pretty much a novice at this stage in working with soap
 <br>and wsdl.  Is it possible that this could cause problems when
 multiple
 <br>clients(various technologies) are accessing a web services interface
 and
 <br>all send their own version of the prefix?  ie the soap message
 may
 <br>contain two firstname elements that are namespace qualified but the
 <br>particular web service may be interested in only a certain one. 
 Would
 <br>it not need to know how to find that element? Sorry if this is a basic
 <br>question.
 <p>markg
 <p>Jeff Liu wrote:
 <br>> Hi Mark,
 <br>>
 <br>> prefix is just a pointer to the namespace declaration, as far as
 I know, the
 <br>> name of the prefix does not matter as long as it points to the same
 <br>> namespace. For example,
 <br>>
 <br>> <ti:firstname xmlns:ti="<a href="http://sn000046/PgnServiceRequest/publish" /">http://sn000046/PgnServiceRequest/publish"/</a>>
 <br>>
 <br>> <q0:firstname xmlns:q0="<a href="http://sn000046/PgnServiceRequest/publish" /">http://sn000046/PgnServiceRequest/publish"/</a>>
 <br>>
 <br>> Is there any reason why the prefix in the SOAP message must match
 the prefix
 <br>> used in the WSDL file? Any namespace aware XML parser should handle
 this
 <br>> correctly.
 <br>>
 <br>> As for the error messages:
 <br>>
 <br>>
 <br>>>IWAB0380E Errors were encountered while validating XML schemas.
 <br>>>XSD: The location '' has not been resolved
 <br>>>XSD: Element reference
 <br>>>'<a href="http://sn000046/PgnServiceRequest/publish#createTicket">http://sn000046/PgnServiceRequest/publish#createTicket</a>'
 is unresolved
 <br>>>XSD: Element reference '<a href="http://sn000046/PgnServiceRequest/publish#status">http://sn000046/PgnServiceRequest/publish#status</a>'
 <br>>>is unresolved
 <br>>>IWAB0381I
 <br>>>
 <br>>
 <br>> <a href=" file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl "> file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl </a>
 <br>>
 <br>>>was successfully opened.
 <br>>
 <br>>
 <br>> They are harmless and have nothing to do with the prefix issue you
 mention
 <br>> above. The technical answer to the error message is... The Web Services
 <br>> Explorer uses the XSD parser to parse the <xsd:schema>...</xsd:schema>
 <br>> elements defined in the WSDL file. The XSD parser can only parse
 one
 <br>> <xsd:schema/> element at a time. If you take a look at the WSDL
 file below,
 <br>> there are two <xsd:schema/> elements in it. Therefore, the Explorer
 needs to
 <br>> run the XSD parser twice. The problem is that the XSD parser does
 not allow
 <br>> you to store any meta information about other <xsd:schema/> elements,
 it
 <br>> only knows about the <xsd:schema/> element that it is currently
 parsing.
 <br>> What this means is that if the two <xsd:schema/> elements have
 references to
 <br>> each other, the XSD parser does not know about such reference and
 will
 <br>> therefore throw an warning/error back to the caller (the Explorer)
 saying
 <br>> you have an unresolvable reference. This is not true because the
 Explorer
 <br>> knows that there are two <xsd:schema/> elements, and the Explorer
 has some
 <br>> custom logic to handle this situation... However, when the Explorer
 receives
 <br>> a warning/error from the XSD parser, there's no way to tell whether
 they are
 <br>> legitimate error messages or they are really limitation mentioned
 above. The
 <br>> decision was to leave the message in because we don't want to suppress
 any
 <br>> legitimate errors by accident. Hope this helps.
 <br>>
 <br>> Thanks,
 <br>>
 <br>> Jeff
 <br>>
 <br>> "Mark Griffin" <mark.griffin@pgnmail.com> wrote in message
 <br>> <a href="news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org">news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org</a>...
 <br>>
 <br>>>I'm having some issues with a WSDL file I'm using.  Eclipse/webtools
 seems
 <br>>>to be ignoring the namespace prefix within the wsdl file when I bring
 it
 <br>>>into eclipse.  I can successfully invoke the webservice via
 the Web
 <br>>>Services Explorer. But it inserts its own prefix instead of what
 is
 <br>>>defined in the WSDL file.  It uses "q0" instead of what is in
 the WSDL.
 <br>>>I'm having the same problem with the IBM WSAD version except it is
 using
 <br>>>"p2" as the prefix and ignoring what is in the WSDL file.
 <br>>>
 <br>>>This is the error that I get when trying to create a web service
 from the
 <br>>>wsdl.
 <br>>>
 <br>>>IWAB0380E Errors were encountered while validating XML schemas.
 <br>>>XSD: The location '' has not been resolved
 <br>>>XSD: Element reference
 <br>>>'<a href="http://sn000046/PgnServiceRequest/publish#createTicket">http://sn000046/PgnServiceRequest/publish#createTicket</a>'
 is unresolved
 <br>>>XSD: Element reference '<a href="http://sn000046/PgnServiceRequest/publish#status">http://sn000046/PgnServiceRequest/publish#status</a>'
 <br>>>is unresolved
 <br>>>IWAB0381I
 <br>>>
 <br>>
 <br>> <a href=" file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl "> file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl </a>
 <br>>
 <br>>>was successfully opened.
 <br>>>
 <br>>>Here is the WSDL I used.  Is there something in the WSDL that
 is causing
 <br>>>this problem. I'm not having any issues getting it to work with .Net.
 I
 <br>>>sure would like it better in Java though.
 <br>>>
 <br>>>
 <br>>>
 <br>>><?xml version="1.0" encoding="UTF-8"?>
 <br>>><wsdl:definitions name="PgnServiceRequest_publish"
 <br>>>targetNamespace="<a href="http://sn000046/PgnServiceRequest/publish/">http://sn000046/PgnServiceRequest/publish/</a>"
 <br>>>xmlns:webM="<a href="http://www.webMethods.com/noNamespace/">http://www.webMethods.com/noNamespace/</a>"
 <br>>>xmlns:soap="<a href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl/soap/</a>"
 <br>>>xmlns:mime="<a href="http://schemas.xmlsoap.org/wsdl/mime/">http://schemas.xmlsoap.org/wsdl/mime/</a>"
 <br>>>xmlns:tns="<a href="http://sn000046/PgnServiceRequest/publish/">http://sn000046/PgnServiceRequest/publish/</a>"
 <br>>>xmlns:wsdl="<a href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>"
 <br>>>xmlns:http="<a href="http://schemas.xmlsoap.org/wsdl/http/">http://schemas.xmlsoap.org/wsdl/http/</a>"
 <br>>>xmlns:wsdns1="<a href="http://sn000046/PgnServiceRequest/publish">http://sn000046/PgnServiceRequest/publish</a>"
 <br>>>xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>">
 <br>>><wsdl:types>
 <br>>>          <xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
 <br>>>targetNamespace="<a href="http://sn000046/PgnServiceRequest/publish">http://sn000046/PgnServiceRequest/publish</a>"
 <br>>>xmlns:ti="<a href="http://sn000046/PgnServiceRequest/publish">http://sn000046/PgnServiceRequest/publish</a>">
 <br>>>            <xsd:element
 name="firstname" type="xsd:string"/>
 <br>>>            <xsd:element
 name="lastname" type="xsd:string"/>
 <br>>>            <xsd:element
 name="employeenumber" type="xsd:string"/>
 <br>>>            <xsd:element
 name="problemcode" type="xsd:string"/>
 <br>>>            <xsd:element
 name="problemdescription" type="xsd:string"/>
 <br>>>            <xsd:element
 name="contact" type="xsd:string"/>
 <br>>>            <xsd:element
 name="createTicket">
 <br>>>             
 <xsd:complexType>
 <br>>>                
 <xsd:sequence>
 <br>>>                  
 <xsd:element ref="ti:firstname"/>
 <br>>>                  
 <xsd:element ref="ti:lastname"/>
 <br>>>                  
 <xsd:element ref="ti:employeenumber"/>
 <br>>>                  
 <xsd:element ref="ti:problemcode"/>
 <br>>>                  
 <xsd:element ref="ti:problemdescription"/>
 <br>>>                  
 <xsd:element ref="ti:contact"/>
 <br>>>                
 </xsd:sequence>
 <br>>>             
 </xsd:complexType>
 <br>>>            </xsd:element>
 <br>>>            <xsd:element
 name="success" type="xsd:string"/>
 <br>>>            <xsd:element
 name="status">
 <br>>>             
 <xsd:complexType>
 <br>>>                
 <xsd:sequence>
 <br>>>                  
 <xsd:element ref="ti:success"/>
 <br>>>                
 </xsd:sequence>
 <br>>>             
 </xsd:complexType>
 <br>>>            </xsd:element>
 <br>>>          </xsd:schema>
 <br>>>
 <br>>>          <xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
 <br>>>targetNamespace="<a href="http://localhost/PgnServiceRequest/publish/createTicket">http://localhost/PgnServiceRequest/publish/createTicket</a>"
 <br>>>xmlns:tns="<a href="http://localhost/PgnServiceRequest/publish/createTicket">http://localhost/PgnServiceRequest/publish/createTicket</a>"
 <br>>>xmlns:ti="<a href="http://sn000046/PgnServiceRequest/publish">http://sn000046/PgnServiceRequest/publish</a>">
 <br>>>            <xsd:import
 <br>>>namespace="<a href="http://sn000046/PgnServiceRequest/publish" /">http://sn000046/PgnServiceRequest/publish"/</a>>
 <br>>>            <xsd:complexType
 name="createTicket">
 <br>>>             
 <xsd:sequence>
 <br>>>                
 <xsd:element ref="ti:createTicket"/>
 <br>>>                
 <xsd:any processContents="lax"/>
 <br>>>             
 </xsd:sequence>
 <br>>>             
 <xsd:anyAttribute processContents="lax"/>
 <br>>>            </xsd:complexType>
 <br>>>            <xsd:complexType
 name="status">
 <br>>>             
 <xsd:sequence>
 <br>>>                
 <xsd:element ref="ti:status"/>
 <br>>>                
 <xsd:any processContents="lax"/>
 <br>>>             
 </xsd:sequence>
 <br>>>             
 <xsd:anyAttribute processContents="lax"/>
 <br>>>            </xsd:complexType>
 <br>>>          </xsd:schema>
 <br>>>
 <br>>></wsdl:types>
 <br>>>
 <br>>><wsdl:message name="createTicket">
 <br>>><wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 <br>>></wsdl:message>
 <br>>>
 <br>>><wsdl:message name="createTicketOutput">
 <br>>><wsdl:part name="status" element="wsdns1:status"/>
 <br>>></wsdl:message>
 <br>>><wsdl:portType name="PgnServiceRequest_publishPortType">
 <br>>><wsdl:operation name="createTicket">
 <br>>><wsdl:input message="tns:createTicket"/>
 <br>>><wsdl:output message="tns:createTicketOutput"/>
 <br>>></wsdl:operation>
 <br>>></wsdl:portType>
 <br>>><wsdl:binding name="PgnServiceRequest_publishBinding"
 <br>>>type="tns:PgnServiceRequest_publishPortType">
 <br>>><soap:binding style="document"
 <br>>>transport="<a href="http://schemas.xmlsoap.org/soap/http" /">http://schemas.xmlsoap.org/soap/http"/</a>>
 <br>>><wsdl:operation name="createTicket">
 <br>>><soap:operation soapAction=""/>
 <br>>><wsdl:input>
 <br>>><soap:body use="literal"/>
 <br>>></wsdl:input>
 <br>>><wsdl:output>
 <br>>><soap:body use="literal"/>
 <br>>></wsdl:output>
 <br>>></wsdl:operation>
 <br>>></wsdl:binding>
 <br>>><wsdl:service name="PgnServiceRequest_publishService">
 <br>>><wsdl:port name="PgnServiceRequest_publishPort0"
 <br>>>binding="tns:PgnServiceRequest_publishBinding">
 <br>>><soap:address location="<a href="http://sn000046:9999/soap/default" /">http://sn000046:9999/soap/default"/</a>>
 <br>>></wsdl:port>
 <br>>></wsdl:service>
 <br>>></wsdl:definitions>
 <br>>>
 <br>>>thanks for any suggestions.
 <br>>>
 <br>>
 <br>>
 <br>></blockquote>
 </html>
 
 --------------7663F748B8962C5FFD0C05DC--
 |  |  |  |  |  |  | 
| Re: WSDL Issues - Namespaces [message #87058 is a reply to message #86996] | Thu, 24 March 2005 14:32  |  | 
| Eclipse User  |  |  |  |  | Thanks Chris. This is starting to make more sense. 
 I got around the prefix issue by using a wildcard in the xql query for
 my interface.
 
 Thanks again for the quick response it really helped me understand this
 namespace structure.
 
 markg
 
 Chris Brealey wrote:
 > Mark,
 > there are no basic questions when it comes to Schema. The short answer
 > to your question is that the value of the prefix itself is not
 > significant outside of the document within which it is used. It's the
 > namespace bound to the prefix that matters. Since the WSDL and the SOAP
 > documents are distinct from one another, they are free to use whatever
 > prefixes they want independent of each other.
 >
 >  From the W3C Namespaces in XML 1.1 spec [1]: "Note that the prefix
 > functions only as a placeholder for a namespace name. Applications
 > SHOULD use the namespace name, not the prefix, in constructing names
 > whose scope extends beyond the containing document."
 >
 > [1] http://www.w3.org/TR/xml-names11/
 >
 > Cheers - CB.
 >
 > Griffin wrote:
 >
 >> Thanks Jeff, this helps. It's causing a minor problem in the product I'm
 >> using to parse the soap messages with. I'm querying on the element but
 >> I'm not supplying the prefix. When a prefix shows up it causes the query
 >> to fail. The difference being firstname versus q0:firstname or in
 >> websphere's case p2:firstname .  I can work around this I believe, but
 >> I'm curious as to why the products would not just use what is defined in
 >> the WSDL document.
 >>
 >> I confess I'm pretty much a novice at this stage in working with soap
 >> and wsdl.  Is it possible that this could cause problems when multiple
 >> clients(various technologies) are accessing a web services interface and
 >> all send their own version of the prefix?  ie the soap message may
 >> contain two firstname elements that are namespace qualified but the
 >> particular web service may be interested in only a certain one.  Would
 >> it not need to know how to find that element? Sorry if this is a basic
 >> question.
 >>
 >> markg
 >>
 >> Jeff Liu wrote:
 >> > Hi Mark,
 >> >
 >> > prefix is just a pointer to the namespace declaration, as far as I
 >> know, the
 >> > name of the prefix does not matter as long as it points to the same
 >> > namespace. For example,
 >> >
 >> > <ti:firstname xmlns:ti="http://sn000046/PgnServiceRequest/publish"/
 >> <http://sn000046/PgnServiceRequest/publish>>
 >> >
 >> > <q0:firstname xmlns:q0="http://sn000046/PgnServiceRequest/publish"/
 >> <http://sn000046/PgnServiceRequest/publish>>
 >> >
 >> > Is there any reason why the prefix in the SOAP message must match
 >> the prefix
 >> > used in the WSDL file? Any namespace aware XML parser should handle
 >> this
 >> > correctly.
 >> >
 >> > As for the error messages:
 >> >
 >> >
 >> >>IWAB0380E Errors were encountered while validating XML schemas.
 >> >>XSD: The location '' has not been resolved
 >> >>XSD: Element reference
 >> >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 >> >>XSD: Element reference
 >> 'http://sn000046/PgnServiceRequest/publish#status'
 >> >>is unresolved
 >> >>IWAB0381I
 >> >>
 >> >
 >> >
 >>  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 >>
 >> >
 >> >>was successfully opened.
 >> >
 >> >
 >> > They are harmless and have nothing to do with the prefix issue you
 >> mention
 >> > above. The technical answer to the error message is... The Web Services
 >> > Explorer uses the XSD parser to parse the <xsd:schema>...</xsd:schema>
 >> > elements defined in the WSDL file. The XSD parser can only parse one
 >> > <xsd:schema/> element at a time. If you take a look at the WSDL file
 >> below,
 >> > there are two <xsd:schema/> elements in it. Therefore, the Explorer
 >> needs to
 >> > run the XSD parser twice. The problem is that the XSD parser does
 >> not allow
 >> > you to store any meta information about other <xsd:schema/>
 >> elements, it
 >> > only knows about the <xsd:schema/> element that it is currently
 >> parsing.
 >> > What this means is that if the two <xsd:schema/> elements have
 >> references to
 >> > each other, the XSD parser does not know about such reference and will
 >> > therefore throw an warning/error back to the caller (the Explorer)
 >> saying
 >> > you have an unresolvable reference. This is not true because the
 >> Explorer
 >> > knows that there are two <xsd:schema/> elements, and the Explorer
 >> has some
 >> > custom logic to handle this situation... However, when the Explorer
 >> receives
 >> > a warning/error from the XSD parser, there's no way to tell whether
 >> they are
 >> > legitimate error messages or they are really limitation mentioned
 >> above. The
 >> > decision was to leave the message in because we don't want to
 >> suppress any
 >> > legitimate errors by accident. Hope this helps.
 >> >
 >> > Thanks,
 >> >
 >> > Jeff
 >> >
 >> > "Mark Griffin" <mark.griffin@pgnmail.com> wrote in message
 >> > news:a8f751a66736e401f04b361119729d65$1@www.eclipse.org...
 >> >
 >> >>I'm having some issues with a WSDL file I'm using.  Eclipse/webtools
 >> seems
 >> >>to be ignoring the namespace prefix within the wsdl file when I
 >> bring it
 >> >>into eclipse.  I can successfully invoke the webservice via the Web
 >> >>Services Explorer. But it inserts its own prefix instead of what is
 >> >>defined in the WSDL file.  It uses "q0" instead of what is in the WSDL.
 >> >>I'm having the same problem with the IBM WSAD version except it is
 >> using
 >> >>"p2" as the prefix and ignoring what is in the WSDL file.
 >> >>
 >> >>This is the error that I get when trying to create a web service
 >> from the
 >> >>wsdl.
 >> >>
 >> >>IWAB0380E Errors were encountered while validating XML schemas.
 >> >>XSD: The location '' has not been resolved
 >> >>XSD: Element reference
 >> >>'http://sn000046/PgnServiceRequest/publish#createTicket' is unresolved
 >> >>XSD: Element reference
 >> 'http://sn000046/PgnServiceRequest/publish#status'
 >> >>is unresolved
 >> >>IWAB0381I
 >> >>
 >> >
 >> >
 >>  file:/c:/ide/workspace/CreateRequest/WebContent/wsdl/PgnServ iceRequest_publishPort0.wsdl
 >>
 >> >
 >> >>was successfully opened.
 >> >>
 >> >>Here is the WSDL I used.  Is there something in the WSDL that is
 >> causing
 >> >>this problem. I'm not having any issues getting it to work with .Net. I
 >> >>sure would like it better in Java though.
 >> >>
 >> >>
 >> >>
 >> >><?xml version="1.0" encoding="UTF-8"?>
 >> >><wsdl:definitions name="PgnServiceRequest_publish"
 >> >>targetNamespace="http://sn000046/PgnServiceRequest/publish/"
 >> >>xmlns:webM="http://www.webMethods.com/noNamespace/"
 >> >>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 >> >>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
 >> >>xmlns:tns="http://sn000046/PgnServiceRequest/publish/"
 >> >>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 >> >>xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 >> >>xmlns:wsdns1="http://sn000046/PgnServiceRequest/publish"
 >> >>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 >> >><wsdl:types>
 >> >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >> >>targetNamespace="http://sn000046/PgnServiceRequest/publish"
 >> >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >> >>          <xsd:element name="firstname" type="xsd:string"/>
 >> >>          <xsd:element name="lastname" type="xsd:string"/>
 >> >>          <xsd:element name="employeenumber" type="xsd:string"/>
 >> >>          <xsd:element name="problemcode" type="xsd:string"/>
 >> >>          <xsd:element name="problemdescription" type="xsd:string"/>
 >> >>          <xsd:element name="contact" type="xsd:string"/>
 >> >>          <xsd:element name="createTicket">
 >> >>            <xsd:complexType>
 >> >>              <xsd:sequence>
 >> >>                <xsd:element ref="ti:firstname"/>
 >> >>                <xsd:element ref="ti:lastname"/>
 >> >>                <xsd:element ref="ti:employeenumber"/>
 >> >>                <xsd:element ref="ti:problemcode"/>
 >> >>                <xsd:element ref="ti:problemdescription"/>
 >> >>                <xsd:element ref="ti:contact"/>
 >> >>              </xsd:sequence>
 >> >>            </xsd:complexType>
 >> >>          </xsd:element>
 >> >>          <xsd:element name="success" type="xsd:string"/>
 >> >>          <xsd:element name="status">
 >> >>            <xsd:complexType>
 >> >>              <xsd:sequence>
 >> >>                <xsd:element ref="ti:success"/>
 >> >>              </xsd:sequence>
 >> >>            </xsd:complexType>
 >> >>          </xsd:element>
 >> >>        </xsd:schema>
 >> >>
 >> >>        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 >> >>targetNamespace="http://localhost/PgnServiceRequest/publish/createTicket"
 >>
 >> >>xmlns:tns="http://localhost/PgnServiceRequest/publish/createTicket"
 >> >>xmlns:ti="http://sn000046/PgnServiceRequest/publish">
 >> >>          <xsd:import
 >> >>namespace="http://sn000046/PgnServiceRequest/publish"/
 >> <http://sn000046/PgnServiceRequest/publish>>
 >> >>          <xsd:complexType name="createTicket">
 >> >>            <xsd:sequence>
 >> >>              <xsd:element ref="ti:createTicket"/>
 >> >>              <xsd:any processContents="lax"/>
 >> >>            </xsd:sequence>
 >> >>            <xsd:anyAttribute processContents="lax"/>
 >> >>          </xsd:complexType>
 >> >>          <xsd:complexType name="status">
 >> >>            <xsd:sequence>
 >> >>              <xsd:element ref="ti:status"/>
 >> >>              <xsd:any processContents="lax"/>
 >> >>            </xsd:sequence>
 >> >>            <xsd:anyAttribute processContents="lax"/>
 >> >>          </xsd:complexType>
 >> >>        </xsd:schema>
 >> >>
 >> >></wsdl:types>
 >> >>
 >> >><wsdl:message name="createTicket">
 >> >><wsdl:part name="createTicket" element="wsdns1:createTicket"/>
 >> >></wsdl:message>
 >> >>
 >> >><wsdl:message name="createTicketOutput">
 >> >><wsdl:part name="status" element="wsdns1:status"/>
 >> >></wsdl:message>
 >> >><wsdl:portType name="PgnServiceRequest_publishPortType">
 >> >><wsdl:operation name="createTicket">
 >> >><wsdl:input message="tns:createTicket"/>
 >> >><wsdl:output message="tns:createTicketOutput"/>
 >> >></wsdl:operation>
 >> >></wsdl:portType>
 >> >><wsdl:binding name="PgnServiceRequest_publishBinding"
 >> >>type="tns:PgnServiceRequest_publishPortType">
 >> >><soap:binding style="document"
 >> >>transport="http://schemas.xmlsoap.org/soap/http"/
 >> <http://schemas.xmlsoap.org/soap/http>>
 >> >><wsdl:operation name="createTicket">
 >> >><soap:operation soapAction=""/>
 >> >><wsdl:input>
 >> >><soap:body use="literal"/>
 >> >></wsdl:input>
 >> >><wsdl:output>
 >> >><soap:body use="literal"/>
 >> >></wsdl:output>
 >> >></wsdl:operation>
 >> >></wsdl:binding>
 >> >><wsdl:service name="PgnServiceRequest_publishService">
 >> >><wsdl:port name="PgnServiceRequest_publishPort0"
 >> >>binding="tns:PgnServiceRequest_publishBinding">
 >> >><soap:address location="http://sn000046:9999/soap/default"/
 >> <http://sn000046:9999/soap/default>>
 >> >></wsdl:port>
 >> >></wsdl:service>
 >> >></wsdl:definitions>
 >> >>
 >> >>thanks for any suggestions.
 >> >>
 >> >
 >> >
 >> >
 >>
 |  |  |  | 
 
 
 Current Time: Fri Oct 31 01:43:34 EDT 2025 
 Powered by FUDForum . Page generated in 0.07606 seconds |