Difficulty Exposing Out Of Box App via SOAP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Difficulty Exposing Out Of Box App via SOAP

DeAngelo Lampkin
Hello all,

I'm exploring accessing one of the out of box OFBiz applications from
another program.  Specifically, at the moment I'm attempting to expose the
"storeOrder" service via SOAP by following Vincenzo Di Lorenzo's tutorial.

Here are the steps I've taken:

1) inside "applications/order/servicedef/services.xml", I've set
storeOrder's service export attribute to "true"
2) I've attempted to access the service at "
http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL" (slight
modification of Vincenzo's tutorial url).  When I do this, I get the
following message: "Unable to obtain WSDL".

Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?

Also, if anyone has thoughts, advice, or links about exposing the out of box
OFBiz apps via SOAP for the purposes of external access, I'm all ears.  I've
read the tutorials and have spent a lot of time going through the mailing
list archives, but I can't *quite* find anything discussing the particular
problem I'm solving (though many come close).

Basically I want to access the service layer on down (via SOAP) for an out
of box app, while creating my own GUI on top of everything (outside of
OFBiz's structure).  An earlier thread on Joomla integration seems to come
closest.

Thanks for your help!
-DeAngelo Lampkin
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

BJ Freeman
this was the implementation patch
you may find your answer there
http://lists.ofbiz.org/pipermail/svn/2005-March/001554.html


DeAngelo Lampkin wrote:

> Hello all,
>
> I'm exploring accessing one of the out of box OFBiz applications from
> another program.  Specifically, at the moment I'm attempting to expose the
> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's tutorial.
>
> Here are the steps I've taken:
>
> 1) inside "applications/order/servicedef/services.xml", I've set
> storeOrder's service export attribute to "true"
> 2) I've attempted to access the service at "
> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL" (slight
> modification of Vincenzo's tutorial url).  When I do this, I get the
> following message: "Unable to obtain WSDL".
>
> Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?
>
> Also, if anyone has thoughts, advice, or links about exposing the out of box
> OFBiz apps via SOAP for the purposes of external access, I'm all ears.  I've
> read the tutorials and have spent a lot of time going through the mailing
> list archives, but I can't *quite* find anything discussing the particular
> problem I'm solving (though many come close).
>
> Basically I want to access the service layer on down (via SOAP) for an out
> of box app, while creating my own GUI on top of everything (outside of
> OFBiz's structure).  An earlier thread on Joomla integration seems to come
> closest.
>
> Thanks for your help!
> -DeAngelo Lampkin
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

BJ Freeman
Note this patch does not conform to current trunk.
it is meant as informational.
you will have to find where this code is now in the current trunk.

[hidden email] wrote:

> this was the implementation patch
> you may find your answer there
> http://lists.ofbiz.org/pipermail/svn/2005-March/001554.html
>
>
> DeAngelo Lampkin wrote:
>> Hello all,
>>
>> I'm exploring accessing one of the out of box OFBiz applications from
>> another program.  Specifically, at the moment I'm attempting to expose
>> the
>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>> tutorial.
>>
>> Here are the steps I've taken:
>>
>> 1) inside "applications/order/servicedef/services.xml", I've set
>> storeOrder's service export attribute to "true"
>> 2) I've attempted to access the service at "
>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>> (slight
>> modification of Vincenzo's tutorial url).  When I do this, I get the
>> following message: "Unable to obtain WSDL".
>>
>> Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?
>>
>> Also, if anyone has thoughts, advice, or links about exposing the out
>> of box
>> OFBiz apps via SOAP for the purposes of external access, I'm all
>> ears.  I've
>> read the tutorials and have spent a lot of time going through the mailing
>> list archives, but I can't *quite* find anything discussing the
>> particular
>> problem I'm solving (though many come close).
>>
>> Basically I want to access the service layer on down (via SOAP) for an
>> out
>> of box app, while creating my own GUI on top of everything (outside of
>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>> come
>> closest.
>>
>> Thanks for your help!
>> -DeAngelo Lampkin
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

Jacques Le Roux
Administrator
In reply to this post by DeAngelo Lampkin
I suppose yes that you try all from http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
Actually those are pretty basic stuff, but it may help if you did not used them yet.

Jacques

From: "DeAngelo Lampkin" <[hidden email]>

> Hello all,
>
> I'm exploring accessing one of the out of box OFBiz applications from
> another program.  Specifically, at the moment I'm attempting to expose the
> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's tutorial.
>
> Here are the steps I've taken:
>
> 1) inside "applications/order/servicedef/services.xml", I've set
> storeOrder's service export attribute to "true"
> 2) I've attempted to access the service at "
> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL" (slight
> modification of Vincenzo's tutorial url).  When I do this, I get the
> following message: "Unable to obtain WSDL".
>
> Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?
>
> Also, if anyone has thoughts, advice, or links about exposing the out of box
> OFBiz apps via SOAP for the purposes of external access, I'm all ears.  I've
> read the tutorials and have spent a lot of time going through the mailing
> list archives, but I can't *quite* find anything discussing the particular
> problem I'm solving (though many come close).
>
> Basically I want to access the service layer on down (via SOAP) for an out
> of box app, while creating my own GUI on top of everything (outside of
> OFBiz's structure).  An earlier thread on Joomla integration seems to come
> closest.
>
> Thanks for your help!
> -DeAngelo Lampkin
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

Jacques Le Roux
Administrator
Sorry I cut/pasted and did not read after, the sentence should have been
I suppose you already tried all from http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379

Jacques

From: "Jacques Le Roux" <[hidden email]>

>I suppose yes that you try all from http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
> Actually those are pretty basic stuff, but it may help if you did not used them yet.
>
> Jacques
>
> From: "DeAngelo Lampkin" <[hidden email]>
>> Hello all,
>>
>> I'm exploring accessing one of the out of box OFBiz applications from
>> another program.  Specifically, at the moment I'm attempting to expose the
>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's tutorial.
>>
>> Here are the steps I've taken:
>>
>> 1) inside "applications/order/servicedef/services.xml", I've set
>> storeOrder's service export attribute to "true"
>> 2) I've attempted to access the service at "
>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL" (slight
>> modification of Vincenzo's tutorial url).  When I do this, I get the
>> following message: "Unable to obtain WSDL".
>>
>> Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?
>>
>> Also, if anyone has thoughts, advice, or links about exposing the out of box
>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.  I've
>> read the tutorials and have spent a lot of time going through the mailing
>> list archives, but I can't *quite* find anything discussing the particular
>> problem I'm solving (though many come close).
>>
>> Basically I want to access the service layer on down (via SOAP) for an out
>> of box app, while creating my own GUI on top of everything (outside of
>> OFBiz's structure).  An earlier thread on Joomla integration seems to come
>> closest.
>>
>> Thanks for your help!
>> -DeAngelo Lampkin
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

DeAngelo Lampkin
Thanks for linked file Jacques.  It was pretty enlightening.  However, I'm
still having trouble getting at the storeOrder WSDL.

Just FYI, inside "storeOrder's" services.xml (under order/servicedef), I've
added export, auth, and login-required attributes and set their values
accordingly as suggested in the linked README.  But again, this wasn't
enough to get the WSDL to come up via the followiing link:
http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL

Note however that the getPartyEmail WSDL comes up fine using
http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL, so
the URL structure seems valid.  This leads me to believe something is wrong
with my underlying configuration of of the storeOrder service.  For
reference, here's what that configuration now looks like:

" <service name="storeOrder" export="true" engine="java" validate="false"
auth="false" login-required="false"
            location="org.ofbiz.order.order.OrderServices"
invoke="createOrder">"

One thing I did note in the service definition for storeOrder - it uses the
"java" engine, whereas getPartyEmail using a "simple" engine.  Would this
make a difference?

Thanks again,
-DeAngelo



On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
[hidden email]> wrote:

> Sorry I cut/pasted and did not read after, the sentence should have been
> I suppose you already tried all from
> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
>
>  I suppose yes that you try all from
>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>> Actually those are pretty basic stuff, but it may help if you did not used
>> them yet.
>>
>> Jacques
>>
>> From: "DeAngelo Lampkin" <[hidden email]>
>>
>>> Hello all,
>>>
>>> I'm exploring accessing one of the out of box OFBiz applications from
>>> another program.  Specifically, at the moment I'm attempting to expose
>>> the
>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>> tutorial.
>>>
>>> Here are the steps I've taken:
>>>
>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>> storeOrder's service export attribute to "true"
>>> 2) I've attempted to access the service at "
>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>> (slight
>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>> following message: "Unable to obtain WSDL".
>>>
>>> Did I miss a step?  Am I hitting the wrong URL (very strong possibility)?
>>>
>>> Also, if anyone has thoughts, advice, or links about exposing the out of
>>> box
>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>  I've
>>> read the tutorials and have spent a lot of time going through the mailing
>>> list archives, but I can't *quite* find anything discussing the
>>> particular
>>> problem I'm solving (though many come close).
>>>
>>> Basically I want to access the service layer on down (via SOAP) for an
>>> out
>>> of box app, while creating my own GUI on top of everything (outside of
>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>> come
>>> closest.
>>>
>>> Thanks for your help!
>>> -DeAngelo Lampkin
>>>
>>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

DeAngelo Lampkin
This is very odd.  I've noticed that some other services with export="true"
don't have wsdls.

For example,all the  "rita" services listed in
"applications/accounting/servicedef/services_rita.xml",  have export="true"
set in their service definitions out of the box.  But the WSDL cannot be
reached for these either.

However, I *can* reach the services with export="true" listed in
framework/entityext/servicedef/services.xml.

Again, if anyone has any suggestions on this or notices a glaring oversight
on my part, please share!

-DeAngelo

On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]> wrote:

> Thanks for linked file Jacques.  It was pretty enlightening.  However, I'm
> still having trouble getting at the storeOrder WSDL.
>
> Just FYI, inside "storeOrder's" services.xml (under order/servicedef), I've
> added export, auth, and login-required attributes and set their values
> accordingly as suggested in the linked README.  But again, this wasn't
> enough to get the WSDL to come up via the followiing link:
> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>
> Note however that the getPartyEmail WSDL comes up fine using
> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL, so
> the URL structure seems valid.  This leads me to believe something is wrong
> with my underlying configuration of of the storeOrder service.  For
> reference, here's what that configuration now looks like:
>
> " <service name="storeOrder" export="true" engine="java" validate="false"
> auth="false" login-required="false"
>             location="org.ofbiz.order.order.OrderServices"
> invoke="createOrder">"
>
> One thing I did note in the service definition for storeOrder - it uses the
> "java" engine, whereas getPartyEmail using a "simple" engine.  Would this
> make a difference?
>
> Thanks again,
> -DeAngelo
>
>
>
>
> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Sorry I cut/pasted and did not read after, the sentence should have been
>> I suppose you already tried all from
>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>
>>  I suppose yes that you try all from
>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>> Actually those are pretty basic stuff, but it may help if you did not
>>> used them yet.
>>>
>>> Jacques
>>>
>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>
>>>> Hello all,
>>>>
>>>> I'm exploring accessing one of the out of box OFBiz applications from
>>>> another program.  Specifically, at the moment I'm attempting to expose
>>>> the
>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>> tutorial.
>>>>
>>>> Here are the steps I've taken:
>>>>
>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>> storeOrder's service export attribute to "true"
>>>> 2) I've attempted to access the service at "
>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>>> (slight
>>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>>> following message: "Unable to obtain WSDL".
>>>>
>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>> possibility)?
>>>>
>>>> Also, if anyone has thoughts, advice, or links about exposing the out of
>>>> box
>>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>>  I've
>>>> read the tutorials and have spent a lot of time going through the
>>>> mailing
>>>> list archives, but I can't *quite* find anything discussing the
>>>> particular
>>>> problem I'm solving (though many come close).
>>>>
>>>> Basically I want to access the service layer on down (via SOAP) for an
>>>> out
>>>> of box app, while creating my own GUI on top of everything (outside of
>>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>>> come
>>>> closest.
>>>>
>>>> Thanks for your help!
>>>> -DeAngelo Lampkin
>>>>
>>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

Jacques Le Roux
Administrator
Nothing odd in these cases

This is because OFBiz deals (for now) only with simple types.
Tip : use the screen https://localhost:18443/webtools/control/availableServices?sel_service_name=ritaCCAuth to have a better grip on
this issue
If you use https://localhost:8443/webtools/control/availableServices?sel_service_name=ritaCCAuth&show_wsdl=true
You will notice a msg which explain that parameter billToEmail is a GenericValue (from ccAuthInterface) hence the WSDL can't be
generated

To deal with other types (array, class) you will have to use something like Apache Axis
In storeOrder Timestamp, at least,  is the reason (it's a class not a simple type)

You should found what you need to understand and continue there
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Soap
I agree it's not the easier part of OFBiz. This is because, as explained David in one of the message you might find from links
above, this project is mostly oriented toward business (Open For Business ;o) and those kind of stuff are very peripheral in OFBiz

You see, all is already in the dev ML...

Jacques


From: "DeAngelo Lampkin" <[hidden email]>

> This is very odd.  I've noticed that some other services with export="true"
> don't have wsdls.
>
> For example,all the  "rita" services listed in
> "applications/accounting/servicedef/services_rita.xml",  have export="true"
> set in their service definitions out of the box.  But the WSDL cannot be
> reached for these either.
>
> However, I *can* reach the services with export="true" listed in
> framework/entityext/servicedef/services.xml.
>
> Again, if anyone has any suggestions on this or notices a glaring oversight
> on my part, please share!
>
> -DeAngelo
>
> On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]> wrote:
>
>> Thanks for linked file Jacques.  It was pretty enlightening.  However, I'm
>> still having trouble getting at the storeOrder WSDL.
>>
>> Just FYI, inside "storeOrder's" services.xml (under order/servicedef), I've
>> added export, auth, and login-required attributes and set their values
>> accordingly as suggested in the linked README.  But again, this wasn't
>> enough to get the WSDL to come up via the followiing link:
>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>
>> Note however that the getPartyEmail WSDL comes up fine using
>> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL, so
>> the URL structure seems valid.  This leads me to believe something is wrong
>> with my underlying configuration of of the storeOrder service.  For
>> reference, here's what that configuration now looks like:
>>
>> " <service name="storeOrder" export="true" engine="java" validate="false"
>> auth="false" login-required="false"
>>             location="org.ofbiz.order.order.OrderServices"
>> invoke="createOrder">"
>>
>> One thing I did note in the service definition for storeOrder - it uses the
>> "java" engine, whereas getPartyEmail using a "simple" engine.  Would this
>> make a difference?
>>
>> Thanks again,
>> -DeAngelo
>>
>>
>>
>>
>> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>> Sorry I cut/pasted and did not read after, the sentence should have been
>>> I suppose you already tried all from
>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>
>>> Jacques
>>>
>>> From: "Jacques Le Roux" <[hidden email]>
>>>
>>>  I suppose yes that you try all from
>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>> Actually those are pretty basic stuff, but it may help if you did not
>>>> used them yet.
>>>>
>>>> Jacques
>>>>
>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>
>>>>> Hello all,
>>>>>
>>>>> I'm exploring accessing one of the out of box OFBiz applications from
>>>>> another program.  Specifically, at the moment I'm attempting to expose
>>>>> the
>>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>>> tutorial.
>>>>>
>>>>> Here are the steps I've taken:
>>>>>
>>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>>> storeOrder's service export attribute to "true"
>>>>> 2) I've attempted to access the service at "
>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>>>> (slight
>>>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>>>> following message: "Unable to obtain WSDL".
>>>>>
>>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>>> possibility)?
>>>>>
>>>>> Also, if anyone has thoughts, advice, or links about exposing the out of
>>>>> box
>>>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>>>  I've
>>>>> read the tutorials and have spent a lot of time going through the
>>>>> mailing
>>>>> list archives, but I can't *quite* find anything discussing the
>>>>> particular
>>>>> problem I'm solving (though many come close).
>>>>>
>>>>> Basically I want to access the service layer on down (via SOAP) for an
>>>>> out
>>>>> of box app, while creating my own GUI on top of everything (outside of
>>>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>>>> come
>>>>> closest.
>>>>>
>>>>> Thanks for your help!
>>>>> -DeAngelo Lampkin
>>>>>
>>>>>
>>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

DeAngelo Lampkin
Thanks Jacques,

I've tried generating the WSDL for the "processOrderWf" service in the
"order" application, which has just one String parameter.  Thus no complex
types are involved.

This doesn't work either. :(  Here's the log output:

------ start log output -------------
2008-10-12 00:50:05,481 (http-0.0.0.0-8080-Processor4) [
ContextFilter.java:182:INFO ] [Request]:
/webtools/control/SOAPService/processOrderWf
2008-10-12 00:50:05,482 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:90 :INFO ] The character encoding of the request is:
[null]. The character encoding we will use for the request and response is:
[UTF-8]
2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:126:DEBUG] [[[SOAPService] Servlet Starting, doing
setup- total:0.0,since last(Begin):0.0010]]
2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:181:DEBUG] [[[SOAPService] Setup done, doing Event(s)
and View(s)- total:0.0,since last([SOAPService] Ser...):0.0]]
2008-10-12 00:50:05,492 (http-0.0.0.0-8080-Processor4) [
UtilXml.java:243:DEBUG] XML Read 0.0080s: jndi:/
0.0.0.0/webtools/WEB-INF/controller.xml
2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0010s
2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
ConfigXMLReader.java:716:INFO ] HandlerMap Created: (5) view handlers and
(7) request/event handlers in 0.0s
2008-10-12 00:50:05,495 (http-0.0.0.0-8080-Processor4) [
ConfigXMLReader.java:291:INFO ] RequestMap Created: (89) records in 0.0020s
2008-10-12 00:50:05,496 (http-0.0.0.0-8080-Processor4) [
ConfigXMLReader.java:385:INFO ] ViewMap Created: (54) records in 0.0010s
2008-10-12 00:50:05,500 (http-0.0.0.0-8080-Processor4) [
RequestHandler.java:236:INFO ] [Processing Request]: SOAPService
sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
RequestHandler.java:305:ERROR] Request SOAPService caused an error with the
following message: Error calling event:
org.ofbiz.webapp.event.EventHandlerException: Unable to obtain WSDL
2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
RequestHandler.java:430:INFO ] [RequestHandler.doRequest]: Response is
handled by the event. sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
2008-10-12 00:50:05,796 (http-0.0.0.0-8080-Processor4) [
ControlServlet.java:256:DEBUG] [[[SOAPService] Done rendering page, Servlet
Finished- total:0.313,since last([SOAPService] Set...):0.313]]
---------------   end log output ----------------------

