Re: Problem consuming ofbiz soap services from PHP
ava:org.ofbiz.webapp.control.LoginWorker#checkServletRequestRemoteUserLogin] from [preprocessor], result is [success] 2017-03-01 11:14:59,293 (http-0.0.0.0-80-1) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.LoginWorker#checkExternalLoginKey] from [preprocessor], result is [success] 2017-03-01 11:14:59,294 (http-0.0.0.0-80-1) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.ProtectViewWorker#checkProtectedView] from [preprocessor], result is [success] 2017-03-01 11:14:59,307 (http-0.0.0.0-80-1) [ SOAPEventHandler.java:160:INFO ] Request Message: http://schemas.xmlsoap.org/soap/envelope/;>http://ofbiz.apache.org/service/;> llegada:org.apache.catalina.connector.CoyoteInputStream@542e25f0 2017-03-01 11:14:59,318 (http-0.0.0.0-80-1) [ SOAPEventHandler.java:261:INFO ] Response Message: http://schemas.xmlsoap.org/soap/envelope/;> 2017-03-01 11:14:59,319 (http-0.0.0.0-80-1) [ RequestHandler.java:421:ERROR] Request SOAPService caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException 2017-03-01 11:14:59,320 (http-0.0.0.0-80-1) [ ServerHitBin.java:628:INFO ] Visit delegatorName=default, ServerHitBin delegatorName=default 2017-03-01 11:14:59,352 (http-0.0.0.0-80-1) [ ServerHitBin.java:722:INFO ] Duplicate ServerHit was updated: [GenericEntity:ServerHit][contentId,webtools.SOAPService(java.lang.String)][createdStamp,2017-03-01 11:14:59.323(java.sql.Timestamp)][createdTxStamp,2017-03-01 11:14:59.32(java.sql.Timestamp)][hitStartDateTime,2017-03-01 11:14:59.159(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2017-03-01 11:14:59.323(java.sql.Timestamp)][lastUpdatedTxStamp,2017-03-01 11:14:59.32(java.sql.Timestamp)][referrerUrl,(java.lang.String)][requestUrl,http://107.180.69.62/webtools/control/SOAPService(java.lang.String)][runningTimeMillis,161(java.lang.Long)][serverHostName,s107-180-69-62.secureserver.net(java.lang.String)][serverIpAddress,107.180.69.62(java.lang.String)][visitId,11183(java.lang.String)] 2017-03-01 11:14:59,352 (http-0.0.0.0-80-1) [ ControlServlet.java:328:INFO ] [[[SOAPService] Request Done- total:0.193,since last([SOAPService] Req...):0.193]] From: Shi Jinghai <huaru...@hotmail.com> To: "user@ofbiz.apache.org" <user@ofbiz.apache.org> Sent: Tuesday, February 28, 2017 12:32 AM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, Perhaps you can try axis2 directly to see whether it's worked well. If yes, you can add axis2 to OFBiz as a plugin. I built an axis2 component several years ago, I'm not sure whether I can find it. Kind Regards, Shi Jinghai -邮件原件- 发件人: Alfonso Barreto [mailto:ab...@yahoo.com.INVALID] 发送时间: 2017年2月28日 8:54 收件人: Paul Foxworthy; user@ofbiz.apache.org 主题: Re: Problem consuming ofbiz soap services from PHP Thanks Paul, I tryed that syntax too, but apparently the one that works better is the one I show, with the one you say it generates an exception on the client side, just after sending. From: Paul Foxworthy <p...@cohsoft.com.au> To: user@ofbiz.apache.org; Alfonso Barreto <ab...@yahoo.com> Sent: Monday, February 27, 2017 6:51 PM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: A map entry has a key and a value. Try using the PHP syntax to create an associative array: array(key => value,key2 => value2,key3 => value3,...); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barreto <ab...@yahoo.com.invalid> wrote: Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap. wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_ timeout', 15); //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ getProductInventoryAvailable? WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/ webtools/
Re: Problem consuming ofbiz soap services from PHP
equestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.ProtectViewWorker#checkProtectedView] from [preprocessor], result is [success] 2017-03-01 11:14:59,307 (http-0.0.0.0-80-1) [ SOAPEventHandler.java:160:INFO ] Request Message: http://schemas.xmlsoap.org/soap/envelope/;>http://ofbiz.apache.org/service/;> llegada:org.apache.catalina.connector.CoyoteInputStream@542e25f0 2017-03-01 11:14:59,318 (http-0.0.0.0-80-1) [ SOAPEventHandler.java:261:INFO ] Response Message: http://schemas.xmlsoap.org/soap/envelope/;> 2017-03-01 11:14:59,319 (http-0.0.0.0-80-1) [ RequestHandler.java:421:ERROR] Request SOAPService caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException 2017-03-01 11:14:59,320 (http-0.0.0.0-80-1) [ ServerHitBin.java:628:INFO ] Visit delegatorName=default, ServerHitBin delegatorName=default 2017-03-01 11:14:59,352 (http-0.0.0.0-80-1) [ ServerHitBin.java:722:INFO ] Duplicate ServerHit was updated: [GenericEntity:ServerHit][contentId,webtools.SOAPService(java.lang.String)][createdStamp,2017-03-01 11:14:59.323(java.sql.Timestamp)][createdTxStamp,2017-03-01 11:14:59.32(java.sql.Timestamp)][hitStartDateTime,2017-03-01 11:14:59.159(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2017-03-01 11:14:59.323(java.sql.Timestamp)][lastUpdatedTxStamp,2017-03-01 11:14:59.32(java.sql.Timestamp)][referrerUrl,(java.lang.String)][requestUrl,http://107.180.69.62/webtools/control/SOAPService(java.lang.String)][runningTimeMillis,161(java.lang.Long)][serverHostName,s107-180-69-62.secureserver.net(java.lang.String)][serverIpAddress,107.180.69.62(java.lang.String)][visitId,11183(java.lang.String)] 2017-03-01 11:14:59,352 (http-0.0.0.0-80-1) [ ControlServlet.java:328:INFO ] [[[SOAPService] Request Done- total:0.193,since last([SOAPService] Req...):0.193]] From: Shi Jinghai <huaru...@hotmail.com> To: "user@ofbiz.apache.org" <user@ofbiz.apache.org> Sent: Tuesday, February 28, 2017 12:32 AM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, Perhaps you can try axis2 directly to see whether it's worked well. If yes, you can add axis2 to OFBiz as a plugin. I built an axis2 component several years ago, I'm not sure whether I can find it. Kind Regards, Shi Jinghai -邮件原件- 发件人: Alfonso Barreto [mailto:ab...@yahoo.com.INVALID] 发送时间: 2017年2月28日 8:54 收件人: Paul Foxworthy; user@ofbiz.apache.org 主题: Re: Problem consuming ofbiz soap services from PHP Thanks Paul, I tryed that syntax too, but apparently the one that works better is the one I show, with the one you say it generates an exception on the client side, just after sending. From: Paul Foxworthy <p...@cohsoft.com.au> To: user@ofbiz.apache.org; Alfonso Barreto <ab...@yahoo.com> Sent: Monday, February 27, 2017 6:51 PM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: A map entry has a key and a value. Try using the PHP syntax to create an associative array: array( key => value, key2 => value2, key3 => value3, ...); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barreto <ab...@yahoo.com.invalid> wrote: Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap. wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_ timeout', 15); //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ getProductInventoryAvailable? WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoap?WSDL'; $wsdl = 'https://107.180.69.62/ product/control/ soapGetProductNames/ soapWebService?WSDL'; $data=null; $options = array( //'style'=>SOAP_RPC, //'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_2, //'cache_wsdl'=>WSDL_CACHE_ NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8',
Re: Problem consuming ofbiz soap services from PHP
Shi, many thanks, excelent idea, will explore than option. Best regards From: Shi Jinghai <huaru...@hotmail.com> To: "user@ofbiz.apache.org" <user@ofbiz.apache.org> Sent: Tuesday, February 28, 2017 12:32 AM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, Perhaps you can try axis2 directly to see whether it's worked well. If yes, you can add axis2 to OFBiz as a plugin. I built an axis2 component several years ago, I'm not sure whether I can find it. Kind Regards, Shi Jinghai -邮件原件- 发件人: Alfonso Barreto [mailto:ab...@yahoo.com.INVALID] 发送时间: 2017年2月28日 8:54 收件人: Paul Foxworthy; user@ofbiz.apache.org 主题: Re: Problem consuming ofbiz soap services from PHP Thanks Paul, I tryed that syntax too, but apparently the one that works better is the one I show, with the one you say it generates an exception on the client side, just after sending. From: Paul Foxworthy <p...@cohsoft.com.au> To: user@ofbiz.apache.org; Alfonso Barreto <ab...@yahoo.com> Sent: Monday, February 27, 2017 6:51 PM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: A map entry has a key and a value. Try using the PHP syntax to create an associative array: array( key => value, key2 => value2, key3 => value3, ...); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barreto <ab...@yahoo.com.invalid> wrote: Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap. wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_ timeout', 15); //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ getProductInventoryAvailable? WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoap?WSDL'; $wsdl = 'https://107.180.69.62/ product/control/ soapGetProductNames/ soapWebService?WSDL'; $data=null; $options = array( //'style'=>SOAP_RPC, //'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_2, //'cache_wsdl'=>WSDL_CACHE_ NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8', 'exceptions'=>true, ); try { $soap = new SoapClient($wsdl,$options); //$soap->__soapCall('lupe',' lupe','lupe1234','es',null, testSoapSimple', array($params)); //$data = $soap->testSoapSimple(array(' lupe','lupe','lupe1234','es', null,34.5,'testPrueba')); //$params); //$data = $soap->testSoap(array('lupe',' lupe','lupe1234','es',null,34. 5,'testPrueba')); //$data = $soap->testRemoteSoap(array( 34.6,'Prueba2Test','lupe',' lupe1234')); //$data = $soap->testRemoteSoap1(array(' 56789','LatLonListZipCode')); $data = $soap->soapWebService(array(' prueba')); } catch(Exception $e) { print $e->getMessage(); } var_dump($data); In any combination I use, this is the log I get on the server: 2017-02-27 17:49:38,757 (http-0.0.0.0-443-10) [ VisitHandler.java:233:INFO ] Found visitorId [null] in cookie 2017-02-27 17:49:38,840 (http-0.0.0.0-443-10) [ RequestHandler.java:282:INFO ] This is the first request in this visit. sessionId= A41F2EF98F6C29894283AB3FAE4F73 9B.jvm1 2017-02-27 17:49:38,841 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# check509CertLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkRequestHeaderLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkServletRequestRemoteUserL ogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,843 (http-0.0.0.0-443-10
Re: Problem consuming ofbiz soap services from PHP
Hi Alfonso, Perhaps you can try axis2 directly to see whether it's worked well. If yes, you can add axis2 to OFBiz as a plugin. I built an axis2 component several years ago, I'm not sure whether I can find it. Kind Regards, Shi Jinghai -邮件原件- 发件人: Alfonso Barreto [mailto:ab...@yahoo.com.INVALID] 发送时间: 2017年2月28日 8:54 收件人: Paul Foxworthy; user@ofbiz.apache.org 主题: Re: Problem consuming ofbiz soap services from PHP Thanks Paul, I tryed that syntax too, but apparently the one that works better is the one I show, with the one you say it generates an exception on the client side, just after sending. From: Paul Foxworthy <p...@cohsoft.com.au> To: user@ofbiz.apache.org; Alfonso Barreto <ab...@yahoo.com> Sent: Monday, February 27, 2017 6:51 PM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: A map entry has a key and a value. Try using the PHP syntax to create an associative array: array( key => value, key2 => value2, key3 => value3, ...); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barreto <ab...@yahoo.com.invalid> wrote: Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap. wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_ timeout', 15); //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ getProductInventoryAvailable? WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoap?WSDL'; $wsdl = 'https://107.180.69.62/ product/control/ soapGetProductNames/ soapWebService?WSDL'; $data=null; $options = array( //'style'=>SOAP_RPC, //'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_2, //'cache_wsdl'=>WSDL_CACHE_ NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8', 'exceptions'=>true, ); try { $soap = new SoapClient($wsdl,$options); //$soap->__soapCall('lupe',' lupe','lupe1234','es',null, testSoapSimple', array($params)); //$data = $soap->testSoapSimple(array(' lupe','lupe','lupe1234','es', null,34.5,'testPrueba')); //$params); //$data = $soap->testSoap(array('lupe',' lupe','lupe1234','es',null,34. 5,'testPrueba')); //$data = $soap->testRemoteSoap(array( 34.6,'Prueba2Test','lupe',' lupe1234')); //$data = $soap->testRemoteSoap1(array(' 56789','LatLonListZipCode')); $data = $soap->soapWebService(array(' prueba')); } catch(Exception $e) { print $e->getMessage(); } var_dump($data); In any combination I use, this is the log I get on the server: 2017-02-27 17:49:38,757 (http-0.0.0.0-443-10) [ VisitHandler.java:233:INFO ] Found visitorId [null] in cookie 2017-02-27 17:49:38,840 (http-0.0.0.0-443-10) [ RequestHandler.java:282:INFO ] This is the first request in this visit. sessionId= A41F2EF98F6C29894283AB3FAE4F73 9B.jvm1 2017-02-27 17:49:38,841 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# check509CertLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkRequestHeaderLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkServletRequestRemoteUserL ogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,843 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkExternalLoginKey] from [preprocessor], result is [success] 2017-02-27 17:49:38,844 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.ProtectViewWorker# checkP
Re: Problem consuming ofbiz soap services from PHP
Thanks Paul, I tryed that syntax too, but apparently the one that works better is the one I show, with the one you say it generates an exception on the client side, just after sending. From: Paul Foxworthy <p...@cohsoft.com.au> To: user@ofbiz.apache.org; Alfonso Barreto <ab...@yahoo.com> Sent: Monday, February 27, 2017 6:51 PM Subject: Re: Problem consuming ofbiz soap services from PHP Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: A map entry has a key and a value. Try using the PHP syntax to create an associative array: array( key => value, key2 => value2, key3 => value3, ...); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barreto <ab...@yahoo.com.invalid> wrote: Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap. wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_ timeout', 15); //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ getProductInventoryAvailable? WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/ webtools/control/SOAPService/ testSoap?WSDL'; $wsdl = 'https://107.180.69.62/ product/control/ soapGetProductNames/ soapWebService?WSDL'; $data=null; $options = array( //'style'=>SOAP_RPC, //'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_2, //'cache_wsdl'=>WSDL_CACHE_ NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8', 'exceptions'=>true, ); try { $soap = new SoapClient($wsdl,$options); //$soap->__soapCall('lupe',' lupe','lupe1234','es',null, testSoapSimple', array($params)); //$data = $soap->testSoapSimple(array(' lupe','lupe','lupe1234','es', null,34.5,'testPrueba')); //$params); //$data = $soap->testSoap(array('lupe',' lupe','lupe1234','es',null,34. 5,'testPrueba')); //$data = $soap->testRemoteSoap(array( 34.6,'Prueba2Test','lupe',' lupe1234')); //$data = $soap->testRemoteSoap1(array(' 56789','LatLonListZipCode')); $data = $soap->soapWebService(array(' prueba')); } catch(Exception $e) { print $e->getMessage(); } var_dump($data); In any combination I use, this is the log I get on the server: 2017-02-27 17:49:38,757 (http-0.0.0.0-443-10) [ VisitHandler.java:233:INFO ] Found visitorId [null] in cookie 2017-02-27 17:49:38,840 (http-0.0.0.0-443-10) [ RequestHandler.java:282:INFO ] This is the first request in this visit. sessionId= A41F2EF98F6C29894283AB3FAE4F73 9B.jvm1 2017-02-27 17:49:38,841 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# check509CertLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkRequestHeaderLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkServletRequestRemoteUserL ogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,843 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.LoginWorker# checkExternalLoginKey] from [preprocessor], result is [success] 2017-02-27 17:49:38,844 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. control.ProtectViewWorker# checkProtectedView] from [preprocessor], result is [success] 2017-02-27 17:49:38,880 (http-0.0.0.0-443-10) [ SOAPEventHandler.java:160:INFO ] Request Message: http://www.w3.org/ 2003/05/soap-envelope" xmlns:ns1="http://ofbiz. apache.org/service/">< map-Entry>< /map-Entry>< map-Entry> 2017-02-27 17:49:38,897 (http-0.0.0.0-443-10) [ SO
Re: Problem consuming ofbiz soap services from PHP
Hi Alfonso, The log suggests to me that the parameters are not being *sent*: OFBiz is just receiving an empty map: < /map-Entry>< map-Entry> A map entry has a key and a value. Try using the PHP syntax to create an associative array: array( key => value, key2 => value2, key3 => value3, ... ); You could try using something to see the exact SOAP message before OFBiz processes it, perhaps SoapUI (soapui.org). Hope that helps. Paul Foxworthy On 28 February 2017 at 10:52, Alfonso Barretowrote: > Been trying to find and updated reference for this, but still haven't > found it. > I try to consume the soap testing services that comes on ofbiz, but for > some reason, the parameters are not readed on the server part. This is the > code Iam using on PHP, tryed several combinations but cant find the rigth > one. > Will appreciate some help. > > > > ini_set('soap.wsdl_cache_enabled', 0); > ini_set('soap.wsdl_cache_ttl', 900); > ini_set('default_socket_timeout', 15); > > > //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/ > getProductInventoryAvailable?WSDL'; > //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/ > testRemoteSoap?WSDL'; > //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/ > testRemoteSoap1?WSDL'; > //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/ > testSoapSimple?WSDL'; > $wsdl = 'https://107.180.69.62/webtools/control/SOAPService/ > testSoap?WSDL'; > $wsdl = 'https://107.180.69.62/product/control/ > soapGetProductNames/soapWebService?WSDL'; > $data=null; > $options = array( > //'style'=>SOAP_RPC, > //'use'=>SOAP_ENCODED, > 'soap_version'=>SOAP_1_2, > //'cache_wsdl'=>WSDL_CACHE_NONE, > 'connection_timeout'=>15, > 'trace'=>true, > 'encoding'=>'UTF-8', > 'exceptions'=>true, > ); > try { > $soap = new SoapClient($wsdl,$options); > > //$soap->__soapCall('lupe','lupe','lupe1234','es',null,testSoapSimple', > array($params)); > //$data = $soap->testSoapSimple(array(' > lupe','lupe','lupe1234','es',null,34.5,'testPrueba')); //$params); > //$data = $soap->testSoap(array('lupe',' > lupe','lupe1234','es',null,34.5,'testPrueba')); > //$data = $soap->testRemoteSoap(array( > 34.6,'Prueba2Test','lupe','lupe1234')); > //$data = $soap->testRemoteSoap1(array(' > 56789','LatLonListZipCode')); > $data = $soap->soapWebService(array('prueba')); > } > catch(Exception $e) { > print $e->getMessage(); > } > > var_dump($data); > > > In any combination I use, this is the log I get on the server: > 2017-02-27 17:49:38,757 (http-0.0.0.0-443-10) [ > VisitHandler.java:233:INFO ] Found visitorId [null] in cookie > 2017-02-27 17:49:38,840 (http-0.0.0.0-443-10) [ > RequestHandler.java:282:INFO ] This is the first request in this visit. > sessionId=A41F2EF98F6C29894283AB3FAE4F739B.jvm1 > 2017-02-27 17:49:38,841 (http-0.0.0.0-443-10) [ > RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. > control.LoginWorker#check509CertLogin] from [preprocessor], result is > [success] > 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ > RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. > control.LoginWorker#checkRequestHeaderLogin] from [preprocessor], result > is [success] > 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ > RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. > control.LoginWorker#checkServletRequestRemoteUserLogin] from > [preprocessor], result is [success] > 2017-02-27 17:49:38,843 (http-0.0.0.0-443-10) [ > RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. > control.LoginWorker#checkExternalLoginKey] from [preprocessor], result is > [success] > 2017-02-27 17:49:38,844 (http-0.0.0.0-443-10) [ > RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp. > control.ProtectViewWorker#checkProtectedView] from [preprocessor], result > is [success] > 2017-02-27 17:49:38,880 (http-0.0.0.0-443-10) [ > SOAPEventHandler.java:160:INFO ] Request Message: > http://www.w3.org/2003/05/soap-envelope; xmlns:ns1="http://ofbiz. > apache.org/service/">< > map-Entry>< > /map-Entry>< > map-Entry> ns1:testSoap> > > 2017-02-27 17:49:38,897 (http-0.0.0.0-443-10) [ > SOAPEventHandler.java:261:INFO ] Response Message: > http://schemas.xmlsoap.org/soap/envelope/;> Map> > > > > > > > > > > > 2017-02-27 17:49:38,899 (http-0.0.0.0-443-10) [ > RequestHandler.java:421:ERROR] Request SOAPService caused an error with the > following message: Error calling event: org.ofbiz.webapp.event. > EventHandlerException
Problem consuming ofbiz soap services from PHP
Been trying to find and updated reference for this, but still haven't found it. I try to consume the soap testing services that comes on ofbiz, but for some reason, the parameters are not readed on the server part. This is the code Iam using on PHP, tryed several combinations but cant find the rigth one. Will appreciate some help. ini_set('soap.wsdl_cache_enabled', 0); ini_set('soap.wsdl_cache_ttl', 900); ini_set('default_socket_timeout', 15); //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/getProductInventoryAvailable?WSDL'; //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/testRemoteSoap?WSDL'; //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/testRemoteSoap1?WSDL'; //$wsdl = 'https://107.180.69.62/webtools/control/SOAPService/testSoapSimple?WSDL'; $wsdl = 'https://107.180.69.62/webtools/control/SOAPService/testSoap?WSDL'; $wsdl = 'https://107.180.69.62/product/control/soapGetProductNames/soapWebService?WSDL'; $data=null; $options = array( //'style'=>SOAP_RPC, //'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_2, //'cache_wsdl'=>WSDL_CACHE_NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8', 'exceptions'=>true, ); try { $soap = new SoapClient($wsdl,$options); //$soap->__soapCall('lupe','lupe','lupe1234','es',null,testSoapSimple', array($params)); //$data = $soap->testSoapSimple(array('lupe','lupe','lupe1234','es',null,34.5,'testPrueba')); //$params); //$data = $soap->testSoap(array('lupe','lupe','lupe1234','es',null,34.5,'testPrueba')); //$data = $soap->testRemoteSoap(array(34.6,'Prueba2Test','lupe','lupe1234')); //$data = $soap->testRemoteSoap1(array('56789','LatLonListZipCode')); $data = $soap->soapWebService(array('prueba')); } catch(Exception $e) { print $e->getMessage(); } var_dump($data); In any combination I use, this is the log I get on the server: 2017-02-27 17:49:38,757 (http-0.0.0.0-443-10) [ VisitHandler.java:233:INFO ] Found visitorId [null] in cookie 2017-02-27 17:49:38,840 (http-0.0.0.0-443-10) [ RequestHandler.java:282:INFO ] This is the first request in this visit. sessionId=A41F2EF98F6C29894283AB3FAE4F739B.jvm1 2017-02-27 17:49:38,841 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.LoginWorker#check509CertLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.LoginWorker#checkRequestHeaderLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,842 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.LoginWorker#checkServletRequestRemoteUserLogin] from [preprocessor], result is [success] 2017-02-27 17:49:38,843 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.LoginWorker#checkExternalLoginKey] from [preprocessor], result is [success] 2017-02-27 17:49:38,844 (http-0.0.0.0-443-10) [ RequestHandler.java:641:INFO ] Ran Event [java:org.ofbiz.webapp.control.ProtectViewWorker#checkProtectedView] from [preprocessor], result is [success] 2017-02-27 17:49:38,880 (http-0.0.0.0-443-10) [ SOAPEventHandler.java:160:INFO ] Request Message: http://www.w3.org/2003/05/soap-envelope; xmlns:ns1="http://ofbiz.apache.org/service/;> 2017-02-27 17:49:38,897 (http-0.0.0.0-443-10) [ SOAPEventHandler.java:261:INFO ] Response Message: http://schemas.xmlsoap.org/soap/envelope/;> 2017-02-27 17:49:38,899 (http-0.0.0.0-443-10) [ RequestHandler.java:421:ERROR] Request SOAPService caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException 2017-02-27 17:49:38,900 (http-0.0.0.0-443-10) [ ServerHitBin.java:628:INFO ] Visit delegatorName=default, ServerHitBin delegatorName=default 2017-02-27 17:49:38,934 (http-0.0.0.0-443-10) [ ServerHitBin.java:722:INFO ] Duplicate ServerHit was updated: [GenericEntity:ServerHit][contentId,webtools.SOAPService(java.lang.String)][createdStamp,2017-02-27 17:49:38.903(java.sql.Timestamp)][createdTxStamp,2017-02-27 17:49:38.9(java.sql.Timestamp)][hitStartDateTime,2017-02-27 17:49:38.756(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2017-02-27 17:49:38.903(java.sql.Timestamp)][lastUpdatedTxStamp,2017-02-27
Re: OFBiz SOAP web service integration: List of GenericValue
Thanks for this confirmation Morten Jacques Le 06/10/2015 17:23, Morten Jensen a écrit : Hi Pierre, I just went with Apache Wink (now 1.4); it works fine and web.xml configuration and Application set-up is straightforward. Thanks. Morten On Tue, Oct 6, 2015 at 3:26 PM, Pierre Smitswrote: Hi Morten, Thanks for the explanation. As you said that you followed the https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST as a guideline, did you also use the suggested Apache Wink solution or did you go with the integrated Axis2 functionalities in OFBiz? Or did you use anything else? I can imagine that the wiki page mentioned as it was updated way back in 2010 for the last time. Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Tue, Oct 6, 2015 at 2:34 PM, Morten Jensen wrote: Hi Pierre, Thanks for your response, much appreciated. I did find and look at this example prior to sending out my question originally - I also looked at the XMLRPC and SOAP examples. However, none of them seemed to offer a way to bridge/exchange "GenericValue" (or list thereof) for in/output parameters; simply for the reason that in order to instantiate GenericValue you'd need the entity engine locked and loaded on client-side (which clearly makes no sense). The ofbiz framework's model is an interesting mix of model and implementation, which seems to (at least to me) make it near impossible to integrate using the options on offer. Instead what I ended up doing was build REST'ish web services inside the ofbiz framework (using https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST) with our own business specific model and translate from that to GenericValue, runService calls etc - and thereby "endorse" the ofbiz framework rather than writing a "thick" integration client that uses the exposed ofbiz services; it simply doesn't appear feasible for anything other than the most rudimentary integration work (like getting order status or whatever). Thanks. Morten On Tue, Oct 6, 2015 at 1:22 PM, Pierre Smits wrote: Hi Morten, The following document in our wiki might be of some help. https://cwiki.apache.org/confluence/display/OFBIZ/Calling+OFBiz+services+from+Liferay+using+SOAP Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Wed, Sep 23, 2015 at 12:53 PM, Morten Jensen wrote: Hi, I'm currently running a proof of concept on OFBiz web service integration in order to be able to: create party group, party person, create orders, register payments etc from external services (acting as clients to OFBiz). I am using Apache CXF (JAXB) and am exposing the various services as SOAP endpoints, mapping the WSDL as Java types. I have managed to find and create parties in this way. The problem I'm faced with is that e.g. the web service call storeOrder (createOrder) for instance requires a List of orderItems. I have had a look at the source code for creating a sales order (e.g. test/SalesOrderTest.java) and it appears that the List type is a list of GenericValue. However, the WSDL does not document this type (GenericValue) anywhere and I have no idea what its representation (in XML) might look like in order to be able to make the call. Does anyone else know how to provide e.g. orderItems to the storeOrder/createOrder web service call? Any pointers would be greatly appreciated. P.S: Separately I notice that things like (eeval-) DynamicViewEntity, PartyRole, RoleType (as returned by e.g. findParty) are not mapped in WSDL either. Instead an "eeval-" type exists in the wsdl with wsdl annotations suggesting that those should be defined by the ofbiz "module" (e.g. Party) - however, this does not appear to be the case unless I missed something somewhere? Thanks in advance for your assistance. Best regards, Morten Jensen
Re: OFBiz SOAP web service integration: List of GenericValue
Hi Pierre, I just went with Apache Wink (now 1.4); it works fine and web.xml configuration and Application set-up is straightforward. Thanks. Morten On Tue, Oct 6, 2015 at 3:26 PM, Pierre Smitswrote: > Hi Morten, > > Thanks for the explanation. As you said that you followed the > https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST > as a guideline, did you also use the suggested Apache Wink solution or did > you go with the integrated Axis2 functionalities in OFBiz? Or did you use > anything else? > > I can imagine that the wiki page mentioned as it was updated way back in > 2010 for the last time. > > Best regards, > > Pierre Smits > > *OFBiz Extensions Marketplace* > http://oem.ofbizci.net/oci-2/ > > On Tue, Oct 6, 2015 at 2:34 PM, Morten Jensen > wrote: > >> Hi Pierre, >> >> Thanks for your response, much appreciated. I did find and look at this >> example prior to sending out my question originally - I also looked at the >> XMLRPC and SOAP examples. However, none of them seemed to offer a way to >> bridge/exchange "GenericValue" (or list thereof) for in/output parameters; >> simply for the reason that in order to instantiate GenericValue you'd need >> the entity engine locked and loaded on client-side (which clearly makes no >> sense). The ofbiz framework's model is an interesting mix of model and >> implementation, which seems to (at least to me) make it near impossible to >> integrate using the options on offer. >> >> Instead what I ended up doing was build REST'ish web services inside the >> ofbiz framework (using >> https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST) >> with our own business specific model and translate from that to >> GenericValue, runService calls etc - and thereby "endorse" the ofbiz >> framework rather than writing a "thick" integration client that uses the >> exposed ofbiz services; it simply doesn't appear feasible for anything >> other than the most rudimentary integration work (like getting order status >> or whatever). >> >> Thanks. >> Morten >> >> On Tue, Oct 6, 2015 at 1:22 PM, Pierre Smits >> wrote: >> >>> Hi Morten, >>> >>> The following document in our wiki might be of some help. >>> >>> https://cwiki.apache.org/confluence/display/OFBIZ/Calling+OFBiz+services+from+Liferay+using+SOAP >>> >>> Best regards, >>> >>> Pierre Smits >>> >>> *OFBiz Extensions Marketplace* >>> http://oem.ofbizci.net/oci-2/ >>> >>> On Wed, Sep 23, 2015 at 12:53 PM, Morten Jensen >>> wrote: >>> Hi, I'm currently running a proof of concept on OFBiz web service integration in order to be able to: create party group, party person, create orders, register payments etc from external services (acting as clients to OFBiz). I am using Apache CXF (JAXB) and am exposing the various services as SOAP endpoints, mapping the WSDL as Java types. I have managed to find and create parties in this way. The problem I'm faced with is that e.g. the web service call storeOrder (createOrder) for instance requires a List of orderItems. I have had a look at the source code for creating a sales order (e.g. test/SalesOrderTest.java) and it appears that the List type is a list of GenericValue. However, the WSDL does not document this type (GenericValue) anywhere and I have no idea what its representation (in XML) might look like in order to be able to make the call. Does anyone else know how to provide e.g. orderItems to the storeOrder/createOrder web service call? Any pointers would be greatly appreciated. P.S: Separately I notice that things like (eeval-) DynamicViewEntity, PartyRole, RoleType (as returned by e.g. findParty) are not mapped in WSDL either. Instead an "eeval-" type exists in the wsdl with wsdl annotations suggesting that those should be defined by the ofbiz "module" (e.g. Party) - however, this does not appear to be the case unless I missed something somewhere? Thanks in advance for your assistance. Best regards, Morten Jensen >>> >>> >> >
Re: OFBiz SOAP web service integration: List of GenericValue
Hi Morten, Thanks for the explanation. As you said that you followed the https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST as a guideline, did you also use the suggested Apache Wink solution or did you go with the integrated Axis2 functionalities in OFBiz? Or did you use anything else? I can imagine that the wiki page mentioned as it was updated way back in 2010 for the last time. Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Tue, Oct 6, 2015 at 2:34 PM, Morten Jensenwrote: > Hi Pierre, > > Thanks for your response, much appreciated. I did find and look at this > example prior to sending out my question originally - I also looked at the > XMLRPC and SOAP examples. However, none of them seemed to offer a way to > bridge/exchange "GenericValue" (or list thereof) for in/output parameters; > simply for the reason that in order to instantiate GenericValue you'd need > the entity engine locked and loaded on client-side (which clearly makes no > sense). The ofbiz framework's model is an interesting mix of model and > implementation, which seems to (at least to me) make it near impossible to > integrate using the options on offer. > > Instead what I ended up doing was build REST'ish web services inside the > ofbiz framework (using > https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST) > with our own business specific model and translate from that to > GenericValue, runService calls etc - and thereby "endorse" the ofbiz > framework rather than writing a "thick" integration client that uses the > exposed ofbiz services; it simply doesn't appear feasible for anything > other than the most rudimentary integration work (like getting order status > or whatever). > > Thanks. > Morten > > On Tue, Oct 6, 2015 at 1:22 PM, Pierre Smits > wrote: > >> Hi Morten, >> >> The following document in our wiki might be of some help. >> >> https://cwiki.apache.org/confluence/display/OFBIZ/Calling+OFBiz+services+from+Liferay+using+SOAP >> >> Best regards, >> >> Pierre Smits >> >> *OFBiz Extensions Marketplace* >> http://oem.ofbizci.net/oci-2/ >> >> On Wed, Sep 23, 2015 at 12:53 PM, Morten Jensen >> wrote: >> >>> Hi, >>> >>> I'm currently running a proof of concept on OFBiz web service integration >>> in order to be able to: create party group, party person, create orders, >>> register payments etc from external services (acting as clients to >>> OFBiz). >>> >>> I am using Apache CXF (JAXB) and am exposing the various services as SOAP >>> endpoints, mapping the WSDL as Java types. >>> >>> I have managed to find and create parties in this way. >>> >>> The problem I'm faced with is that e.g. the web service call storeOrder >>> (createOrder) for instance requires a List of orderItems. I have had a >>> look >>> at the source code for creating a sales order (e.g. >>> test/SalesOrderTest.java) and it appears that the List type is a list of >>> GenericValue. >>> >>> However, the WSDL does not document this type (GenericValue) anywhere >>> and I >>> have no idea what its representation (in XML) might look like in order to >>> be able to make the call. >>> >>> Does anyone else know how to provide e.g. orderItems to the >>> storeOrder/createOrder web service call? Any pointers would be greatly >>> appreciated. >>> >>> P.S: Separately I notice that things like (eeval-) DynamicViewEntity, >>> PartyRole, RoleType (as returned by e.g. findParty) are not mapped in >>> WSDL >>> either. Instead an "eeval-" type exists in the wsdl with wsdl annotations >>> suggesting that those should be defined by the ofbiz "module" (e.g. >>> Party) >>> - however, this does not appear to be the case unless I missed something >>> somewhere? >>> >>> Thanks in advance for your assistance. >>> >>> Best regards, >>> Morten Jensen >>> >> >> >
Re: OFBiz SOAP web service integration: List of GenericValue
Hi Pierre, Thanks for your response, much appreciated. I did find and look at this example prior to sending out my question originally - I also looked at the XMLRPC and SOAP examples. However, none of them seemed to offer a way to bridge/exchange "GenericValue" (or list thereof) for in/output parameters; simply for the reason that in order to instantiate GenericValue you'd need the entity engine locked and loaded on client-side (which clearly makes no sense). The ofbiz framework's model is an interesting mix of model and implementation, which seems to (at least to me) make it near impossible to integrate using the options on offer. Instead what I ended up doing was build REST'ish web services inside the ofbiz framework (using https://cwiki.apache.org/confluence/display/OFBIZ/Export+service+using+REST) with our own business specific model and translate from that to GenericValue, runService calls etc - and thereby "endorse" the ofbiz framework rather than writing a "thick" integration client that uses the exposed ofbiz services; it simply doesn't appear feasible for anything other than the most rudimentary integration work (like getting order status or whatever). Thanks. Morten On Tue, Oct 6, 2015 at 1:22 PM, Pierre Smitswrote: > Hi Morten, > > The following document in our wiki might be of some help. > > https://cwiki.apache.org/confluence/display/OFBIZ/Calling+OFBiz+services+from+Liferay+using+SOAP > > Best regards, > > Pierre Smits > > *OFBiz Extensions Marketplace* > http://oem.ofbizci.net/oci-2/ > > On Wed, Sep 23, 2015 at 12:53 PM, Morten Jensen > wrote: > >> Hi, >> >> I'm currently running a proof of concept on OFBiz web service integration >> in order to be able to: create party group, party person, create orders, >> register payments etc from external services (acting as clients to OFBiz). >> >> I am using Apache CXF (JAXB) and am exposing the various services as SOAP >> endpoints, mapping the WSDL as Java types. >> >> I have managed to find and create parties in this way. >> >> The problem I'm faced with is that e.g. the web service call storeOrder >> (createOrder) for instance requires a List of orderItems. I have had a >> look >> at the source code for creating a sales order (e.g. >> test/SalesOrderTest.java) and it appears that the List type is a list of >> GenericValue. >> >> However, the WSDL does not document this type (GenericValue) anywhere and >> I >> have no idea what its representation (in XML) might look like in order to >> be able to make the call. >> >> Does anyone else know how to provide e.g. orderItems to the >> storeOrder/createOrder web service call? Any pointers would be greatly >> appreciated. >> >> P.S: Separately I notice that things like (eeval-) DynamicViewEntity, >> PartyRole, RoleType (as returned by e.g. findParty) are not mapped in WSDL >> either. Instead an "eeval-" type exists in the wsdl with wsdl annotations >> suggesting that those should be defined by the ofbiz "module" (e.g. Party) >> - however, this does not appear to be the case unless I missed something >> somewhere? >> >> Thanks in advance for your assistance. >> >> Best regards, >> Morten Jensen >> > >
Re: OFBiz SOAP web service integration: List of GenericValue
Hi Morten, The following document in our wiki might be of some help. https://cwiki.apache.org/confluence/display/OFBIZ/Calling+OFBiz+services+from+Liferay+using+SOAP Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Wed, Sep 23, 2015 at 12:53 PM, Morten Jensenwrote: > Hi, > > I'm currently running a proof of concept on OFBiz web service integration > in order to be able to: create party group, party person, create orders, > register payments etc from external services (acting as clients to OFBiz). > > I am using Apache CXF (JAXB) and am exposing the various services as SOAP > endpoints, mapping the WSDL as Java types. > > I have managed to find and create parties in this way. > > The problem I'm faced with is that e.g. the web service call storeOrder > (createOrder) for instance requires a List of orderItems. I have had a look > at the source code for creating a sales order (e.g. > test/SalesOrderTest.java) and it appears that the List type is a list of > GenericValue. > > However, the WSDL does not document this type (GenericValue) anywhere and I > have no idea what its representation (in XML) might look like in order to > be able to make the call. > > Does anyone else know how to provide e.g. orderItems to the > storeOrder/createOrder web service call? Any pointers would be greatly > appreciated. > > P.S: Separately I notice that things like (eeval-) DynamicViewEntity, > PartyRole, RoleType (as returned by e.g. findParty) are not mapped in WSDL > either. Instead an "eeval-" type exists in the wsdl with wsdl annotations > suggesting that those should be defined by the ofbiz "module" (e.g. Party) > - however, this does not appear to be the case unless I missed something > somewhere? > > Thanks in advance for your assistance. > > Best regards, > Morten Jensen >
OFBiz SOAP web service integration: List of GenericValue
Hi, I'm currently running a proof of concept on OFBiz web service integration in order to be able to: create party group, party person, create orders, register payments etc from external services (acting as clients to OFBiz). I am using Apache CXF (JAXB) and am exposing the various services as SOAP endpoints, mapping the WSDL as Java types. I have managed to find and create parties in this way. The problem I'm faced with is that e.g. the web service call storeOrder (createOrder) for instance requires a List of orderItems. I have had a look at the source code for creating a sales order (e.g. test/SalesOrderTest.java) and it appears that the List type is a list of GenericValue. However, the WSDL does not document this type (GenericValue) anywhere and I have no idea what its representation (in XML) might look like in order to be able to make the call. Does anyone else know how to provide e.g. orderItems to the storeOrder/createOrder web service call? Any pointers would be greatly appreciated. P.S: Separately I notice that things like (eeval-) DynamicViewEntity, PartyRole, RoleType (as returned by e.g. findParty) are not mapped in WSDL either. Instead an "eeval-" type exists in the wsdl with wsdl annotations suggesting that those should be defined by the ofbiz "module" (e.g. Party) - however, this does not appear to be the case unless I missed something somewhere? Thanks in advance for your assistance. Best regards, Morten Jensen
Ofbiz - SOAP services with Pentaho
Hi guys i m using apache-ofbiz-11.04.01 i using Pentaho kettle community edition, to calls SOAP service of createProduct However, the IN parameters valued are not passed to the Request Message. Hence, the product are not created Does anyone had any success in using ofbiz SOAP services ? Thanks -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
Sure, in my current project there are RMI, REST (only called services) and SOAP services (used from both side, thanks to the export option) Jacques From: twosolution jensing.c...@b2b.com.my Hi guys i m using apache-ofbiz-11.04.01 i using Pentaho kettle community edition, to calls SOAP service of createProduct However, the IN parameters valued are not passed to the Request Message. Hence, the product are not created Does anyone had any success in using ofbiz SOAP services ? Thanks -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
i tried had use the SOAP 'createProduct' services. the product are created under the default DB my ofbiz are setup with multitenant, how is it to tells the SOAP services operation to applied to which tenant ? The WDSL generated doesnt have any IN parameters to tells the tenant ID How to cater SOAP with multi tenancy ? Thanks -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735p4639741.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
HI, assign a domainname to the specifc tenant and use that domainname in the request. Regards, Hans On 03/08/2013 01:05 PM, twosolution wrote: i tried had use the SOAP 'createProduct' services. the product are created under the default DB my ofbiz are setup with multitenant, how is it to tells the SOAP services operation to applied to which tenant ? The WDSL generated doesnt have any IN parameters to tells the tenant ID How to cater SOAP with multi tenancy ? Thanks -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735p4639741.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
Hi, i had change the 1. WDSL to add a new IN parameters with the name delegator 2. add this new param in services.xml 3. add this new param in ProductServices.xml field field=delegator type=org.ofbiz.entity.Delegator/ and i passed these value to the IN param. Ofbiz still throws out Unknown parameter found: [createProduct.delegator] Am i been configuring wrong Regards -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735p4639744.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
Hi, I found this in the forum http://ofbiz.135035.n4.nabble.com/How-to-set-delegator-based-on-tenantId-passed-via-web-service-td3673046.html Does anyone had any success implementing this ? Thanks. -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735p4639746.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Ofbiz - SOAP services with Pentaho
From the thread arini.rusda succeeded following Raj's advice Maybe, if it's possible to be committed, someone could contribute it, to avoid repeating it every month ;) Jacques From: twosolution jensing.c...@b2b.com.my Hi, I found this in the forum http://ofbiz.135035.n4.nabble.com/How-to-set-delegator-based-on-tenantId-passed-via-web-service-td3673046.html Does anyone had any success implementing this ? Thanks. -- View this message in context: http://ofbiz.135035.n4.nabble.com/Ofbiz-SOAP-services-with-Pentaho-tp4639735p4639746.html Sent from the OFBiz - User mailing list archive at Nabble.com.
ofbiz-soap
hi, Is there any brief doc about making soap call. do we need to do anything in ofbiz side apart from making service settings as export. Please if anything let me know. thanks prasath rajan
Re: ofbiz-soap
Have a look for soap into FAQ Also you already participated to this recent thread http://markmail.org/message/obxwfbmcc6gujopl Jacques From: prasanth r prasanth.sunr...@gmail.com hi, Is there any brief doc about making soap call. do we need to do anything in ofbiz side apart from making service settings as export. Please if anything let me know. thanks prasath rajan
Re: Calling Ofbiz SOAP service
Hi Len, I tried with soapUI (a very good web service client) and it worked correct. Here is the soap request I used Bilgin soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ser=http://ofbiz.apache.org/service/; soapenv:Header/ soapenv:Body ser:getOrderStatus map-Map ser:map-Entry ser:map-Key ser:std-String value=orderId/ /ser:map-Key ser:map-Value ser:std-String value=DEMO_B2B_IT02/ /ser:map-Value /ser:map-Entry /map-Map /ser:getOrderStatus /soapenv:Body /soapenv:Envelope I am using the following client XML to call the getOrderStatus service as a SOAP service. The Ofbiz getOrderStatus service takes in a string ordered param and returns a string statusId. The response packet contains only a '\r\n' in the body; Does anyone have any experience on the calling client side? soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/; xmlns:ser= http://ecomstaging.purityapps.com/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/%22 soapenv:Header/ soapenv:Body ser:getOrderStatus map-Map map-Entry map-Key std-String value=orderId/ /map-Key map-Value std-String value=1234/ /map-Value /map-Entry /map-Map /ser:getOrderStatus /soapenv:Body /soapenv:Envelope Thank You Len Shein mailto:lsh...@salmonllc.com lsh...@salmonllc.com mailto:lsh...@verizon.net lsh...@verizon.net Office: 516.742.7888 ext. 225 Office: 732.333.4303
Re: Calling Ofbiz SOAP service
I had quite a few problems with the SOAP implementation. I did manage to get working with an axis client using AXIOM: http://cwiki.apache.org/confluence/x/b4KV I am using the following client XML to call the getOrderStatus service as a SOAP service. The Ofbiz getOrderStatus service takes in a string ordered param and returns a string statusId. The response packet contains only a '\r\n' in the body; Does anyone have any experience on the calling client side? soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/; xmlns:ser= http://ecomstaging.purityapps.com/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/%22 soapenv:Header/ soapenv:Body ser:getOrderStatus map-Map map-Entry map-Key std-String value=orderId/ /map-Key map-Value std-String value=1234/ /map-Value /map-Entry /map-Map /ser:getOrderStatus /soapenv:Body /soapenv:Envelope Thank You Len Shein mailto:lsh...@salmonllc.com lsh...@salmonllc.com mailto:lsh...@verizon.net lsh...@verizon.net Office: 516.742.7888 ext. 225 Office: 732.333.4303
Calling Ofbiz SOAP service
I am using the following client XML to call the getOrderStatus service as a SOAP service. The Ofbiz getOrderStatus service takes in a string ordered param and returns a string statusId. The response packet contains only a '\r\n' in the body; Does anyone have any experience on the calling client side? soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/; xmlns:ser= http://ecomstaging.purityapps.com/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/ http://localhost/webtools/control/SOAPService/%22 soapenv:Header/ soapenv:Body ser:getOrderStatus map-Map map-Entry map-Key std-String value=orderId/ /map-Key map-Value std-String value=1234/ /map-Value /map-Entry /map-Map /ser:getOrderStatus /soapenv:Body /soapenv:Envelope Thank You Len Shein mailto:lsh...@salmonllc.com lsh...@salmonllc.com mailto:lsh...@verizon.net lsh...@verizon.net Office: 516.742.7888 ext. 225 Office: 732.333.4303
Re: Ofbiz SOAP
Thanks a lot for the reply. The first link could help on complex type but I haven't found any clue regarding arrays. Could someone send me such details? A second issue I already asked for, it is also important: would it be possible to deploy a service having more than one single method inside? Many thanks, Florin If you want to use complex types you will need to use Axis. This may help http://www.nabble.com/Using-SOAP-complex-types-with-OfBiz-tp9180865p9180865.html at large http://www.nabble.com/forum/Search.jtp?query=soap+axislocal=yforum=2740daterange=0startdate=enddate= Jacques From: Florin Popa [EMAIL PROTECTED] Hello all, How can I use SOAP within Ofbiz? Is it possible to have complex OUT params like String[] or int[] or MyOwnClass[] ? [it only worked for a basic String as IN/OUT] Additionally I would need to have more methods deployed within the same web service. Is this possible? Thanks in advanced, Best regards, Florin Popa
Re: Ofbiz SOAP
Hello, From: Florin Popa [EMAIL PROTECTED] Thanks a lot for the reply. The first link could help on complex type but I haven't found any clue regarding arrays. Could someone send me such details? Try axis array on google. You may be interested notably by http://issues.apache.org/jira/browse/AXIS-2250?focusedCommentId=12363362#action_12363362 Thanks, I wil try this way. A second issue I already asked for, it is also important: would it be possible to deploy a service having more than one single method inside? I don't think it's possible, and I also wonder if this is a good idea. But I'm not sure of what you want to do. If you mean a method in a service calling another method (serial call) I think it's ok, if you mean 2 entries actually it makes no sense to me. I am already used with standard SOAP based on Apache Axis. From business logic point of view, as well as from deployment point of view, it would be more comfortable to have more entries within the same published web service. I am trying to use ofbiz (and it is not only trying - it should work) for an e-commerce system which has lots of interactions with other systems (including different programming languages c, C++ and dot net). florin Jacques Many thanks, Florin If you want to use complex types you will need to use Axis. This may help http://www.nabble.com/Using-SOAP-complex-types-with-OfBiz-tp9180865p9180865.html at large http://www.nabble.com/forum/Search.jtp?query=soap+axislocal=yforum=2740daterange=0startdate=enddate= Jacques From: Florin Popa [EMAIL PROTECTED] Hello all, How can I use SOAP within Ofbiz? Is it possible to have complex OUT params like String[] or int[] or MyOwnClass[] ? [it only worked for a basic String as IN/OUT] Additionally I would need to have more methods deployed within the same web service. Is this possible? Thanks in advanced, Best regards, Florin Popa
Re: Ofbiz SOAP
From: Florin Popa [EMAIL PROTECTED] Thanks a lot for the reply. The first link could help on complex type but I haven't found any clue regarding arrays. Could someone send me such details? Try axis array on google. You may be interested notably by http://issues.apache.org/jira/browse/AXIS-2250?focusedCommentId=12363362#action_12363362 A second issue I already asked for, it is also important: would it be possible to deploy a service having more than one single method inside? I don't think it's possible, and I also wonder if this is a good idea. But I'm not sure of what you want to do. If you mean a method in a service calling another method (serial call) I think it's ok, if you mean 2 entries actually it makes no sense to me. Jacques Many thanks, Florin If you want to use complex types you will need to use Axis. This may help http://www.nabble.com/Using-SOAP-complex-types-with-OfBiz-tp9180865p9180865.html at large http://www.nabble.com/forum/Search.jtp?query=soap+axislocal=yforum=2740daterange=0startdate=enddate= Jacques From: Florin Popa [EMAIL PROTECTED] Hello all, How can I use SOAP within Ofbiz? Is it possible to have complex OUT params like String[] or int[] or MyOwnClass[] ? [it only worked for a basic String as IN/OUT] Additionally I would need to have more methods deployed within the same web service. Is this possible? Thanks in advanced, Best regards, Florin Popa
Ofbiz SOAP
Hello all, How can I use SOAP within Ofbiz? Is it possible to have complex OUT params like String[] or int[] or MyOwnClass[] ? [it only worked for a basic String as IN/OUT] Additionally I would need to have more methods deployed within the same web service. Is this possible? Thanks in advanced, Best regards, Florin Popa
Re: Ofbiz SOAP
If you want to use complex types you will need to use Axis. This may help http://www.nabble.com/Using-SOAP-complex-types-with-OfBiz-tp9180865p9180865.html at large http://www.nabble.com/forum/Search.jtp?query=soap+axislocal=yforum=2740daterange=0startdate=enddate= Jacques From: Florin Popa [EMAIL PROTECTED] Hello all, How can I use SOAP within Ofbiz? Is it possible to have complex OUT params like String[] or int[] or MyOwnClass[] ? [it only worked for a basic String as IN/OUT] Additionally I would need to have more methods deployed within the same web service. Is this possible? Thanks in advanced, Best regards, Florin Popa
Using OFBiz SOAP with .NET 2.0
Hello, After spending way too much time trying to fix WSDL generated code (in .NET) to access OFBiz SOAP services, I ended up writing a rather simple low-level driver for it. The driver takes input map of parameters (Dictionary in NET) and returns a map from the output of the service. It currently only handles strings but can be easily extended as needed. The code is provided below. The main function shows usage of this driver for running ping service on Si's demo server. Regards, Vinay Agarwal - Code place in a .cs file and use VS2005 to run using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Text; using System.Web; using System.Xml; namespace Soap { class Program { public static string server = http://demo.opensourcestrategies.com:8085/webtools/control/SOAPService/;; public static string UrlNS = http://www.ofbiz.org/service/;; public static string UrlEnv = http://schemas.xmlsoap.org/soap/envelope/;; public static string UrlXsi = http://www.w3.org/2001/XMLSchema-instance;; public static string TypString = xsd:string; public static string ResultKey = responseMessage; public static string ResultVal = success; static Dictionarystring, string SoapService(string command, Dictionarystring, string map) { byte[] postDataBytes = getPostData(command, map); string postData = Encoding.UTF8.GetString(postDataBytes); Console.WriteLine(postData); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(server); request.Method = POST; request.ContentLength = postDataBytes.Length; using (Stream requestStream = request.GetRequestStream()) { requestStream.Write(postDataBytes, 0, postDataBytes.Length); } // get response and write to console HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Dictionarystring, string result = getResponse(response.GetResponseStream()); response.Close(); return result; } static byte[] getPostData(string command, Dictionarystring, string map) { using (MemoryStream stream = new MemoryStream()) { XmlTextWriter writer = new XmlTextWriter(stream, Encoding.UTF8); writer.WriteStartDocument(); writer.WriteStartElement(soapenv:Envelope); writer.WriteAttributeString(xmlns:soapenv, UrlEnv); writer.WriteAttributeString(xmlns:xsi, UrlXsi); writer.WriteStartElement(soapenv:Body); writer.WriteStartElement(command, UrlNS); foreach (KeyValuePairstring, string entry in map) { writer.WriteStartElement(entry.Key, UrlNS); writer.WriteAttributeString(type, TypString); writer.WriteString(entry.Value); writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndElement(); writer.Flush(); return stream.ToArray(); } } static Dictionarystring, string getResponse(Stream stream) { Dictionarystring, string map = new Dictionarystring, string(); try { XmlTextReader reader = new XmlTextReader(stream); reader.Read(); // move past container reader.ReadStartElement(soapenv:Envelope); reader.ReadStartElement(soapenv:Body); reader.ReadStartElement(); reader.Read(); while (reader.NodeType != XmlNodeType.EndElement) { string key = reader.Name; string value = reader.ReadElementString(); reader.MoveToContent(); map.Add(key, value); } } catch { return null; } // Check if service call was success or failure if (map.ContainsKey(ResultKey)) { if (map[ResultKey] == ResultVal) { map.Remove(ResultKey); return map; } } return null; } static void Main(string[] args) { Dictionarystring, string map = new Dictionarystring, string(); map.Add(message, silly); Dictionarystring, string result = SoapService(ping, map); Console.ReadKey(); } } }
Re: .NET 2.0 and Ofbiz (SOAP) Web Service Connectivity
Please have a look at http://tinyurl.com/yqsqro Jacques I am trying to figure out how to use OFBiz web services through SOAP using C# (.NET 2.0 Visual Studio 2005). I was wondering if this is a know issue? Any kind of direction on how I can fix this will be great? There are several things I tried to do unsuccessfully. I created a simple Ofbiz Service that takes three string arguments and return one string. 1) When I try to add Web Reference using WSE 3.0 to my .NET project, the auto generated proxy has the following error // CODEGEN: The operation binding 'addWorkflowStep' from namespace 'http://www.ofbiz.org/service/' was ignored. Specifying a type for use=literal messages is not supported. and it doesn't contain the code for the actual web service invocation 2) I tried to modify the WSDL (on the local file system) and added the Web Reference using the Modified wsdl, first I got the following error when I tried to contact the service System.Web.Services.Protocols.SoapException: Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapCl ientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at SimpleConsoleClient.WF.addWorkflowStep.CalladdWorkflowStep(String id, String applicationId) in C:\DocumentsandSettings\FPAdmin\Desktop\SRX0703 07601425_Maria\SimpleConsoleClient\SimpleConsoleClient\Web References\WF\Reference.cs:line 79 at SimpleConsoleClient.Program.Display() in C:\Documents and Settings\FPAdmin\Desktop\SRX070307601425_Maria\SimpleConsoleClient\Simpl eConsoleClient\Program.cs:line 62 at SimpleConsoleClient.Program.DoWork(Trap action) in C:\Documents and Settings\FPAdmin\Desktop\SRX070307601425_Maria\SimpleConsoleClient\Simpl eConsoleClient\Program.cs:line 20 3) Modifying the proxy and the wsdl file some more I was able to call ofbiz service, (I tracked the packages and was able to see the request and the response), but I was not able to read the response back. I am keep getting object array of one element that is null. POST http://storm.wcpub.es.xerox.com:8080/webtools/control/SOAPService HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.42) Content-Type: text/xml; charset=utf-8 SOAPAction: http://schemas.xmlsoap.org/soap/http; Host: storm.wcpub.es.xerox.com:8080 Content-Length: 392 Expect: 100-continue Proxy-Connection: Keep-Alive HTTP/1.1 100 Continue ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodyaddWorkflowStep xmlns=http://www.ofbiz.org/service/;id1/idapplicationIdblah /applicationIddomainIdfoo/domainId/addWorkflowStep/soap:Body/s oap:EnvelopeHTTP/1.0 200 OK Proxy-Connection: Keep-Alive Connection: Keep-Alive Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Content-Length: 629 Date: Wed, 21 Mar 2007 22:16:17 GMT Set-Cookie: JSESSIONID=2CD21B90923A7153982DE1A28ADFFD08.jvm1; Path=/webtools Set-Cookie: OFBiz.Visitor=10306; Expires=Thu, 20-Mar-2008 22:16:18 GMT; Path=/ ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body ns1:addWorkflowStepResponse xmlns:ns1=http://www.ofbiz.org/service/; workflowStepId xsi:type=soapenc:string xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;10016/workflo wStepId responseMessage xsi:type=soapenc:string xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;success/respo nseMessage /ns1:addWorkflowStepResponse /soapenv:Body /soapenv:Envelope 4) I used my project to connect to Axis service and it works fine I am getting a response back and I am able to read it. 5) I also tried to contact ofbiz service thru java eclipse project, also not successfully. Thanks a lot, Marina
Re: .NET 2.0 and Ofbiz (SOAP) Web Service Connectivity
I had very similar problems connecting .NET and OFBiz SOAP exported services. Someone (I forget who), explained that OFBiz SOAP support is very primitive at the moment, and does not support complex types. However even when I tried it with simple types it did not work! There was a discussion about this a while back on the list and everyone was having the same problem. Someone suggested using WSDL4J to generate an adequate WSDL, when I go back to this topic I will try using this tool. If I have any success I will post here. cameron ___ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
RE: .NET 2.0 and Ofbiz (SOAP) Web Service Connectivity=Solution
Hi, Thanks for quick responses! I found a quick solution, since I am newbie in the whole SOAP, WSDL, Web Services stuff probably not the best solution, but here it is... When I used WSE in .NET 2.0 and tried to add Web Reference (where you specify the Web Service url) and Visual Studio generates the proxy/client code for the service invocation and sets the message style to Document for Web service method. It goes something like this ... [System.Web.Services.Protocols.SoapDocumentMethodAttribute(, RequestNamespace = http://www.ofbiz.org/service/;, ResponseNamespace = http://www.ofbiz.org/service/;, Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public String yourServiceName(String arg) { object[] result = this.Invoke(yourServiceName , new object[0] {arg}); return (string)result[0]; } ... Since it is hard to realize what is ofbiz's WSDL SOAP message is formatted in (RPC or Document) style. I just in case tried to use RPC and it worked so I replace the code above with. ... [SoapRpcMethod()] public String yourServiceName(String arg) { object[] result = this.Invoke(yourServiceName , new object[0] {arg}); return (string)result[0]; } ... So I didn't use Visual Studio's auto generated proxy and Web Reference, I just wrote my own client, which is not different from auto generated code except the changes above. Marina
.NET 2.0 and Ofbiz (SOAP) Web Service Connectivity
Hello, I am trying to figure out how to use OFBiz web services through SOAP using C# (.NET 2.0 Visual Studio 2005). I was wondering if this is a know issue? Any kind of direction on how I can fix this will be great? There are several things I tried to do unsuccessfully. I created a simple Ofbiz Service that takes three string arguments and return one string. 1) When I try to add Web Reference using WSE 3.0 to my .NET project, the auto generated proxy has the following error // CODEGEN: The operation binding 'addWorkflowStep' from namespace 'http://www.ofbiz.org/service/' was ignored. Specifying a type for use=literal messages is not supported. and it doesn't contain the code for the actual web service invocation 2) I tried to modify the WSDL (on the local file system) and added the Web Reference using the Modified wsdl, first I got the following error when I tried to contact the service System.Web.Services.Protocols.SoapException: Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapCl ientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at SimpleConsoleClient.WF.addWorkflowStep.CalladdWorkflowStep(String id, String applicationId) in C:\DocumentsandSettings\FPAdmin\Desktop\SRX0703 07601425_Maria\SimpleConsoleClient\SimpleConsoleClient\Web References\WF\Reference.cs:line 79 at SimpleConsoleClient.Program.Display() in C:\Documents and Settings\FPAdmin\Desktop\SRX070307601425_Maria\SimpleConsoleClient\Simpl eConsoleClient\Program.cs:line 62 at SimpleConsoleClient.Program.DoWork(Trap action) in C:\Documents and Settings\FPAdmin\Desktop\SRX070307601425_Maria\SimpleConsoleClient\Simpl eConsoleClient\Program.cs:line 20 3) Modifying the proxy and the wsdl file some more I was able to call ofbiz service, (I tracked the packages and was able to see the request and the response), but I was not able to read the response back. I am keep getting object array of one element that is null. POST http://storm.wcpub.es.xerox.com:8080/webtools/control/SOAPService HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.42) Content-Type: text/xml; charset=utf-8 SOAPAction: http://schemas.xmlsoap.org/soap/http; Host: storm.wcpub.es.xerox.com:8080 Content-Length: 392 Expect: 100-continue Proxy-Connection: Keep-Alive HTTP/1.1 100 Continue ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodyaddWorkflowStep xmlns=http://www.ofbiz.org/service/;id1/idapplicationIdblah /applicationIddomainIdfoo/domainId/addWorkflowStep/soap:Body/s oap:EnvelopeHTTP/1.0 200 OK Proxy-Connection: Keep-Alive Connection: Keep-Alive Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Content-Length: 629 Date: Wed, 21 Mar 2007 22:16:17 GMT Set-Cookie: JSESSIONID=2CD21B90923A7153982DE1A28ADFFD08.jvm1; Path=/webtools Set-Cookie: OFBiz.Visitor=10306; Expires=Thu, 20-Mar-2008 22:16:18 GMT; Path=/ ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body ns1:addWorkflowStepResponse xmlns:ns1=http://www.ofbiz.org/service/; workflowStepId xsi:type=soapenc:string xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;10016/workflo wStepId responseMessage xsi:type=soapenc:string xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;success/respo nseMessage /ns1:addWorkflowStepResponse /soapenv:Body /soapenv:Envelope 4) I used my project to connect to Axis service and it works fine I am getting a response back and I am able to read it. 5) I also tried to contact ofbiz service thru java eclipse project, also not successfully. Thanks a lot, Marina