Hi Luca,

XPath expressions do not make use of default namespace, as you want to match all the message elements from the http://schemas.xmlsoap.org/wsdl/ namespace you need a prefix to refer to these elements in your XPath expression:

//wsdl:message

and

you have to tell your XPath processor that wsdl maps to http://schemas.xmlsoap.org/wsdl/ namespace.

When you remove the xmlns="http://schemas.xmlsoap.org/wsdl/"; then you put the message elements in no namespace and //message matches them.

Hope that helps,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Luca Manganelli wrote:
Hi, I tried this command on the WSDL in attach:

java ApplyXPath customerProcess.wsdl "//message"

and the output is:

Loading classes, parsing customerProcess.wsdl, and setting up serializer
Querying DOM using //message
<output>
</output>

But if I remove the 4th row:

xmlns="http://schemas.xmlsoap.org/wsdl/";

the above example works.
I've tried it with Xerces 2.6.0 and 2.6.2 and none works without that modification.


Any idea?

Thank you,
Luca


------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://sra.itc.it/projects/astro/BC_Biella/customer"; xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"; xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:tdns="http://sra.itc.it/projects/astro/BC_Biella/Typedef"; xmlns:cor="http://sra.itc.it/projects/astro/BC_Biella/Typedef"; targetNamespace="http://sra.itc.it/projects/astro/BC_Biella/customer"; name="customer">


        <import namespace="http://sra.itc.it/projects/astro/BC_Biella/Typedef"; 
location="Typedef.wsdl"/>
        <message name="conclusionProvision">
                <part name="customerRequest" type="tdns:customerRequest"/>
                <part name="conclusions" type="tdns:Conclus"/>
        </message>
        <message name="conferenceConvocation">
                <part name="customerRequest" type="tdns:customerRequest"/>
                <part name="conferenceDate" type="xsd:date"/>
        </message>
        <message name="notification">
                <part name="customerRequest" type="tdns:customerRequest"/>
                <part name="integrationRequired" type="xsd:boolean"/>
        </message>
        <message name="request">
                <part name="customerRequest" type="tdns:customerRequest"/>
        </message>
        <message name="reply">
                <part name="conclusions" type="tdns:Conclus"/>
        </message>
        
        <portType name="incomingPT">
                <operation name="sendClientRequest">
                        <input message="tns:request"/>
                        <output message="tns:reply"/>
                </operation>
                <operation name="sendNotification">
                        <input message="tns:notification"/>
                </operation>
                <operation name="sendConclusionProvision">
                        <input message="tns:conclusionProvision"/>
                </operation>
                <operation name="sendConvocation">
                        <input message="tns:conferenceConvocation"/>
                </operation>
        </portType>

        <service name="customerService"/>

        <bpws:propertyAlias propertyName="cor:customerInfo" messageType="tns:request" 
part="customerRequest" query="/customerRequest/customerInfo"/>
        <bpws:propertyAlias propertyName="cor:requestDesc" messageType="tns:request" 
part="customerRequest" query="/customerRequest/requestDesc"/>
        <bpws:propertyAlias propertyName="cor:customerInfo" messageType="tns:notification" 
part="customerRequest" query="/customerRequest/customerInfo"/>
        <bpws:propertyAlias propertyName="cor:requestDesc" messageType="tns:notification" 
part="customerRequest" query="/customerRequest/requestDesc"/>
        <bpws:propertyAlias propertyName="cor:customerInfo" messageType="tns:conferenceConvocation" 
part="customerRequest" query="/customerRequest/customerInfo"/>
        <bpws:propertyAlias propertyName="cor:requestDesc" messageType="tns:conferenceConvocation" 
part="customerRequest" query="/customerRequest/requestDesc"/>
        <bpws:propertyAlias propertyName="cor:customerInfo" messageType="tns:conclusionProvision" 
part="customerRequest" query="/customerRequest/customerInfo"/>
        <bpws:propertyAlias propertyName="cor:requestDesc" messageType="tns:conclusionProvision" 
part="customerRequest" query="/customerRequest/requestDesc"/>

        <plnk:partnerLinkType name="RISTnotifiesCustomer_LT">
                <plnk:role name="customerNotificationService">
                        <plnk:portType name="tns:incomingPT"/>
                </plnk:role>
        </plnk:partnerLinkType>
        <plnk:partnerLinkType name="CustomerRPRO_LT">
                <plnk:role name="CustomerConfConvocationService">
                        <plnk:portType name="tns:incomingPT"/>
                </plnk:role>
        </plnk:partnerLinkType>

        <plnk:partnerLinkType name="PBSendsConclusionsCustomer_LT">
                <plnk:role name="customerConclusionService">
                        <plnk:portType name="tns:incomingPT"/>
                </plnk:role>
        </plnk:partnerLinkType>

        <plnk:partnerLinkType name="client">
                <plnk:role name="customerService">
                        <plnk:portType name="tns:incomingPT"/>
                </plnk:role>
        </plnk:partnerLinkType>
</definitions>


------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to