Here is my configuration for this service:

    <!-- Order processing services -->
    <service name="processOrderWf" engine="workflow"
location="org.ofbiz.order" export="true" auth="false" invoke="ProcessOrder">
        <description>Service for testing the workflow engine</description>
        <attribute name="orderId" type="String" mode="IN" optional="false"/>
    </service>



Anyone have any ideas on the problem here?

Right now, I'm looking to get the simplest possible service (processOrderWf)
in the "order" application to generate a WSDL.  Could there be some
difference in the way WSDLs are generated under the applications directory
vs the framework directory (where the services I mentioned earlier are
loaded) vs the "hot-deploy" directory (where the opentaps tutorial services
are listed)?  I feel like there's another missing piece for exposing SOAP
over "applications" that I'm missing and/or isn't documented.

Thanks for your help once again!
-DeAngelo

On Tue, Oct 7, 2008 at 2:25 AM, Jacques Le Roux <
[hidden email]> wrote:

> Nothing odd in these cases
>
> This is because OFBiz deals (for now) only with simple types.
> Tip : use the screen
> https://localhost:18443/webtools/control/availableServices?sel_service_name=ritaCCAuthto have a better grip on
> this issue
> If you use
> https://localhost:8443/webtools/control/availableServices?sel_service_name=ritaCCAuth&show_wsdl=true
> You will notice a msg which explain that parameter billToEmail is a
> GenericValue (from ccAuthInterface) hence the WSDL can't be
> generated
>
> To deal with other types (array, class) you will have to use something like
> Apache Axis
> In storeOrder Timestamp, at least,  is the reason (it's a class not a
> simple type)
>
> You should found what you need to understand and continue there
>
> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Soap
> I agree it's not the easier part of OFBiz. This is because, as explained
> David in one of the message you might find from links
> above, this project is mostly oriented toward business (Open For Business
> ;o) and those kind of stuff are very peripheral in OFBiz
>
> You see, all is already in the dev ML...
>
>
> Jacques
>
>
> From: "DeAngelo Lampkin" <[hidden email]>
>
>> This is very odd.  I've noticed that some other services with
>> export="true"
>> don't have wsdls.
>>
>> For example,all the  "rita" services listed in
>> "applications/accounting/servicedef/services_rita.xml",  have
>> export="true"
>> set in their service definitions out of the box.  But the WSDL cannot be
>> reached for these either.
>>
>> However, I *can* reach the services with export="true" listed in
>> framework/entityext/servicedef/services.xml.
>>
>> Again, if anyone has any suggestions on this or notices a glaring
>> oversight
>> on my part, please share!
>>
>> -DeAngelo
>>
>> On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]>
>> wrote:
>>
>>  Thanks for linked file Jacques.  It was pretty enlightening.  However,
>>> I'm
>>> still having trouble getting at the storeOrder WSDL.
>>>
>>> Just FYI, inside "storeOrder's" services.xml (under order/servicedef),
>>> I've
>>> added export, auth, and login-required attributes and set their values
>>> accordingly as suggested in the linked README.  But again, this wasn't
>>> enough to get the WSDL to come up via the followiing link:
>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>>
>>> Note however that the getPartyEmail WSDL comes up fine using
>>> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL,
>>> so
>>> the URL structure seems valid.  This leads me to believe something is
>>> wrong
>>> with my underlying configuration of of the storeOrder service.  For
>>> reference, here's what that configuration now looks like:
>>>
>>> " <service name="storeOrder" export="true" engine="java" validate="false"
>>> auth="false" login-required="false"
>>>            location="org.ofbiz.order.order.OrderServices"
>>> invoke="createOrder">"
>>>
>>> One thing I did note in the service definition for storeOrder - it uses
>>> the
>>> "java" engine, whereas getPartyEmail using a "simple" engine.  Would this
>>> make a difference?
>>>
>>> Thanks again,
>>> -DeAngelo
>>>
>>>
>>>
>>>
>>> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>>  Sorry I cut/pasted and did not read after, the sentence should have been
>>>> I suppose you already tried all from
>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>
>>>> Jacques
>>>>
>>>> From: "Jacques Le Roux" <[hidden email]>
>>>>
>>>>  I suppose yes that you try all from
>>>>
>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>> Actually those are pretty basic stuff, but it may help if you did not
>>>>> used them yet.
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>>
>>>>>  Hello all,
>>>>>>
>>>>>> I'm exploring accessing one of the out of box OFBiz applications from
>>>>>> another program.  Specifically, at the moment I'm attempting to expose
>>>>>> the
>>>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>>>> tutorial.
>>>>>>
>>>>>> Here are the steps I've taken:
>>>>>>
>>>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>>>> storeOrder's service export attribute to "true"
>>>>>> 2) I've attempted to access the service at "
>>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>>>>> (slight
>>>>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>>>>> following message: "Unable to obtain WSDL".
>>>>>>
>>>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>>>> possibility)?
>>>>>>
>>>>>> Also, if anyone has thoughts, advice, or links about exposing the out
>>>>>> of
>>>>>> box
>>>>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>>>>  I've
>>>>>> read the tutorials and have spent a lot of time going through the
>>>>>> mailing
>>>>>> list archives, but I can't *quite* find anything discussing the
>>>>>> particular
>>>>>> problem I'm solving (though many come close).
>>>>>>
>>>>>> Basically I want to access the service layer on down (via SOAP) for an
>>>>>> out
>>>>>> of box app, while creating my own GUI on top of everything (outside of
>>>>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>>>>> come
>>>>>> closest.
>>>>>>
>>>>>> Thanks for your help!
>>>>>> -DeAngelo Lampkin
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

BJ Freeman
if you look at
https://localhost:8443/webtools/control/availableServices?sel_service_name=processOrderWf
you will see may strings and list get returned.
errorMessage   True   String   OUT   True    
errorMessageList True java.util.List OUT True
locale True java.util.Locale INOUT True
responseMessage True String OUT True
successMessage True String OUT True
successMessageList True java.util.List OUT True
timeZone True java.util.TimeZone INOUT True
userLogin True org.ofbiz.entity.GenericValue INOUT True
thus it is a complex return.

DeAngelo Lampkin sent the following on 10/12/2008 1:08 AM:

> Thanks Jacques,
>
> I've tried generating the WSDL for the "processOrderWf" service in the
> "order" application, which has just one String parameter.  Thus no complex
> types are involved.
>
> This doesn't work either. :(  Here's the log output:
>
> ------ start log output -------------
> 2008-10-12 00:50:05,481 (http-0.0.0.0-8080-Processor4) [
> ContextFilter.java:182:INFO ] [Request]:
> /webtools/control/SOAPService/processOrderWf
> 2008-10-12 00:50:05,482 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:90 :INFO ] The character encoding of the request is:
> [null]. The character encoding we will use for the request and response is:
> [UTF-8]
> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:126:DEBUG] [[[SOAPService] Servlet Starting, doing
> setup- total:0.0,since last(Begin):0.0010]]
> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:181:DEBUG] [[[SOAPService] Setup done, doing Event(s)
> and View(s)- total:0.0,since last([SOAPService] Ser...):0.0]]
> 2008-10-12 00:50:05,492 (http-0.0.0.0-8080-Processor4) [
> UtilXml.java:243:DEBUG] XML Read 0.0080s: jndi:/
> 0.0.0.0/webtools/WEB-INF/controller.xml
> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
> ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0010s
> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
> ConfigXMLReader.java:716:INFO ] HandlerMap Created: (5) view handlers and
> (7) request/event handlers in 0.0s
> 2008-10-12 00:50:05,495 (http-0.0.0.0-8080-Processor4) [
> ConfigXMLReader.java:291:INFO ] RequestMap Created: (89) records in 0.0020s
> 2008-10-12 00:50:05,496 (http-0.0.0.0-8080-Processor4) [
> ConfigXMLReader.java:385:INFO ] ViewMap Created: (54) records in 0.0010s
> 2008-10-12 00:50:05,500 (http-0.0.0.0-8080-Processor4) [
> RequestHandler.java:236:INFO ] [Processing Request]: SOAPService
> sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
> RequestHandler.java:305:ERROR] Request SOAPService caused an error with the
> following message: Error calling event:
> org.ofbiz.webapp.event.EventHandlerException: Unable to obtain WSDL
> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
> RequestHandler.java:430:INFO ] [RequestHandler.doRequest]: Response is
> handled by the event. sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
> 2008-10-12 00:50:05,796 (http-0.0.0.0-8080-Processor4) [
> ControlServlet.java:256:DEBUG] [[[SOAPService] Done rendering page, Servlet
> Finished- total:0.313,since last([SOAPService] Set...):0.313]]
> ---------------   end log output ----------------------
>
> Here is my configuration for this service:
>
>     <!-- Order processing services -->
>     <service name="processOrderWf" engine="workflow"
> location="org.ofbiz.order" export="true" auth="false" invoke="ProcessOrder">
>         <description>Service for testing the workflow engine</description>
>         <attribute name="orderId" type="String" mode="IN" optional="false"/>
>     </service>
>
>
>
> Anyone have any ideas on the problem here?
>
> Right now, I'm looking to get the simplest possible service (processOrderWf)
> in the "order" application to generate a WSDL.  Could there be some
> difference in the way WSDLs are generated under the applications directory
> vs the framework directory (where the services I mentioned earlier are
> loaded) vs the "hot-deploy" directory (where the opentaps tutorial services
> are listed)?  I feel like there's another missing piece for exposing SOAP
> over "applications" that I'm missing and/or isn't documented.
>
> Thanks for your help once again!
> -DeAngelo
>
> On Tue, Oct 7, 2008 at 2:25 AM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Nothing odd in these cases
>>
>> This is because OFBiz deals (for now) only with simple types.
>> Tip : use the screen
>> https://localhost:18443/webtools/control/availableServices?sel_service_name=ritaCCAuthto have a better grip on
>> this issue
>> If you use
>> https://localhost:8443/webtools/control/availableServices?sel_service_name=ritaCCAuth&show_wsdl=true
>> You will notice a msg which explain that parameter billToEmail is a
>> GenericValue (from ccAuthInterface) hence the WSDL can't be
>> generated
>>
>> To deal with other types (array, class) you will have to use something like
>> Apache Axis
>> In storeOrder Timestamp, at least,  is the reason (it's a class not a
>> simple type)
>>
>> You should found what you need to understand and continue there
>>
>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Soap
>> I agree it's not the easier part of OFBiz. This is because, as explained
>> David in one of the message you might find from links
>> above, this project is mostly oriented toward business (Open For Business
>> ;o) and those kind of stuff are very peripheral in OFBiz
>>
>> You see, all is already in the dev ML...
>>
>>
>> Jacques
>>
>>
>> From: "DeAngelo Lampkin" <[hidden email]>
>>
>>> This is very odd.  I've noticed that some other services with
>>> export="true"
>>> don't have wsdls.
>>>
>>> For example,all the  "rita" services listed in
>>> "applications/accounting/servicedef/services_rita.xml",  have
>>> export="true"
>>> set in their service definitions out of the box.  But the WSDL cannot be
>>> reached for these either.
>>>
>>> However, I *can* reach the services with export="true" listed in
>>> framework/entityext/servicedef/services.xml.
>>>
>>> Again, if anyone has any suggestions on this or notices a glaring
>>> oversight
>>> on my part, please share!
>>>
>>> -DeAngelo
>>>
>>> On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]>
>>> wrote:
>>>
>>>  Thanks for linked file Jacques.  It was pretty enlightening.  However,
>>>> I'm
>>>> still having trouble getting at the storeOrder WSDL.
>>>>
>>>> Just FYI, inside "storeOrder's" services.xml (under order/servicedef),
>>>> I've
>>>> added export, auth, and login-required attributes and set their values
>>>> accordingly as suggested in the linked README.  But again, this wasn't
>>>> enough to get the WSDL to come up via the followiing link:
>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>>>
>>>> Note however that the getPartyEmail WSDL comes up fine using
>>>> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL,
>>>> so
>>>> the URL structure seems valid.  This leads me to believe something is
>>>> wrong
>>>> with my underlying configuration of of the storeOrder service.  For
>>>> reference, here's what that configuration now looks like:
>>>>
>>>> " <service name="storeOrder" export="true" engine="java" validate="false"
>>>> auth="false" login-required="false"
>>>>            location="org.ofbiz.order.order.OrderServices"
>>>> invoke="createOrder">"
>>>>
>>>> One thing I did note in the service definition for storeOrder - it uses
>>>> the
>>>> "java" engine, whereas getPartyEmail using a "simple" engine.  Would this
>>>> make a difference?
>>>>
>>>> Thanks again,
>>>> -DeAngelo
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
>>>> [hidden email]> wrote:
>>>>
>>>>  Sorry I cut/pasted and did not read after, the sentence should have been
>>>>> I suppose you already tried all from
>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "Jacques Le Roux" <[hidden email]>
>>>>>
>>>>>  I suppose yes that you try all from
>>>>>
>>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>> Actually those are pretty basic stuff, but it may help if you did not
>>>>>> used them yet.
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>>>
>>>>>>  Hello all,
>>>>>>> I'm exploring accessing one of the out of box OFBiz applications from
>>>>>>> another program.  Specifically, at the moment I'm attempting to expose
>>>>>>> the
>>>>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>>>>> tutorial.
>>>>>>>
>>>>>>> Here are the steps I've taken:
>>>>>>>
>>>>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>>>>> storeOrder's service export attribute to "true"
>>>>>>> 2) I've attempted to access the service at "
>>>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>>>>>> (slight
>>>>>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>>>>>> following message: "Unable to obtain WSDL".
>>>>>>>
>>>>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>>>>> possibility)?
>>>>>>>
>>>>>>> Also, if anyone has thoughts, advice, or links about exposing the out
>>>>>>> of
>>>>>>> box
>>>>>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>>>>>  I've
>>>>>>> read the tutorials and have spent a lot of time going through the
>>>>>>> mailing
>>>>>>> list archives, but I can't *quite* find anything discussing the
>>>>>>> particular
>>>>>>> problem I'm solving (though many come close).
>>>>>>>
>>>>>>> Basically I want to access the service layer on down (via SOAP) for an
>>>>>>> out
>>>>>>> of box app, while creating my own GUI on top of everything (outside of
>>>>>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>>>>>> come
>>>>>>> closest.
>>>>>>>
>>>>>>> Thanks for your help!
>>>>>>> -DeAngelo Lampkin
>>>>>>>
>>>>>>>
>>>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

Jacques Le Roux
Administrator
This is because, intentionnaly or not, you used a service of type engine="workflow".  I can tell much more since I don't know much
about it, it was already deprecated when I discovered OFBiz 4 years ago.
Moreover, unless you are specifically interested to use the OFBiz workflow engine I'd not encourage you to use service of
engine="workflow" type.
This because the OFBiz workflow engine is quite deprecated  (the Shark engine too) and in OFBiz OOTB we prefer to use the ECA
concept (for Services - SECA-, Entities -EECA- and Mails -MECA call also MCA sometimes)

As I already suggested, and BJ outlined, please try before using Webtools services tools to better understand this kind of problems

Jacques


From: "BJ Freeman" <[hidden email]>

> if you look at
> https://localhost:8443/webtools/control/availableServices?sel_service_name=processOrderWf
> you will see may strings and list get returned.
> errorMessage  True  String  OUT  True
> errorMessageList True java.util.List OUT True
> locale True java.util.Locale INOUT True
> responseMessage True String OUT True
> successMessage True String OUT True
> successMessageList True java.util.List OUT True
> timeZone True java.util.TimeZone INOUT True
> userLogin True org.ofbiz.entity.GenericValue INOUT True
> thus it is a complex return.
>
> DeAngelo Lampkin sent the following on 10/12/2008 1:08 AM:
>> Thanks Jacques,
>>
>> I've tried generating the WSDL for the "processOrderWf" service in the
>> "order" application, which has just one String parameter.  Thus no complex
>> types are involved.
>>
>> This doesn't work either. :(  Here's the log output:
>>
>> ------ start log output -------------
>> 2008-10-12 00:50:05,481 (http-0.0.0.0-8080-Processor4) [
>> ContextFilter.java:182:INFO ] [Request]:
>> /webtools/control/SOAPService/processOrderWf
>> 2008-10-12 00:50:05,482 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:90 :INFO ] The character encoding of the request is:
>> [null]. The character encoding we will use for the request and response is:
>> [UTF-8]
>> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:126:DEBUG] [[[SOAPService] Servlet Starting, doing
>> setup- total:0.0,since last(Begin):0.0010]]
>> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:181:DEBUG] [[[SOAPService] Setup done, doing Event(s)
>> and View(s)- total:0.0,since last([SOAPService] Ser...):0.0]]
>> 2008-10-12 00:50:05,492 (http-0.0.0.0-8080-Processor4) [
>> UtilXml.java:243:DEBUG] XML Read 0.0080s: jndi:/
>> 0.0.0.0/webtools/WEB-INF/controller.xml
>> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
>> ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0010s
>> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
>> ConfigXMLReader.java:716:INFO ] HandlerMap Created: (5) view handlers and
>> (7) request/event handlers in 0.0s
>> 2008-10-12 00:50:05,495 (http-0.0.0.0-8080-Processor4) [
>> ConfigXMLReader.java:291:INFO ] RequestMap Created: (89) records in 0.0020s
>> 2008-10-12 00:50:05,496 (http-0.0.0.0-8080-Processor4) [
>> ConfigXMLReader.java:385:INFO ] ViewMap Created: (54) records in 0.0010s
>> 2008-10-12 00:50:05,500 (http-0.0.0.0-8080-Processor4) [
>> RequestHandler.java:236:INFO ] [Processing Request]: SOAPService
>> sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
>> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
>> RequestHandler.java:305:ERROR] Request SOAPService caused an error with the
>> following message: Error calling event:
>> org.ofbiz.webapp.event.EventHandlerException: Unable to obtain WSDL
>> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
>> RequestHandler.java:430:INFO ] [RequestHandler.doRequest]: Response is
>> handled by the event. sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
>> 2008-10-12 00:50:05,796 (http-0.0.0.0-8080-Processor4) [
>> ControlServlet.java:256:DEBUG] [[[SOAPService] Done rendering page, Servlet
>> Finished- total:0.313,since last([SOAPService] Set...):0.313]]
>> ---------------   end log output ----------------------
>>
>> Here is my configuration for this service:
>>
>>     <!-- Order processing services -->
>>     <service name="processOrderWf" engine="workflow"
>> location="org.ofbiz.order" export="true" auth="false" invoke="ProcessOrder">
>>         <description>Service for testing the workflow engine</description>
>>         <attribute name="orderId" type="String" mode="IN" optional="false"/>
>>     </service>
>>
>>
>>
>> Anyone have any ideas on the problem here?
>>
>> Right now, I'm looking to get the simplest possible service (processOrderWf)
>> in the "order" application to generate a WSDL.  Could there be some
>> difference in the way WSDLs are generated under the applications directory
>> vs the framework directory (where the services I mentioned earlier are
>> loaded) vs the "hot-deploy" directory (where the opentaps tutorial services
>> are listed)?  I feel like there's another missing piece for exposing SOAP
>> over "applications" that I'm missing and/or isn't documented.
>>
>> Thanks for your help once again!
>> -DeAngelo
>>
>> On Tue, Oct 7, 2008 at 2:25 AM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>> Nothing odd in these cases
>>>
>>> This is because OFBiz deals (for now) only with simple types.
>>> Tip : use the screen
>>> https://localhost:18443/webtools/control/availableServices?sel_service_name=ritaCCAuthto have a better grip on
>>> this issue
>>> If you use
>>> https://localhost:8443/webtools/control/availableServices?sel_service_name=ritaCCAuth&show_wsdl=true
>>> You will notice a msg which explain that parameter billToEmail is a
>>> GenericValue (from ccAuthInterface) hence the WSDL can't be
>>> generated
>>>
>>> To deal with other types (array, class) you will have to use something like
>>> Apache Axis
>>> In storeOrder Timestamp, at least,  is the reason (it's a class not a
>>> simple type)
>>>
>>> You should found what you need to understand and continue there
>>>
>>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Soap
>>> I agree it's not the easier part of OFBiz. This is because, as explained
>>> David in one of the message you might find from links
>>> above, this project is mostly oriented toward business (Open For Business
>>> ;o) and those kind of stuff are very peripheral in OFBiz
>>>
>>> You see, all is already in the dev ML...
>>>
>>>
>>> Jacques
>>>
>>>
>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>
>>>> This is very odd.  I've noticed that some other services with
>>>> export="true"
>>>> don't have wsdls.
>>>>
>>>> For example,all the  "rita" services listed in
>>>> "applications/accounting/servicedef/services_rita.xml",  have
>>>> export="true"
>>>> set in their service definitions out of the box.  But the WSDL cannot be
>>>> reached for these either.
>>>>
>>>> However, I *can* reach the services with export="true" listed in
>>>> framework/entityext/servicedef/services.xml.
>>>>
>>>> Again, if anyone has any suggestions on this or notices a glaring
>>>> oversight
>>>> on my part, please share!
>>>>
>>>> -DeAngelo
>>>>
>>>> On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]>
>>>> wrote:
>>>>
>>>>  Thanks for linked file Jacques.  It was pretty enlightening.  However,
>>>>> I'm
>>>>> still having trouble getting at the storeOrder WSDL.
>>>>>
>>>>> Just FYI, inside "storeOrder's" services.xml (under order/servicedef),
>>>>> I've
>>>>> added export, auth, and login-required attributes and set their values
>>>>> accordingly as suggested in the linked README.  But again, this wasn't
>>>>> enough to get the WSDL to come up via the followiing link:
>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>>>>
>>>>> Note however that the getPartyEmail WSDL comes up fine using
>>>>> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL,
>>>>> so
>>>>> the URL structure seems valid.  This leads me to believe something is
>>>>> wrong
>>>>> with my underlying configuration of of the storeOrder service.  For
>>>>> reference, here's what that configuration now looks like:
>>>>>
>>>>> " <service name="storeOrder" export="true" engine="java" validate="false"
>>>>> auth="false" login-required="false"
>>>>>            location="org.ofbiz.order.order.OrderServices"
>>>>> invoke="createOrder">"
>>>>>
>>>>> One thing I did note in the service definition for storeOrder - it uses
>>>>> the
>>>>> "java" engine, whereas getPartyEmail using a "simple" engine.  Would this
>>>>> make a difference?
>>>>>
>>>>> Thanks again,
>>>>> -DeAngelo
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
>>>>> [hidden email]> wrote:
>>>>>
>>>>>  Sorry I cut/pasted and did not read after, the sentence should have been
>>>>>> I suppose you already tried all from
>>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> From: "Jacques Le Roux" <[hidden email]>
>>>>>>
>>>>>>  I suppose yes that you try all from
>>>>>>
>>>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>>> Actually those are pretty basic stuff, but it may help if you did not
>>>>>>> used them yet.
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>>>>
>>>>>>>  Hello all,
>>>>>>>> I'm exploring accessing one of the out of box OFBiz applications from
>>>>>>>> another program.  Specifically, at the moment I'm attempting to expose
>>>>>>>> the
>>>>>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>>>>>> tutorial.
>>>>>>>>
>>>>>>>> Here are the steps I've taken:
>>>>>>>>
>>>>>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>>>>>> storeOrder's service export attribute to "true"
>>>>>>>> 2) I've attempted to access the service at "
>>>>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL"
>>>>>>>> (slight
>>>>>>>> modification of Vincenzo's tutorial url).  When I do this, I get the
>>>>>>>> following message: "Unable to obtain WSDL".
>>>>>>>>
>>>>>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>>>>>> possibility)?
>>>>>>>>
>>>>>>>> Also, if anyone has thoughts, advice, or links about exposing the out
>>>>>>>> of
>>>>>>>> box
>>>>>>>> OFBiz apps via SOAP for the purposes of external access, I'm all ears.
>>>>>>>>  I've
>>>>>>>> read the tutorials and have spent a lot of time going through the
>>>>>>>> mailing
>>>>>>>> list archives, but I can't *quite* find anything discussing the
>>>>>>>> particular
>>>>>>>> problem I'm solving (though many come close).
>>>>>>>>
>>>>>>>> Basically I want to access the service layer on down (via SOAP) for an
>>>>>>>> out
>>>>>>>> of box app, while creating my own GUI on top of everything (outside of
>>>>>>>> OFBiz's structure).  An earlier thread on Joomla integration seems to
>>>>>>>> come
>>>>>>>> closest.
>>>>>>>>
>>>>>>>> Thanks for your help!
>>>>>>>> -DeAngelo Lampkin
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Difficulty Exposing Out Of Box App via SOAP

Pierre Smits
Is Apache Ode or Intalio a good alternative for Shark as the workflow engine
for OFBiz? Has anyone experience in integrating these?

Regards,

Pierre

On Sun, Oct 12, 2008 at 12:00 PM, Jacques Le Roux <
[hidden email]> wrote:

> This is because, intentionnaly or not, you used a service of type
> engine="workflow".  I can tell much more since I don't know much about it,
> it was already deprecated when I discovered OFBiz 4 years ago.
> Moreover, unless you are specifically interested to use the OFBiz workflow
> engine I'd not encourage you to use service of engine="workflow" type.
> This because the OFBiz workflow engine is quite deprecated  (the Shark
> engine too) and in OFBiz OOTB we prefer to use the ECA concept (for Services
> - SECA-, Entities -EECA- and Mails -MECA call also MCA sometimes)
>
> As I already suggested, and BJ outlined, please try before using Webtools
> services tools to better understand this kind of problems
>
> Jacques
>
>
> From: "BJ Freeman" <[hidden email]>
>
>  if you look at
>>
>> https://localhost:8443/webtools/control/availableServices?sel_service_name=processOrderWf
>> you will see may strings and list get returned.
>> errorMessage  True  String  OUT  True
>> errorMessageList True java.util.List OUT True
>> locale True java.util.Locale INOUT True
>> responseMessage True String OUT True
>> successMessage True String OUT True
>> successMessageList True java.util.List OUT True
>> timeZone True java.util.TimeZone INOUT True
>> userLogin True org.ofbiz.entity.GenericValue INOUT True
>> thus it is a complex return.
>>
>> DeAngelo Lampkin sent the following on 10/12/2008 1:08 AM:
>>
>>> Thanks Jacques,
>>>
>>> I've tried generating the WSDL for the "processOrderWf" service in the
>>> "order" application, which has just one String parameter.  Thus no
>>> complex
>>> types are involved.
>>>
>>> This doesn't work either. :(  Here's the log output:
>>>
>>> ------ start log output -------------
>>> 2008-10-12 00:50:05,481 (http-0.0.0.0-8080-Processor4) [
>>> ContextFilter.java:182:INFO ] [Request]:
>>> /webtools/control/SOAPService/processOrderWf
>>> 2008-10-12 00:50:05,482 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:90 :INFO ] The character encoding of the request is:
>>> [null]. The character encoding we will use for the request and response
>>> is:
>>> [UTF-8]
>>> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:126:DEBUG] [[[SOAPService] Servlet Starting, doing
>>> setup- total:0.0,since last(Begin):0.0010]]
>>> 2008-10-12 00:50:05,483 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:181:DEBUG] [[[SOAPService] Setup done, doing Event(s)
>>> and View(s)- total:0.0,since last([SOAPService] Ser...):0.0]]
>>> 2008-10-12 00:50:05,492 (http-0.0.0.0-8080-Processor4) [
>>> UtilXml.java:243:DEBUG] XML Read 0.0080s: jndi:/
>>> 0.0.0.0/webtools/WEB-INF/controller.xml
>>> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
>>> ConfigXMLReader.java:558:INFO ] ConfigMap Created: (4) records in 0.0010s
>>> 2008-10-12 00:50:05,493 (http-0.0.0.0-8080-Processor4) [
>>> ConfigXMLReader.java:716:INFO ] HandlerMap Created: (5) view handlers and
>>> (7) request/event handlers in 0.0s
>>> 2008-10-12 00:50:05,495 (http-0.0.0.0-8080-Processor4) [
>>> ConfigXMLReader.java:291:INFO ] RequestMap Created: (89) records in
>>> 0.0020s
>>> 2008-10-12 00:50:05,496 (http-0.0.0.0-8080-Processor4) [
>>> ConfigXMLReader.java:385:INFO ] ViewMap Created: (54) records in 0.0010s
>>> 2008-10-12 00:50:05,500 (http-0.0.0.0-8080-Processor4) [
>>> RequestHandler.java:236:INFO ] [Processing Request]: SOAPService
>>> sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
>>> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
>>> RequestHandler.java:305:ERROR] Request SOAPService caused an error with
>>> the
>>> following message: Error calling event:
>>> org.ofbiz.webapp.event.EventHandlerException: Unable to obtain WSDL
>>> 2008-10-12 00:50:05,644 (http-0.0.0.0-8080-Processor4) [
>>> RequestHandler.java:430:INFO ] [RequestHandler.doRequest]: Response is
>>> handled by the event. sessionId=FBD229EDE51BD197DD444602E61A2BB7.jvm1
>>> 2008-10-12 00:50:05,796 (http-0.0.0.0-8080-Processor4) [
>>> ControlServlet.java:256:DEBUG] [[[SOAPService] Done rendering page,
>>> Servlet
>>> Finished- total:0.313,since last([SOAPService] Set...):0.313]]
>>> ---------------   end log output ----------------------
>>>
>>> Here is my configuration for this service:
>>>
>>>    <!-- Order processing services -->
>>>    <service name="processOrderWf" engine="workflow"
>>> location="org.ofbiz.order" export="true" auth="false"
>>> invoke="ProcessOrder">
>>>        <description>Service for testing the workflow engine</description>
>>>        <attribute name="orderId" type="String" mode="IN"
>>> optional="false"/>
>>>    </service>
>>>
>>>
>>>
>>> Anyone have any ideas on the problem here?
>>>
>>> Right now, I'm looking to get the simplest possible service
>>> (processOrderWf)
>>> in the "order" application to generate a WSDL.  Could there be some
>>> difference in the way WSDLs are generated under the applications
>>> directory
>>> vs the framework directory (where the services I mentioned earlier are
>>> loaded) vs the "hot-deploy" directory (where the opentaps tutorial
>>> services
>>> are listed)?  I feel like there's another missing piece for exposing SOAP
>>> over "applications" that I'm missing and/or isn't documented.
>>>
>>> Thanks for your help once again!
>>> -DeAngelo
>>>
>>> On Tue, Oct 7, 2008 at 2:25 AM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>>  Nothing odd in these cases
>>>>
>>>> This is because OFBiz deals (for now) only with simple types.
>>>> Tip : use the screen
>>>>
>>>> https://localhost:18443/webtools/control/availableServices?sel_service_name=ritaCCAuthtohave a better grip on
>>>> this issue
>>>> If you use
>>>>
>>>> https://localhost:8443/webtools/control/availableServices?sel_service_name=ritaCCAuth&show_wsdl=true
>>>> You will notice a msg which explain that parameter billToEmail is a
>>>> GenericValue (from ccAuthInterface) hence the WSDL can't be
>>>> generated
>>>>
>>>> To deal with other types (array, class) you will have to use something
>>>> like
>>>> Apache Axis
>>>> In storeOrder Timestamp, at least,  is the reason (it's a class not a
>>>> simple type)
>>>>
>>>> You should found what you need to understand and continue there
>>>>
>>>>
>>>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Soap
>>>> I agree it's not the easier part of OFBiz. This is because, as explained
>>>> David in one of the message you might find from links
>>>> above, this project is mostly oriented toward business (Open For
>>>> Business
>>>> ;o) and those kind of stuff are very peripheral in OFBiz
>>>>
>>>> You see, all is already in the dev ML...
>>>>
>>>>
>>>> Jacques
>>>>
>>>>
>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>
>>>>  This is very odd.  I've noticed that some other services with
>>>>> export="true"
>>>>> don't have wsdls.
>>>>>
>>>>> For example,all the  "rita" services listed in
>>>>> "applications/accounting/servicedef/services_rita.xml",  have
>>>>> export="true"
>>>>> set in their service definitions out of the box.  But the WSDL cannot
>>>>> be
>>>>> reached for these either.
>>>>>
>>>>> However, I *can* reach the services with export="true" listed in
>>>>> framework/entityext/servicedef/services.xml.
>>>>>
>>>>> Again, if anyone has any suggestions on this or notices a glaring
>>>>> oversight
>>>>> on my part, please share!
>>>>>
>>>>> -DeAngelo
>>>>>
>>>>> On Mon, Oct 6, 2008 at 12:11 PM, DeAngelo Lampkin <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>  Thanks for linked file Jacques.  It was pretty enlightening.  However,
>>>>>
>>>>>> I'm
>>>>>> still having trouble getting at the storeOrder WSDL.
>>>>>>
>>>>>> Just FYI, inside "storeOrder's" services.xml (under order/servicedef),
>>>>>> I've
>>>>>> added export, auth, and login-required attributes and set their values
>>>>>> accordingly as suggested in the linked README.  But again, this wasn't
>>>>>> enough to get the WSDL to come up via the followiing link:
>>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>>>>>
>>>>>> Note however that the getPartyEmail WSDL comes up fine using
>>>>>> http://localhost:8080/webtools/control/SOAPService/getPartyEmail?WSDL
>>>>>> ,
>>>>>> so
>>>>>> the URL structure seems valid.  This leads me to believe something is
>>>>>> wrong
>>>>>> with my underlying configuration of of the storeOrder service.  For
>>>>>> reference, here's what that configuration now looks like:
>>>>>>
>>>>>> " <service name="storeOrder" export="true" engine="java"
>>>>>> validate="false"
>>>>>> auth="false" login-required="false"
>>>>>>           location="org.ofbiz.order.order.OrderServices"
>>>>>> invoke="createOrder">"
>>>>>>
>>>>>> One thing I did note in the service definition for storeOrder - it
>>>>>> uses
>>>>>> the
>>>>>> "java" engine, whereas getPartyEmail using a "simple" engine.  Would
>>>>>> this
>>>>>> make a difference?
>>>>>>
>>>>>> Thanks again,
>>>>>> -DeAngelo
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Oct 6, 2008 at 4:40 AM, Jacques Le Roux <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>>  Sorry I cut/pasted and did not read after, the sentence should have
>>>>>> been
>>>>>>
>>>>>>> I suppose you already tried all from
>>>>>>> http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>> From: "Jacques Le Roux" <[hidden email]>
>>>>>>>
>>>>>>>  I suppose yes that you try all from
>>>>>>>
>>>>>>>  http://docs.ofbiz.org/pages/viewpageattachments.action?pageId=1379
>>>>>>>> Actually those are pretty basic stuff, but it may help if you did
>>>>>>>> not
>>>>>>>> used them yet.
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> From: "DeAngelo Lampkin" <[hidden email]>
>>>>>>>>
>>>>>>>>  Hello all,
>>>>>>>>
>>>>>>>>> I'm exploring accessing one of the out of box OFBiz applications
>>>>>>>>> from
>>>>>>>>> another program.  Specifically, at the moment I'm attempting to
>>>>>>>>> expose
>>>>>>>>> the
>>>>>>>>> "storeOrder" service via SOAP by following Vincenzo Di Lorenzo's
>>>>>>>>> tutorial.
>>>>>>>>>
>>>>>>>>> Here are the steps I've taken:
>>>>>>>>>
>>>>>>>>> 1) inside "applications/order/servicedef/services.xml", I've set
>>>>>>>>> storeOrder's service export attribute to "true"
>>>>>>>>> 2) I've attempted to access the service at "
>>>>>>>>> http://localhost:8080/webtools/control/SOAPService/storeOrder?WSDL
>>>>>>>>> "
>>>>>>>>> (slight
>>>>>>>>> modification of Vincenzo's tutorial url).  When I do this, I get
>>>>>>>>> the
>>>>>>>>> following message: "Unable to obtain WSDL".
>>>>>>>>>
>>>>>>>>> Did I miss a step?  Am I hitting the wrong URL (very strong
>>>>>>>>> possibility)?
>>>>>>>>>
>>>>>>>>> Also, if anyone has thoughts, advice, or links about exposing the
>>>>>>>>> out
>>>>>>>>> of
>>>>>>>>> box
>>>>>>>>> OFBiz apps via SOAP for the purposes of external access, I'm all
>>>>>>>>> ears.
>>>>>>>>>  I've
>>>>>>>>> read the tutorials and have spent a lot of time going through the
>>>>>>>>> mailing
>>>>>>>>> list archives, but I can't *quite* find anything discussing the
>>>>>>>>> particular
>>>>>>>>> problem I'm solving (though many come close).
>>>>>>>>>
>>>>>>>>> Basically I want to access the service layer on down (via SOAP) for
>>>>>>>>> an
>>>>>>>>> out
>>>>>>>>> of box app, while creating my own GUI on top of everything (outside
>>>>>>>>> of
>>>>>>>>> OFBiz's structure).  An earlier thread on Joomla integration seems
>>>>>>>>> to
>>>>>>>>> come
>>>>>>>>> closest.
>>>>>>>>>
>>>>>>>>> Thanks for your help!
>>>>>>>>> -DeAngelo Lampkin
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>
>>
>