Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 843819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:11:24+00:00 2026-05-15T06:11:24+00:00

I am trying to get the XPath "/deployment/service". Tested on this site: http://www.xmlme.com/XpathTool.aspx <?xml

  • 0

I am trying to get the XPath "/deployment/service". Tested on this site:
http://www.xmlme.com/XpathTool.aspx

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org  /axis/wsdd/providers/java">

 <service name="kontowebservice" provider="java:RPC" style="rpc" use="literal">
  <parameter name="wsdlTargetNamespace" value="http://strategies.spine"/>
  <parameter name="wsdlServiceElement" value="ExposerService"/>
  <parameter name="wsdlServicePort" value="kontowebservice"/>
  <parameter name="className" value="some.package.internal.KontoWebServiceImpl_WS"/>
  <parameter name="wsdlPortType" value="Exposer"/>
  <parameter name="typeMappingVersion" value="1.2"/>
  <operation xmlns:operNS="http://strategies.spine" xmlns:rtns="http://www.w3.org/2001/XMLSchema" name="expose" qname="operNS:expose" returnQName="exposeReturn" returnType="rtns:anyType" soapAction="">
    <parameter xmlns:tns="http://www.w3.org/2001/XMLSchema" qname="in0" type="tns:anyType"/>
  </operation>
  <parameter name="allowedMethods" value="expose"/>
  <parameter name="scope" value="Request"/>

</service>
</deployment>

I absolutely can’t find out why it always tells me that my xpath does not match…
This may be stupid, but am I missing something?

EDIT

Thanks to the answer from Dimitre Novatchev I was able to find a workaround:

<xmltask failwithoutmatch="true" report="false">
    <fileset dir="${src.gen}/" includes="**/*-deploy.wsdd" />
    <copy path="//*[local-name()='service']" buffer="tmpServiceBuf" append="true" />
</xmltask>
<xmltask failwithoutmatch="true" report="false" source="${basedir}/env/axis/WEB-INF/server-config.wsdd" dest="${build.stage}/resources/WEB-INF/server-config.wsdd">
    <insert path="//*[local-name()='transport'][last()]" buffer="tmpServiceBuf" position="after" />
</xmltask>

Binding namespaces with xmltask (which is the tool that gave me the headaches) seems not to be possible. The code above did the trick.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:11:25+00:00Added an answer on May 15, 2026 at 6:11 am

    The Problem: This XML document has a default namespace. XPath considers any unprefixed names to be in “no-namespace”. It tries to select /deployment/service where the elements deployment and service are in no-namespace and doesn’t select any node, because in the provided XML documents there are no such elements that are in “no- namespace (they all are in the “http://xml.apache.org/axis/wsdd/” namespace)

    The solution: Using the language which hosts XPath (such as C#, Jave, XSLT, or any other language that you may be using) bind a prefix (say x:) to the namespace "http://xml.apache.org/axis/wsdd/".

    Then, change:

    /deployment/service

    to

    /x:deployment/x:service

    Now the last XPath expression correctly selects the desired node.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get from this: @FindBy(xpath = //div/span/img) public WebElement addNew; @FindBy(xpath =
iam trying to get all object's xpath's from loaded page via selenium something similar
I'm trying to get the plain text from a word document. Specifically, the xpath
Trying to get this expression to work, can someone look at it and tell
I'm trying to get XPath to return an attribute value yet first search for
I'm trying to get the value of a hidden form with xpath, there are
I get this error: Notice: Trying to get property of non-object in Applies to:
I'm trying to get an XPath expression together that will give me all the
I'm trying to get the select list values using xpath because by id is
I'm trying to get the email to a friend link from this page using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.