Forums / Extensions / Soap/Wsdl loginhandler

Soap/Wsdl loginhandler

Author Message

namita varshney

Monday 25 October 2010 2:30:21 am

Hello ,

i want to create a webservice in eZ publish and want to consume it in .Net application.

Can it be possible?

Thanks.

Gaetano Giunta

Monday 25 October 2010 4:42:34 am

@namita 1: you are again mixing two prtocols in your calls! This time jsonrpc and xmlrpc. Please take the time to understand what these 3 words mean: json-rpc, xml-rpc, soap. Read about them on wikipedia.

In short: the server is answering with a jsonrpc response to the client. This response contains an error message. The error message is: "the client sent a request that is not valid according to my protocol".

You should either

  1. change the jsonrpc server into an xmlrpc server, or
  2. in the payload you create in the debugger write some valid json data, not some xml data

@namita 2: if you want to create a webservice in eZP with the ggwebservices extension and consume it from a .net application, you currently have two choices:

  1. use a library in your .net application that speaks the xml-rpc or json-rpc protocols and use that library for the client
  2. wait a few weeks (possibly months) until there is good support for SOAP+WSDL servers within the extension. Currently only the SOAP+WSDL client is there, but I am working on the server implementation. I do not promise release dates, though.

Principal Consultant International Business
Member of the Community Project Board

namita varshney

Monday 25 October 2010 5:40:25 am

Sorry for making you confuse.

I was trying to understand both xml-rpc and json-rpc.

so i was confused.

Thanks for helping.

Gaetano Giunta

Tuesday 26 October 2010 5:48:32 am

It is possible to create a SOAP webservice in eZP, but

- there is limited support for marshaling of native contents

- there is no support for WSDL

To do it:

1. create an extension

2. in it, create settings/soap.ini.append.php and in the file declare your extension to provide soap services

3. in the extension, create soap/initialize.php and add your logic in there (similar to the above examples with jsonrpc/xmlrpc)

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 26 October 2010 5:55:14 am

Another solution is to forego completely eZP native SOAP support, and code you server from scratch using custom modules/views. Example code for the view:

if ($_SERVER['REQUEST_METHOD'] == 'POST')
    {
        $server = new SoapServer( $my_wsdl_file );
        $server->setClass( $mySoapWorkerClass );
        $server->handle();
    }
    else 
    {
         readfile( $my_wsdl_file );
    }
    eZExecution::cleanExit();

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 26 October 2010 6:03:43 am

Last but not least: another interesting extension for SOAP support in eZP: http://projects.ez.no/nusoap/

Principal Consultant International Business
Member of the Community Project Board

Dhaval Panchal

Monday 01 November 2010 6:22:29 am

Hey GG,

Im thankful to you, now im able to use gg Webservice,..

but can you please suggest me how do i consume .net server in ggClient?

It would be so nice of you if you have a look about my question.

Thanks

Dhaval

Dhaval Panchal

Monday 01 November 2010 6:40:30 am

hi GG,

I came to know that you are the author of GG web service, great man.!!!

and i have read your posts, i got too much idea about GG web services.

I have used it in php, thanks a lot..!!!

I want one more help from you,

I have one Service in .Net and i want to consume it in php using gg Service client.

can you please help me?

Thanks

Dhaval

eZ debug

Timing: Jan 29 2025 13:34:41
Script start
Timing: Jan 29 2025 13:34:41
Module start 'content'
Timing: Jan 29 2025 13:34:41
Module end 'content'
Timing: Jan 29 2025 13:34:41
Script end

Main resources:

Total runtime0.1351 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 588.3516180.8438
Module start 'content' 0.00790.0060 769.1953102.4688
Module end 'content' 0.01390.1211 871.6641531.0000
Script end 0.1350  1,402.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00322.3782200.0002
Check MTime0.00130.9928200.0001
Mysql Total
Database connection0.00110.812710.0011
Mysqli_queries0.087965.06251410.0006
Looping result0.00100.77181390.0000
Template Total0.120989.410.1209
Template load0.00070.524010.0007
Template processing0.120288.920910.1202
Override
Cache load0.00050.371610.0005
Sytem overhead
Fetch class attribute can translate value0.00161.173710.0016
XML
Image XML parsing0.00030.234710.0003
General
dbfile0.00997.3465200.0005
String conversion0.00000.005830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs