Giter Site home page Giter Site logo

soap-client-demo's People

Contributors

goetas avatar rvdbogerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

soap-client-demo's Issues

WSDL

Hi,
Sorry but in step3 if I need authentication to access wsdl, how should it be done?

Thanks for advance.

This package only run on cli?

I clone this project to my mac,use php bin/demo.phpit run,but when I use http://localhost/projectpath/bin/demo.php to visit,it is error, look like Fatal error: Uncaught JMS\Serializer\Exception\InvalidArgumentException: The directory "metadata/Calculator" does not exist. in /Users/path/projectpath/vendor/jms/serializer/src/JMS/Serializer/SerializerBuilder.php:314

My config.yml is your demo:

soap_client:
  #  alternative_endpoints:
  #    service:
  #      port: http://localhost:8080
  namespaces:
    'http://tempuri.org/': 'Calculator'

  destinations_php:
    'Calculator': src/Calculator

  destinations_jms:
    'Calculator': metadata/Calculator
  metadata:
    'http://www.dneonline.com/calculator.asmx?WSDL': ~

and I run endor/bin/soap-client generate config/config.yml src/Service/Container --dest-class=Service/Container/SoapContainer

Could I ask you how to run on website?
Thankyou very much.

SERIALIZER

If we receive an xml request, is it possible to use the serializer only with xsd? without metadata and wsdl?

Like: $ this-> serializer-> deserialize ((string) $ request-> getRawBody (), $ class, 'xml');

Thanks for advance

You must define a type

I move this my issue in soap-server because the same happens to me.

$container = new \Igm\SoapServices\Service\Container\SoapClientContainer();

$buildSerializer = $generator::createSerializerBuilderFromContaioner($container, function($h) use($headerHandler){
    $h->registerSubscribingHandler($headerHandler); })->build();
$metadata = $container->get('goetas_webservices.soap_client.metadata_reader');

My serializer have the metadatasDir:

      [0] => JMS\Serializer\Metadata\Driver\YamlDriver Object
                        (
                            [locator:Metadata\Driver\AbstractFileDriver:private] => Metadata\Driver\FileLocator Object
                                (
                                    [dirs:Metadata\Driver\FileLocator:private] => Array
                                        (
                                            [Igm\SoapServices\Test] => metadata/Test
                                            [GoetasWebservices\SoapServices\SoapCommon\SoapEnvelope] => /var/www/synergy-generator/src/Generator/../Resources/metadata/jms
                                        )

                                )

                        )

My Yml is this:

Igm\SoapServices\Test\SoapEnvelope\Messages\GetSimpleInput:
    xml_root_name: 'SOAP:Envelope'
    xml_root_namespace: 'http://schemas.xmlsoap.org/soap/envelope/'
    xml_namespaces:
        SOAP: 'http://schemas.xmlsoap.org/soap/envelope/'
    properties:
        body:
            expose: true
            access_type: public_method
            type: Igm\SoapServices\Test\SoapEnvelope\Parts\GetSimpleInput
            serialized_name: Body
            xml_element:
                namespace: 'http://schemas.xmlsoap.org/soap/envelope/'
            accessor:
                getter: getBody
                setter: setBody
        header:
            expose: true
            access_type: public_method
            type: GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\Handler\HeaderPlaceholder
            serialized_name: Header
            xml_element:
                namespace: 'http://schemas.xmlsoap.org/soap/envelope/'
            accessor:
                getter: getHeader
                setter: setHeader

But I still have the same error:

You must define a type for Igm\SoapServices\Test\SoapEnvelope\Messages\GetSimpleInput::$body.

Unable to determine location to save PHP class

I have this in my config.yml:

soap_client: ~

  xsd2php:
  namespaces:
    'http://tempuri.org/': 'Igm/SoapServices/Calculator'
  destinations_php:
    'Igm/SoapServices/Calculator': src/Calculator
  destinations_jms:
    'Igm/SoapServices/Calculator': metadata/Calculator
wsdl2php:
  metadata:
    'http://www.dneonline.com/calculator.asmx?WSDL': ~**

In my composer i have also this:

"autoload" : {
		"psr-4" : {
			"Igm\\SoapServices\\": "src",
			"Igm\\SoapServices\\Calculator"  : "src/Calculator",
			"Service\\"			 : "src/Service"
		}
	}

But when I execute the command, return this error:

php bin/soap-client.php -vvv generate config/config.yml src/Service/Container

 **[GoetasWebservices\Xsd\XsdToPhp\PathGenerator\PathGeneratorException]                                     
  Unable to determine location to save PHP class 'Igm\SoapServices\Calculator\SoapEnvelope\Parts\AddInput'**

And when I put a unique namespace it works well.

Characters

Dear,

May I know what is : <ns-77e106cb:OTA_HotelAvailNotifRQ xmlns:ns-77e106cb?

I don't understand how these symbols are formed.

Thank you.

Error trying to deserialize OTA_HotelAvailRQ

Hello,

I'm trying to use the demo with a custom wsdl, but got error when deserializing the OTA_HotelAvailRQ message. Seems that it's not handling the soap headers as expected. Can you give me some thoughts on what is happening? Thank you.

I attach wsdl and xml message.

wsdl.tar.gz

OTA_HotelAvailRQ.txt

Code executed:
$xml = file_get_contents(__DIR__ . '/OTA_HotelAvailRQ.xml');
$test = $serializer->deserialize($xml, ReadRoomTypeCodesInput::class, 'xml');

CLI Response
carnau@lenovo:/srv/host/gitlab/carnau/soap-client-demo$ php bin/demo-server.php PHP Fatal error: Uncaught ReflectionException: Class GoetasWebservices\SoapServices\SoapEnvelope\Headers does not exist in /srv/host/gitlab/carnau/soap-client-demo/vendor/jms/metadata/src/Metadata/MetadataFactory.php:167 Stack trace: #0 /srv/host/gitlab/carnau/soap-client-demo/vendor/jms/metadata/src/Metadata/MetadataFactory.php(167): ReflectionClass->__construct('GoetasWebservic...') #1 /srv/host/gitlab/carnau/soap-client-demo/vendor/jms/metadata/src/Metadata/MetadataFactory.php(72): Metadata\MetadataFactory->getClassHierarchy('GoetasWebservic...')

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.