Coder Social home page Coder Social logo

SOAP request fails about ono HOT 5 OPEN

mattt avatar mattt commented on May 20, 2024
SOAP request fails

from ono.

Comments (5)

 avatar commented on May 20, 2024

I have the same problem and have to go down the elements until I get to the element I want:

ONOXMLElement *dataElement = [[[[[[[[[document.rootElement.children firstObject] children] firstObject] children] firstObject] children] firstObject] children] firstObject];

Here are some details about the problem:

"The ‘gotcha’ moment with our response message is that the namespace “xmlns=http://ws.cdyne.com/WeatherWS/” does not have a prefix for the declaration. By not defining a prefix, it is defaulting to the default namespace or null namespace and we cannot use XPath expressions to reference the null namespace."

http://blog.inin.com/a-quick-primer-on-soap-xml-and-xpath/

from ono.

cHaLkdusT avatar cHaLkdusT commented on May 20, 2024

Hi @mattt,

What is the status of this issue? It seems like I'm experiencing it too.

Regards,
Chalk

from ono.

mattt avatar mattt commented on May 20, 2024

Apologies for not responding sooner, everyone. I'm not very familiar with SOAP, but I'd like to make any necessary fixes for this in code and/or documentation. I'll add the example you provided, @tosbaha, as a failing test case in a branch and work to figure out a solution.

"The ‘gotcha’ moment with our response message is that the namespace “xmlns=http://ws.cdyne.com/WeatherWS/” does not have a prefix for the declaration. By not defining a prefix, it is defaulting to the default namespace or null namespace and we cannot use XPath expressions to reference the null namespace."

In the meantime, have you tried calling the definePrefix:forDefaultNamespace as a workaround?

from ono.

tosbaha avatar tosbaha commented on May 20, 2024

Sorry but this issue was so old. I don't work on this anymore. I think I made it work by stripping the name spaces. Since I don't have the old code anymore, I can't comment whether your workaround works or not. Cheers.

from ono.

cHaLkdusT avatar cHaLkdusT commented on May 20, 2024

I've tested this by calling definePrefix:forDefaultNamespace, however, XPath queries still returns nil

from ono.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.