Thanks for the hints about the using webservice...
-----邮件原件----- 发件人: Nikita Shinde [mailto:[EMAIL PROTECTED] 发送时间: 2008年4月1日 14:48 收件人: user@ofbiz.apache.org 主题: RE: Use Webservice inside Hi, You have to pass the userLoginId too in the map Map = local.runSync("createPartyRole",UtilMisc.toMap("userLoginId", userLoginId, ...); Thanks, Nikita Shinde. Amicon Technologies Pvt. Ltd. Mumbai. -----Original Message----- From: Yitao_Zhao [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2008 12:06 PM To: user@ofbiz.apache.org Subject: Use Webservice inside Hi all I hope to get some hints about the webservice I configured the service.xml in my project like below: <service name="createPerson" engine="java"> <attribute name="firstName" type="String" mode="IN" optional="False"/> <attribute name="lastName" type="String" mode="IN" optional="False"/> </service> <service name="createPartyRole" engine="simple"> <attribute name="partyId" type="String" mode="INOUT" optional="True"/> <attribute name="roleTypeId" type="String" mode="IN" optional="False"/> </service> Then I try to use the webservice in the java code for remote webservice like below: @WebMethod Public String createCustomer(String customer){ . . LocalDispatcher local=GenericDispatcher.getLocalDispatcher("projectName", GenericDelegator.getGenericDelegator(("default"))); DispatchContext context=local.getDispatchContext(); Try{ Map = local.runSync("createPerson",map); String partyId = map.get("partyId"); Map = local.runSync("createPartyRole",UtilMisc.toMap(...); }catch(Exception e){ Return e.getLocalMessage(); } When I try to run createPartyRole webservice, it tell me "User authorization is required for this service: createPartyRole" How to add authentication to a webservice, any hints would be appreciate........