I am using XPath 1.0 in java and would like to select/check wsdl document namespaces, but unfortunately did not managed to do it. I would like to select
- Namespace xmlns="http://ift.tt/LcBaVt" represented as attribute of "definitions" element
- Namespace xmlns:soap="http://ift.tt/KIQHA2" represented as attribute of "definitions" element.
I tried XPath expressions:
"//namespace:: * " and "/*/namespace:: * ", which seem to be mystic, because they return:
"http: //www.w3.org/2001/XMLSchema",
"http: //www.w3.org/XML/1998/namespace" ????? (where does it come from?)"/definitions/@*" returns:
HelloService
"http ://www.examples.com/wsdl/HelloService.wsdl"
Is there any way to catch xmlns:soap="http://ift.tt/KIQHA2" and xmlns="http://ift.tt/LcBaVt" attributes/namespaces in this document using XPath? or maybe some other tools?
Wsdl document:
<definitions name="HelloService"
targetNamespace="http://ift.tt/1fgHZSq"
xmlns="http://ift.tt/LcBaVt"
xmlns:soap="http://ift.tt/KIQHA2"
xmlns:tns="http://ift.tt/1fgHZSq"
xmlns:xsd="http://ift.tt/tphNwY">
<message name="SayHelloRequest">
<part name="firstName" type="xsd:string"/>
</message>
<message name="SayHelloResponse">
<part name="greeting" type="xsd:string"/>
</message>
<portType name="Hello_PortType">
<operation name="sayHello">
<input message="tns:SayHelloRequest"/>
<output message="tns:SayHelloResponse"/>
</operation>
</portType>
<binding name="Hello_Binding" type="tns:Hello_PortType">
<soap:binding style="rpc"
transport="http://ift.tt/LcBaVu"/>
<operation name="sayHello">
<soap:operation soapAction="sayHello"/>
<input>
<soap:body
encodingStyle="http://ift.tt/wEYywg"
namespace="urn:examples:helloservice"
use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://ift.tt/wEYywg"
namespace="urn:examples:helloservice"
use="encoded"/>
</output>
</operation>
</binding>
<service name="Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port binding="tns:Hello_Binding" name="Hello_Port">
<soap:address location="http://ift.tt/1ol0gWw"/>
</port>
</service>
</definitions>
No comments:
Post a Comment