You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ram <ra...@gmail.com> on 2008/12/16 22:44:47 UTC

Ofbiz Service issue

Hi,
i have successfully exposed updatePerson as a soap service.

but when i send request i get the following error.

---- exception report
----------------------------------------------------------
Service [updatePerson] threw an unexpected exception/error
Exception: org.ofbiz.service.ServiceAuthException
Message: User authorization is required for this service: updatePerson
---- stack trace
---------------------------------------------------------------
org.ofbiz.service.ServiceAuthException: User authorization is required for
this service: updatePerson
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:123)
org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:252)
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:416)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:252)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:192)
...
...

Can anyone let me know how do i send the credentials to the OfBiz service?
as a Http Header? or as a soap header attribute?

also does admin/ofbiz has the rights to delete/ update person?

thanks in advance.

regards
ram.

Re: Ofbiz Service issue

Posted by Jacek Wagner <ja...@berkeley.edu>.
Ram wrote:
> Hi Wagner,
> Thanks i looked into the source code and identified i need to pass these
> parameters as well
>
>          <login.username>xxx</login.username>
>          <login.password>yyy</login.password>
>
> But is this a correct way of doing it?
> As these parameters doesn't pop up in wsdl, now if i use JAX WS RI tools to
> generate artifacts based on the wsdl, then i am gonna miss these two
> parameters... which makes me a little skeptical.
>
> regards
> ram.
>
>
> On Tue, Dec 16, 2008 at 6:06 PM, Jacek Wagner <ja...@berkeley.edu>wrote:
>
>   
>> You have to pass userid and password just like other required parameters.
>>
>> Jacek
>>
>>
>> BJ Freeman wrote:
>>
>>     
>>> read the link you have been given as to soap
>>>
>>> Ram sent the following on 12/16/2008 1:44 PM:
>>>
>>>
>>>       
>>>> Hi,
>>>> i have successfully exposed updatePerson as a soap service.
>>>>
>>>> but when i send request i get the following error.
>>>>
>>>> ---- exception report
>>>> ----------------------------------------------------------
>>>> Service [updatePerson] threw an unexpected exception/error
>>>> Exception: org.ofbiz.service.ServiceAuthException
>>>> Message: User authorization is required for this service: updatePerson
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> org.ofbiz.service.ServiceAuthException: User authorization is required
>>>> for
>>>> this service: updatePerson
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:123)
>>>> org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:252)
>>>> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:416)
>>>>
>>>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:252)
>>>> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:192)
>>>> ...
>>>> ...
>>>>
>>>> Can anyone let me know how do i send the credentials to the OfBiz
>>>> service?
>>>> as a Http Header? or as a soap header attribute?
>>>>
>>>> also does admin/ofbiz has the rights to delete/ update person?
>>>>
>>>> thanks in advance.
>>>>
>>>> regards
>>>> ram.
>>>>
>>>>
>>>>
>>>>         
>
>   
It is the only way it works. It took me a week to figure it out. Please 
let me know if you find a better way.

Jacek

Re: Ofbiz Service issue

Posted by Ram <ra...@gmail.com>.
Hi Wagner,
Thanks i looked into the source code and identified i need to pass these
parameters as well

         <login.username>xxx</login.username>
         <login.password>yyy</login.password>

But is this a correct way of doing it?
As these parameters doesn't pop up in wsdl, now if i use JAX WS RI tools to
generate artifacts based on the wsdl, then i am gonna miss these two
parameters... which makes me a little skeptical.

regards
ram.


On Tue, Dec 16, 2008 at 6:06 PM, Jacek Wagner <ja...@berkeley.edu>wrote:

> You have to pass userid and password just like other required parameters.
>
> Jacek
>
>
> BJ Freeman wrote:
>
>> read the link you have been given as to soap
>>
>> Ram sent the following on 12/16/2008 1:44 PM:
>>
>>
>>> Hi,
>>> i have successfully exposed updatePerson as a soap service.
>>>
>>> but when i send request i get the following error.
>>>
>>> ---- exception report
>>> ----------------------------------------------------------
>>> Service [updatePerson] threw an unexpected exception/error
>>> Exception: org.ofbiz.service.ServiceAuthException
>>> Message: User authorization is required for this service: updatePerson
>>> ---- stack trace
>>> ---------------------------------------------------------------
>>> org.ofbiz.service.ServiceAuthException: User authorization is required
>>> for
>>> this service: updatePerson
>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)
>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:123)
>>> org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:252)
>>> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:416)
>>>
>>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:252)
>>> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:192)
>>> ...
>>> ...
>>>
>>> Can anyone let me know how do i send the credentials to the OfBiz
>>> service?
>>> as a Http Header? or as a soap header attribute?
>>>
>>> also does admin/ofbiz has the rights to delete/ update person?
>>>
>>> thanks in advance.
>>>
>>> regards
>>> ram.
>>>
>>>
>>>
>>
>

Re: Ofbiz Service issue

Posted by Jacek Wagner <ja...@berkeley.edu>.
You have to pass userid and password just like other required parameters.

Jacek

BJ Freeman wrote:
> read the link you have been given as to soap
>
> Ram sent the following on 12/16/2008 1:44 PM:
>   
>> Hi,
>> i have successfully exposed updatePerson as a soap service.
>>
>> but when i send request i get the following error.
>>
>> ---- exception report
>> ----------------------------------------------------------
>> Service [updatePerson] threw an unexpected exception/error
>> Exception: org.ofbiz.service.ServiceAuthException
>> Message: User authorization is required for this service: updatePerson
>> ---- stack trace
>> ---------------------------------------------------------------
>> org.ofbiz.service.ServiceAuthException: User authorization is required for
>> this service: updatePerson
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)
>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:123)
>> org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:252)
>> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:416)
>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:252)
>> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:192)
>> ...
>> ...
>>
>> Can anyone let me know how do i send the credentials to the OfBiz service?
>> as a Http Header? or as a soap header attribute?
>>
>> also does admin/ofbiz has the rights to delete/ update person?
>>
>> thanks in advance.
>>
>> regards
>> ram.
>>
>>     


Re: Ofbiz Service issue

Posted by BJ Freeman <bj...@free-man.net>.
read the link you have been given as to soap

Ram sent the following on 12/16/2008 1:44 PM:
> Hi,
> i have successfully exposed updatePerson as a soap service.
> 
> but when i send request i get the following error.
> 
> ---- exception report
> ----------------------------------------------------------
> Service [updatePerson] threw an unexpected exception/error
> Exception: org.ofbiz.service.ServiceAuthException
> Message: User authorization is required for this service: updatePerson
> ---- stack trace
> ---------------------------------------------------------------
> org.ofbiz.service.ServiceAuthException: User authorization is required for
> this service: updatePerson
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:214)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:123)
> org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:252)
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:416)
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:252)
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:192)
> ...
> ...
> 
> Can anyone let me know how do i send the credentials to the OfBiz service?
> as a Http Header? or as a soap header attribute?
> 
> also does admin/ofbiz has the rights to delete/ update person?
> 
> thanks in advance.
> 
> regards
> ram.
>