GithubHelp home page GithubHelp logo

Comments (7)

mikaelcom avatar mikaelcom commented on June 2, 2024

@walkinlake Can you confirm that the generated code contains all the methods to define the Soap Headers?

The Wsdl Header parser passes where it usually does not pass (at least in the tests) so I'm just wondering if everything it working well in your particular case :). I can't see the WSDL so I'm just asking. Thx

from wsdlhandler.

walkinlake avatar walkinlake commented on June 2, 2024

Okay it seems, that the 'namespace' error has nothing to do with the php namespace. That's why it didn't matter if I left it out in the command.

As far as I can see, the code produced all methods, but misses the 'SOAPHeaderNamespaces' for all methods:

/**
 * Method to call the operation originally named ListTopLevelEvents
 * Meta information extracted from the WSDL
 * - SOAPHeaderNames: ExternalApiHeader
 * - SOAPHeaderNamespaces:
 * - SOAPHeaderTypes: \BetdaqSdk\StructType\ExternalApiHeader
 * - SOAPHeaders: required
 * - documentation: Returns the set of top level events that are currently active.
 */

I think that's what the error is about. I have to manually provide the namespace parameter for every new instance of ExternalApiHeader. After that everything worked.

In the .wsdl-file, there is no 'namespace'-variable name given. The one that's the closest is 'targetNamespace'.

You can check out the .wsdl-file @ https://api.betdaqb2b.com/v2.0/API.wsdl or through a uk-proxy @ https://proxy-lon.hidemyass-freeproxy.com/proxy/en-us/aHR0cHM6Ly9hcGkuYmV0ZGFxYjJiLmNvbS92Mi4wL0FQSS53c2Rs

As a conclusion, I think the parses doesn't catch 'targetNamespace' as namespace. In version 4.0.1, it will produce an error and in the 3.3.6 version, it doesn't care whether there is a namespace.

from wsdlhandler.

mikaelcom avatar mikaelcom commented on June 2, 2024

Actually, the SOAP Header namespace is usually extracted from :

<soap:header message="tns:Header" part="SessionHeader" use="literal" wsdl:required="false">

Which is tns in this case. Which leads to the root tag from:

<wsdl:definitions targetNamespace="urn:api.actonsoftware.com"
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:tns="urn:api.actonsoftware.com"
 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">

The final used namespace in the SOAP request is then urn:api.actonsoftware.com.

In your case, there is no such namespace for the header message. So, I don't know, right now, what namespace should be used or if there is a default namespace. Maybe the targetNamespace value from the root tag. Any hint? Any doc that could point to the right value and its determination from the WSDL?

Thx

from wsdlhandler.

mikaelcom avatar mikaelcom commented on June 2, 2024

Using SOAPUI, I see that it uses http://www.GlobalBettingExchange.com/ExternalAPI/ as the SOAP Header namespace, so I think I can use the targetNamespace attribute value from 1- wsdl:types>wsdl:schema tag containing the SOAP Header element type, 2- wsdl:definitions if not found in the first place.

from wsdlhandler.

walkinlake avatar walkinlake commented on June 2, 2024

Yeah I manually used the value from targetNamespace and it worked as it's supposed to be.

from wsdlhandler.

mikaelcom avatar mikaelcom commented on June 2, 2024

Hi @walkinlake, can you try using mikaelcom/wsdltophp:develop (PHP 7.4 usage)?

from wsdlhandler.

walkinlake avatar walkinlake commented on June 2, 2024

It works perfectly for me now. I used PHP 8.0.5. Thank you :)

from wsdlhandler.

Related Issues (3)

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.