Forums / General / gg web service soap versioning issue

gg web service soap versioning issue

Author Message

Dhaval Panchal

Tuesday 02 November 2010 10:41:47 pm

Hi All,

I have one problem regarding gg web services while calling .net web service in eZ publish using gg web service.

when i try to call .net (soap 1.0) service, it works well but when i try to call .net(soap 1.1 or above) the response gives null.

any idea?

please help

Thanks

Dhaval

Gaetano Giunta

Wednesday 03 November 2010 3:39:01 am

Hi Dhaval.

Do you have a public address that I could test for your soap 1.1 webservice?

Principal Consultant International Business
Member of the Community Project Board

Dhaval Panchal

Wednesday 03 November 2010 6:07:07 am

Hi GG

Thanks for reply

OK, we have created one public address to test soap 1.1 web service as follow:

http://www.jzero.com/TestWebservice/service1.asmx

can you please test ?

Thanks

Dhaval

Dhaval Panchal

Friday 05 November 2010 10:14:28 pm

Hi GG,

above link is working now..

It was under maintain.

Thanks

Dhaval

Gaetano Giunta

Saturday 06 November 2010 9:20:54 am

Not yet 100% there: but this might help you:

1: set up in wsproviders.ini.append.php the description of your server:

[jzero]
providerType=PhpSOAP
providerUri=
WSDL=http://www.jzero.com/TestWebservice/service1.asmx?WSDL

2: test the urls using a command line script:

<?php

include( 'autoload.php' );

$script = eZScript::instance( array(
    'description' => ( '...' ),
    'use-session' => false,
    'use-modules' => false,
    'use-extensions' => true ) );
$script->startup();
$script->initialize();

// 1st test: HelloWorld
$resp = ggeZWebservicesClient::send( 'jzero', 'HelloWorld', array() );
var_dump( $resp );

// 2nd test: addnumbers
$resp = ggeZWebservicesClient::send( 'jzero', 'addnumbers', array( array( 'arg1' => 25.25, 'arg2' => 33.33 ) ) );
var_dump( $resp );

$script->shutdown();

?>

The results I get are:

- helloworlds works fine

- addnumbers works partially: I get an answer, but the numbers are truncated in teh request sent by eZP

I am currently investigating to see exactly what version of SOAP is being used by the requests, as your WSDL apparently supports both "soap1" and "soap12"...

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Saturday 06 November 2010 11:09:35 am

Btw, I just committed support for soap version 1.2 in the svn vesrion of the extension. You can use it with a tweaked config file:

[jzero]
providerType=PhpSOAP
providerUri=
WSDL=http://www.jzero.com/TestWebservice/service1.asmx?WSDL
SoapVersion=soap12

Unluckily the network traces show that, while the protocol in use is effectively 1.2, the parameters sent in the request are still truncated to integers.

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Saturday 06 November 2010 11:32:13 am

Duh, went back to school, read again the basic XSD data types definition, and found out that the parameters for the addNumbers method, being defined as being "long", are meant to be "long integers". So I'd say the problem is solved!

Principal Consultant International Business
Member of the Community Project Board