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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 00:17:13
Script start
Timing: Jan 30 2025 00:17:13
Module start 'layout'
Timing: Jan 30 2025 00:17:13
Module start 'content'
Timing: Jan 30 2025 00:17:13
Module end 'content'
Timing: Jan 30 2025 00:17:13
Script end

Main resources:

Total runtime0.9556 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.5547151.2109
Module start 'layout' 0.00570.0021 739.765637.0781
Module start 'content' 0.00790.9470 776.8438567.1797
Module end 'content' 0.95480.0008 1,344.023421.9922
Script end 0.9556  1,366.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3156160.0002
Check MTime0.00120.1295160.0001
Mysql Total
Database connection0.00110.116210.0011
Mysqli_queries0.906794.8779730.0124
Looping result0.00050.0564710.0000
Template Total0.925496.820.4627
Template load0.00190.199120.0010
Template processing0.923496.632720.4617
Template load and register function0.00010.014710.0001
states
state_id_array0.00060.067510.0006
state_identifier_array0.00160.170720.0008
Override
Cache load0.00170.1766590.0000
Sytem overhead
Fetch class attribute can translate value0.00040.046730.0001
Fetch class attribute name0.00040.0452100.0000
XML
Image XML parsing0.00240.249630.0008
class_abstraction
Instantiating content class attribute0.00000.0016140.0000
General
dbfile0.00420.4370220.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
2content/datatype/view/ezxmltags/ol.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ol.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs