Can i deploy java xml web services on ofbiz tomcat ?

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

Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi all

I am a newbie to ofbiz. I understood that the services are specified service.xml.

Is there any possibility to develop my own "java xml web services" and deploy then om ofbiz tomcat server?.

Need : I want to make a web services layer in ofbiz project and expose the ofbiz services (service.xml) with some extra funtionality.

Suggestion are welcome :-)

Thanks in advance

/Regards
Rakesh
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
Like me when I first came, I had a misconception about what things meant.
I believe you would be farther ahead by reading the wealth of
information in the document site.  It was not available when I started.

for instance the service.xml is for runing services defined in other xml
files that relate to ofbiz structure.

what you call a java xml web service would be a module like the one in
/framework/example


RockyOfbiz sent the following on 10/12/2007 9:14 AM:

> Hi all
>
> I am a newbie to ofbiz. I understood that the services are specified
> service.xml.
>
> Is there any possibility to develop my own "java xml web services" and
> deploy then om ofbiz tomcat server?.
>
> Need : I want to make a web services layer in ofbiz project and expose the
> ofbiz services (service.xml) with some extra funtionality.
>
> Suggestion are welcome :-)
>
> Thanks in advance
>
> /Regards
> Rakesh
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi BJ,

I am not sure about the framework/example. Can u tell me in detail if possible please?.

I wanna develop a web service layer kinda stuff. So that i can reduce the generation of stubs for WSDL.

It can act like a wrapper and combile all the services (service.xml) and provide only one endpoint for each application like this.

http://localhost/webtools/product?wsdl
http://localhost/webtools/accounting?wsdl

Do u have any other plans?

/R
BJ Freeman wrote
Like me when I first came, I had a misconception about what things meant.
I believe you would be farther ahead by reading the wealth of
information in the document site.  It was not available when I started.

for instance the service.xml is for runing services defined in other xml
files that relate to ofbiz structure.

what you call a java xml web service would be a module like the one in
/framework/example


RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> Hi all
>
> I am a newbie to ofbiz. I understood that the services are specified
> service.xml.
>
> Is there any possibility to develop my own "java xml web services" and
> deploy then om ofbiz tomcat server?.
>
> Need : I want to make a web services layer in ofbiz project and expose the
> ofbiz services (service.xml) with some extra funtionality.
>
> Suggestion are welcome :-)
>
> Thanks in advance
>
> /Regards
> Rakesh
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
You are welcome to do what you want.
Are you asking if it is something you can to contribute to ofbiz?
Have you read the best practices
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices




RockyOfbiz sent the following on 10/13/2007 5:31 AM:

> Hi BJ,
>
> I am not sure about the framework/example. Can u tell me in detail if
> possible please?.
>
> I wanna develop a web service layer kinda stuff. So that i can reduce the
> generation of stubs for WSDL.
>
> It can act like a wrapper and combile all the services (service.xml) and
> provide only one endpoint for each application like this.
>
> http://localhost/webtools/product?wsdl
> http://localhost/webtools/accounting?wsdl
>
> Do u have any other plans?
>
> /R
>
> BJ Freeman wrote:
>> Like me when I first came, I had a misconception about what things meant.
>> I believe you would be farther ahead by reading the wealth of
>> information in the document site.  It was not available when I started.
>>
>> for instance the service.xml is for runing services defined in other xml
>> files that relate to ofbiz structure.
>>
>> what you call a java xml web service would be a module like the one in
>> /framework/example
>>
>>
>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>> Hi all
>>>
>>> I am a newbie to ofbiz. I understood that the services are specified
>>> service.xml.
>>>
>>> Is there any possibility to develop my own "java xml web services" and
>>> deploy then om ofbiz tomcat server?.
>>>
>>> Need : I want to make a web services layer in ofbiz project and expose
>>> the
>>> ofbiz services (service.xml) with some extra funtionality.
>>>
>>> Suggestion are welcome :-)
>>>
>>> Thanks in advance
>>>
>>> /Regards
>>> Rakesh
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi BJ

No i am not talking about contribution. I am just trying to understand the things now so i dont think i can do contribute at this stage. ;-).

I am just trying to find out a way to my problem.

How can i deploy my own java xml web services on ofbiz tomcat server?.

is it possible or not?

Regards
/R
BJ Freeman wrote
You are welcome to do what you want.
Are you asking if it is something you can to contribute to ofbiz?
Have you read the best practices
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices




RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> Hi BJ,
>
> I am not sure about the framework/example. Can u tell me in detail if
> possible please?.
>
> I wanna develop a web service layer kinda stuff. So that i can reduce the
> generation of stubs for WSDL.
>
> It can act like a wrapper and combile all the services (service.xml) and
> provide only one endpoint for each application like this.
>
> http://localhost/webtools/product?wsdl
> http://localhost/webtools/accounting?wsdl
>
> Do u have any other plans?
>
> /R
>
> BJ Freeman wrote:
>> Like me when I first came, I had a misconception about what things meant.
>> I believe you would be farther ahead by reading the wealth of
>> information in the document site.  It was not available when I started.
>>
>> for instance the service.xml is for runing services defined in other xml
>> files that relate to ofbiz structure.
>>
>> what you call a java xml web service would be a module like the one in
>> /framework/example
>>
>>
>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>> Hi all
>>>
>>> I am a newbie to ofbiz. I understood that the services are specified
>>> service.xml.
>>>
>>> Is there any possibility to develop my own "java xml web services" and
>>> deploy then om ofbiz tomcat server?.
>>>
>>> Need : I want to make a web services layer in ofbiz project and expose
>>> the
>>> ofbiz services (service.xml) with some extra funtionality.
>>>
>>> Suggestion are welcome :-)
>>>
>>> Thanks in advance
>>>
>>> /Regards
>>> Rakesh
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
use Hot deploy
and put in your own
ofbiz-component.xml

RockyOfbiz sent the following on 10/13/2007 11:37 AM:

> Hi BJ
>
> No i am not talking about contribution. I am just trying to understand the
> things now so i dont think i can do contribute at this stage. ;-).
>
> I am just trying to find out a way to my problem.
>
> How can i deploy my own java xml web services on ofbiz tomcat server?.
>
> is it possible or not?
>
> /R
>
> BJ Freeman wrote:
>> You are welcome to do what you want.
>> Are you asking if it is something you can to contribute to ofbiz?
>> Have you read the best practices
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>
>>
>>
>>
>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>> Hi BJ,
>>>
>>> I am not sure about the framework/example. Can u tell me in detail if
>>> possible please?.
>>>
>>> I wanna develop a web service layer kinda stuff. So that i can reduce the
>>> generation of stubs for WSDL.
>>>
>>> It can act like a wrapper and combile all the services (service.xml) and
>>> provide only one endpoint for each application like this.
>>>
>>> http://localhost/webtools/product?wsdl
>>> http://localhost/webtools/accounting?wsdl
>>>
>>> Do u have any other plans?
>>>
>>> /R
>>>
>>> BJ Freeman wrote:
>>>> Like me when I first came, I had a misconception about what things
>>>> meant.
>>>> I believe you would be farther ahead by reading the wealth of
>>>> information in the document site.  It was not available when I started.
>>>>
>>>> for instance the service.xml is for runing services defined in other xml
>>>> files that relate to ofbiz structure.
>>>>
>>>> what you call a java xml web service would be a module like the one in
>>>> /framework/example
>>>>
>>>>
>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>> Hi all
>>>>>
>>>>> I am a newbie to ofbiz. I understood that the services are specified
>>>>> service.xml.
>>>>>
>>>>> Is there any possibility to develop my own "java xml web services" and
>>>>> deploy then om ofbiz tomcat server?.
>>>>>
>>>>> Need : I want to make a web services layer in ofbiz project and expose
>>>>> the
>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>
>>>>> Suggestion are welcome :-)
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>> /Regards
>>>>> Rakesh
>>>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

Jacques Le Roux
Administrator
In reply to this post by RockyOfbiz
You may have at least a look at http://docs.ofbiz.org/x/PQM
and more generally http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index

Jacques

De : "RockyOfbiz" <[hidden email]>


>
> Hi BJ
>
> No i am not talking about contribution. I am just trying to understand the
> things now so i dont think i can do contribute at this stage. ;-).
>
> I am just trying to find out a way to my problem.
>
> How can i deploy my own java xml web services on ofbiz tomcat server?.
>
> is it possible or not?
>
> /R
>
> BJ Freeman wrote:
> >
> > You are welcome to do what you want.
> > Are you asking if it is something you can to contribute to ofbiz?
> > Have you read the best practices
> > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >
> >
> >
> >
> > RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> Hi BJ,
> >>
> >> I am not sure about the framework/example. Can u tell me in detail if
> >> possible please?.
> >>
> >> I wanna develop a web service layer kinda stuff. So that i can reduce the
> >> generation of stubs for WSDL.
> >>
> >> It can act like a wrapper and combile all the services (service.xml) and
> >> provide only one endpoint for each application like this.
> >>
> >> http://localhost/webtools/product?wsdl
> >> http://localhost/webtools/accounting?wsdl
> >>
> >> Do u have any other plans?
> >>
> >> /R
> >>
> >> BJ Freeman wrote:
> >>> Like me when I first came, I had a misconception about what things
> >>> meant.
> >>> I believe you would be farther ahead by reading the wealth of
> >>> information in the document site.  It was not available when I started.
> >>>
> >>> for instance the service.xml is for runing services defined in other xml
> >>> files that relate to ofbiz structure.
> >>>
> >>> what you call a java xml web service would be a module like the one in
> >>> /framework/example
> >>>
> >>>
> >>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >>>> Hi all
> >>>>
> >>>> I am a newbie to ofbiz. I understood that the services are specified
> >>>> service.xml.
> >>>>
> >>>> Is there any possibility to develop my own "java xml web services" and
> >>>> deploy then om ofbiz tomcat server?.
> >>>>
> >>>> Need : I want to make a web services layer in ofbiz project and expose
> >>>> the
> >>>> ofbiz services (service.xml) with some extra funtionality.
> >>>>
> >>>> Suggestion are welcome :-)
> >>>>
> >>>> Thanks in advance
> >>>>
> >>>> /Regards
> >>>> Rakesh
> >>>>
> >>>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi There

Thanks for your reply. Certainly i have gone through of these videos.

Here is my problem scenario
I have created a new web application (myOwnWebapplication) in hot-deploy. and configured in ofbiz-component.xml

it works perfect.

But if i create a java web service in that webapplication (myOwnWebapplication) and trying to run the server and it throws error saying it cant find the web service implementation(ClassNotFoundException). I have set the class paths to build/web/WEB-INF/lib. and all classes are there.

I am using java 1.5 and netbeans.

Any idea Whats wrong?
Thanks in advance

Here is a stack trace

2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR] Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.exception.LocatableWebServiceException: class not found in runtime descriptor: newpackage.NewWebService
at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:107)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
        at org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
        at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
        at org.ofbiz.base.start.Start.startServer(Start.java:317)
        at org.ofbiz.base.start.Start.start(Start.java:321)
        at org.ofbiz.base.start.Start.main(Start.java:407)
Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException: class not found in runtime descriptor: newpackage.NewWebService
at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:531)
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:207)
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
        at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
        ... 13 more
Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:528)

jacques.le.roux wrote
You may have at least a look at http://docs.ofbiz.org/x/PQM
and more generally http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index

Jacques

De : "RockyOfbiz" <rakesh_bov@yahoo.com>


>
> Hi BJ
>
> No i am not talking about contribution. I am just trying to understand the
> things now so i dont think i can do contribute at this stage. ;-).
>
> I am just trying to find out a way to my problem.
>
> How can i deploy my own java xml web services on ofbiz tomcat server?.
>
> is it possible or not?
>
> /R
>
> BJ Freeman wrote:
> >
> > You are welcome to do what you want.
> > Are you asking if it is something you can to contribute to ofbiz?
> > Have you read the best practices
> > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >
> >
> >
> >
> > RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> Hi BJ,
> >>
> >> I am not sure about the framework/example. Can u tell me in detail if
> >> possible please?.
> >>
> >> I wanna develop a web service layer kinda stuff. So that i can reduce the
> >> generation of stubs for WSDL.
> >>
> >> It can act like a wrapper and combile all the services (service.xml) and
> >> provide only one endpoint for each application like this.
> >>
> >> http://localhost/webtools/product?wsdl
> >> http://localhost/webtools/accounting?wsdl
> >>
> >> Do u have any other plans?
> >>
> >> /R
> >>
> >> BJ Freeman wrote:
> >>> Like me when I first came, I had a misconception about what things
> >>> meant.
> >>> I believe you would be farther ahead by reading the wealth of
> >>> information in the document site.  It was not available when I started.
> >>>
> >>> for instance the service.xml is for runing services defined in other xml
> >>> files that relate to ofbiz structure.
> >>>
> >>> what you call a java xml web service would be a module like the one in
> >>> /framework/example
> >>>
> >>>
> >>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >>>> Hi all
> >>>>
> >>>> I am a newbie to ofbiz. I understood that the services are specified
> >>>> service.xml.
> >>>>
> >>>> Is there any possibility to develop my own "java xml web services" and
> >>>> deploy then om ofbiz tomcat server?.
> >>>>
> >>>> Need : I want to make a web services layer in ofbiz project and expose
> >>>> the
> >>>> ofbiz services (service.xml) with some extra funtionality.
> >>>>
> >>>> Suggestion are welcome :-)
> >>>>
> >>>> Thanks in advance
> >>>>
> >>>> /Regards
> >>>> Rakesh
> >>>>
> >>>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
maybe someone else will understand what you are trying to do
But I need clarification.
please explain java web services you are referring to.
you are not following normal best practices so I not sure what you are
doing.

RockyOfbiz sent the following on 10/15/2007 12:29 PM:

> Hi There
>
> Thanks for your reply. Certainly i have gone through of these videos.
>
> I have created a new web application (myOwnWebapplication) in hot-deploy.
> and configured in ofbiz-component.xml
>
> it works perfect.
>
> But if i create a java web service in that webapplication
> (myOwnWebapplication) and trying to run the server and it throws the error
> saying it cant find the web service implementation. I have set the class
> paths to build/web/WEB-INF/lib. and all classes are there.
>
> I am using java 1.5 and netbeans.
>
> Any idea Whats wrong?
> Thanks in advance
>
> Here is a stack trace
> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> Exception sending context initialized event to listener instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> failed to parse runtime descriptor:
> com.sun.xml.ws.util.exception.LocatableWebServiceException: class not found
> in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:107)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> at
> org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> at org.ofbiz.base.start.Start.startServer(Start.java:317)
> at org.ofbiz.base.start.Start.start(Start.java:321)
> at org.ofbiz.base.start.Start.main(Start.java:407)
> Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> not found in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:531)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:207)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
> ... 13 more
> Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:242)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:528)
>
>
> jacques.le.roux wrote:
>> You may have at least a look at http://docs.ofbiz.org/x/PQM
>> and more generally
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
>>
>> Jacques
>>
>> De : "RockyOfbiz" <[hidden email]>
>>
>>
>>> Hi BJ
>>>
>>> No i am not talking about contribution. I am just trying to understand
>>> the
>>> things now so i dont think i can do contribute at this stage. ;-).
>>>
>>> I am just trying to find out a way to my problem.
>>>
>>> How can i deploy my own java xml web services on ofbiz tomcat server?.
>>>
>>> is it possible or not?
>>>
>>> /R
>>>
>>> BJ Freeman wrote:
>>>> You are welcome to do what you want.
>>>> Are you asking if it is something you can to contribute to ofbiz?
>>>> Have you read the best practices
>>>>
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>>>
>>>>
>>>>
>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>>>> Hi BJ,
>>>>>
>>>>> I am not sure about the framework/example. Can u tell me in detail if
>>>>> possible please?.
>>>>>
>>>>> I wanna develop a web service layer kinda stuff. So that i can reduce
>>> the
>>>>> generation of stubs for WSDL.
>>>>>
>>>>> It can act like a wrapper and combile all the services (service.xml)
>>> and
>>>>> provide only one endpoint for each application like this.
>>>>>
>>>>> http://localhost/webtools/product?wsdl
>>>>> http://localhost/webtools/accounting?wsdl
>>>>>
>>>>> Do u have any other plans?
>>>>>
>>>>> /R
>>>>>
>>>>> BJ Freeman wrote:
>>>>>> Like me when I first came, I had a misconception about what things
>>>>>> meant.
>>>>>> I believe you would be farther ahead by reading the wealth of
>>>>>> information in the document site.  It was not available when I
>>> started.
>>>>>> for instance the service.xml is for runing services defined in other
>>> xml
>>>>>> files that relate to ofbiz structure.
>>>>>>
>>>>>> what you call a java xml web service would be a module like the one
>>> in
>>>>>> /framework/example
>>>>>>
>>>>>>
>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>>>> Hi all
>>>>>>>
>>>>>>> I am a newbie to ofbiz. I understood that the services are specified
>>>>>>> service.xml.
>>>>>>>
>>>>>>> Is there any possibility to develop my own "java xml web services"
>>> and
>>>>>>> deploy then om ofbiz tomcat server?.
>>>>>>>
>>>>>>> Need : I want to make a web services layer in ofbiz project and
>>> expose
>>>>>>> the
>>>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>>>
>>>>>>> Suggestion are welcome :-)
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> /Regards
>>>>>>> Rakesh
>>>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi there.

Sorry...I am new to java and ofbiz. It might sounds odd to you. But I will give a explanation here.

Basically we like to use all the functionalities provided by ofbiz but we wanna replace the UI. So what we thought is we can just expose the ofbiz functionalities like product, catelog and etc to outside using services.

To satisfy that requirement. I looked into server.xml. Unfortunately we didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and service.xml. Probably we need to make so many stub generations from WSDL. We didnt liked it.

So what we convinced ourselves is to make a web service like this.

package wspackage;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService()
public class NewWebService {
    @WebMethod
    public String getName() {
        return "Here we will contact Ofbiz classes or services";
    }
}

So i created a new webapplication in hotdepoy and created a simple webpage (index.jsp) and a simple service(NewWebService). The combiled classes are placed in build/web/WEB-INF/lib. and configured that inside ofbiz-component.xml. When i start the ofbiz server it throws error saying it cant find the classes.

classpath in is ofbiz-component.xml
 <classpath type="jar" location="build/web/WEB-INF/lib/*"/>

Is this makes any sense?

Just wondering with this issue .. i might be wrong .. i dont know whether am allowed to do like this or not.

/R



BJ Freeman wrote
maybe someone else will understand what you are trying to do
But I need clarification.
please explain java web services you are referring to.
you are not following normal best practices so I not sure what you are
doing.

RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> Hi There
>
> Thanks for your reply. Certainly i have gone through of these videos.
>
> I have created a new web application (myOwnWebapplication) in hot-deploy.
> and configured in ofbiz-component.xml
>
> it works perfect.
>
> But if i create a java web service in that webapplication
> (myOwnWebapplication) and trying to run the server and it throws the error
> saying it cant find the web service implementation. I have set the class
> paths to build/web/WEB-INF/lib. and all classes are there.
>
> I am using java 1.5 and netbeans.
>
> Any idea Whats wrong?
> Thanks in advance
>
> Here is a stack trace
> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> Exception sending context initialized event to listener instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> failed to parse runtime descriptor:
> com.sun.xml.ws.util.exception.LocatableWebServiceException: class not found
> in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:107)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> at
> org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> at org.ofbiz.base.start.Start.startServer(Start.java:317)
> at org.ofbiz.base.start.Start.start(Start.java:321)
> at org.ofbiz.base.start.Start.main(Start.java:407)
> Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> not found in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:531)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:207)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
> ... 13 more
> Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:242)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:528)
>
>
> jacques.le.roux wrote:
>> You may have at least a look at http://docs.ofbiz.org/x/PQM
>> and more generally
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
>>
>> Jacques
>>
>> De : "RockyOfbiz" <rakesh_bov@yahoo.com>
>>
>>
>>> Hi BJ
>>>
>>> No i am not talking about contribution. I am just trying to understand
>>> the
>>> things now so i dont think i can do contribute at this stage. ;-).
>>>
>>> I am just trying to find out a way to my problem.
>>>
>>> How can i deploy my own java xml web services on ofbiz tomcat server?.
>>>
>>> is it possible or not?
>>>
>>> /R
>>>
>>> BJ Freeman wrote:
>>>> You are welcome to do what you want.
>>>> Are you asking if it is something you can to contribute to ofbiz?
>>>> Have you read the best practices
>>>>
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>>>
>>>>
>>>>
>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>>>> Hi BJ,
>>>>>
>>>>> I am not sure about the framework/example. Can u tell me in detail if
>>>>> possible please?.
>>>>>
>>>>> I wanna develop a web service layer kinda stuff. So that i can reduce
>>> the
>>>>> generation of stubs for WSDL.
>>>>>
>>>>> It can act like a wrapper and combile all the services (service.xml)
>>> and
>>>>> provide only one endpoint for each application like this.
>>>>>
>>>>> http://localhost/webtools/product?wsdl
>>>>> http://localhost/webtools/accounting?wsdl
>>>>>
>>>>> Do u have any other plans?
>>>>>
>>>>> /R
>>>>>
>>>>> BJ Freeman wrote:
>>>>>> Like me when I first came, I had a misconception about what things
>>>>>> meant.
>>>>>> I believe you would be farther ahead by reading the wealth of
>>>>>> information in the document site.  It was not available when I
>>> started.
>>>>>> for instance the service.xml is for runing services defined in other
>>> xml
>>>>>> files that relate to ofbiz structure.
>>>>>>
>>>>>> what you call a java xml web service would be a module like the one
>>> in
>>>>>> /framework/example
>>>>>>
>>>>>>
>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>>>> Hi all
>>>>>>>
>>>>>>> I am a newbie to ofbiz. I understood that the services are specified
>>>>>>> service.xml.
>>>>>>>
>>>>>>> Is there any possibility to develop my own "java xml web services"
>>> and
>>>>>>> deploy then om ofbiz tomcat server?.
>>>>>>>
>>>>>>> Need : I want to make a web services layer in ofbiz project and
>>> expose
>>>>>>> the
>>>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>>>
>>>>>>> Suggestion are welcome :-)
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> /Regards
>>>>>>> Rakesh
>>>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
Ok this is out of my area of expertise
and probably most here
you will probably have to dig into the frame work more.
good luck.


RockyOfbiz sent the following on 10/15/2007 2:06 PM:

> Hi there.
>
> Sorry...I am new to java and ofbiz. It might sounds odd to you. But I will
> give a explanation here.
>
> Basically we like to use all the functionalities provided by ofbiz but we
> wanna replace the UI. So what we thought is we can just expose the ofbiz
> functionalities like product, catelog and etc to outside using services.
>
> To satisfy that requirement. I looked into server.xml. Unfortunately we
> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> service.xml. Probably we need to make so many stub generations from WSDL. We
> didnt liked it.
>
> So what we convinced ourselves is to make a web service like this.
>
> package wspackage;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService;
>
> @WebService()
> public class NewWebService {
>     @WebMethod
>     public String getName() {
>         return "Here we will contact Ofbiz classes or services";
>     }
> }
>
> So i created a new webapplication in hotdepoy and created a simple webpage
> (index.jsp) and a simple service(NewWebService). The combiled classes are
> placed in build/web/WEB-INF/lib. and configured that inside
> ofbiz-component.xml. When i start the ofbiz server it throws error saying it
> cant find the classes.
>
> classpath in is ofbiz-component.xml
>  <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
>
> Is this makes any sense?
>
> Just wondering with this issue .. i might be wrong .. i dont know whether am
> allowed to do like this or not.
>
> /R
>
>
>
>
> BJ Freeman wrote:
>> maybe someone else will understand what you are trying to do
>> But I need clarification.
>> please explain java web services you are referring to.
>> you are not following normal best practices so I not sure what you are
>> doing.
>>
>> RockyOfbiz sent the following on 10/15/2007 12:29 PM:
>>> Hi There
>>>
>>> Thanks for your reply. Certainly i have gone through of these videos.
>>>
>>> I have created a new web application (myOwnWebapplication) in hot-deploy.
>>> and configured in ofbiz-component.xml
>>>
>>> it works perfect.
>>>
>>> But if i create a java web service in that webapplication
>>> (myOwnWebapplication) and trying to run the server and it throws the
>>> error
>>> saying it cant find the web service implementation. I have set the class
>>> paths to build/web/WEB-INF/lib. and all classes are there.
>>>
>>> I am using java 1.5 and netbeans.
>>>
>>> Any idea Whats wrong?
>>> Thanks in advance
>>>
>>> Here is a stack trace
>>> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
>>> Exception sending context initialized event to listener instance of class
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
>>> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
>>> failed to parse runtime descriptor:
>>> com.sun.xml.ws.util.exception.LocatableWebServiceException: class not
>>> found
>>> in runtime descriptor: newpackage.NewWebService
>>> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
>>> at
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:107)
>>> at
>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
>>> at
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>>> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>>> at
>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>>> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>>> at
>>> org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
>>> at
>>> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
>>> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>>> at org.ofbiz.base.start.Start.startServer(Start.java:317)
>>> at org.ofbiz.base.start.Start.start(Start.java:321)
>>> at org.ofbiz.base.start.Start.main(Start.java:407)
>>> Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException:
>>> class
>>> not found in runtime descriptor: newpackage.NewWebService
>>> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
>>> at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:531)
>>> at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:207)
>>> at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
>>> at
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
>>> ... 13 more
>>> Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
>>> at
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
>>> at
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Class.java:242)
>>> at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:528)
>>>
>>>
>>> jacques.le.roux wrote:
>>>> You may have at least a look at http://docs.ofbiz.org/x/PQM
>>>> and more generally
>>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
>>>>
>>>> Jacques
>>>>
>>>> De : "RockyOfbiz" <[hidden email]>
>>>>
>>>>
>>>>> Hi BJ
>>>>>
>>>>> No i am not talking about contribution. I am just trying to understand
>>>>> the
>>>>> things now so i dont think i can do contribute at this stage. ;-).
>>>>>
>>>>> I am just trying to find out a way to my problem.
>>>>>
>>>>> How can i deploy my own java xml web services on ofbiz tomcat server?.
>>>>>
>>>>> is it possible or not?
>>>>>
>>>>> /R
>>>>>
>>>>> BJ Freeman wrote:
>>>>>> You are welcome to do what you want.
>>>>>> Are you asking if it is something you can to contribute to ofbiz?
>>>>>> Have you read the best practices
>>>>>>
>>>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>>>>>
>>>>>>
>>>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>>>>>> Hi BJ,
>>>>>>>
>>>>>>> I am not sure about the framework/example. Can u tell me in detail if
>>>>>>> possible please?.
>>>>>>>
>>>>>>> I wanna develop a web service layer kinda stuff. So that i can reduce
>>>>> the
>>>>>>> generation of stubs for WSDL.
>>>>>>>
>>>>>>> It can act like a wrapper and combile all the services (service.xml)
>>>>> and
>>>>>>> provide only one endpoint for each application like this.
>>>>>>>
>>>>>>> http://localhost/webtools/product?wsdl
>>>>>>> http://localhost/webtools/accounting?wsdl
>>>>>>>
>>>>>>> Do u have any other plans?
>>>>>>>
>>>>>>> /R
>>>>>>>
>>>>>>> BJ Freeman wrote:
>>>>>>>> Like me when I first came, I had a misconception about what things
>>>>>>>> meant.
>>>>>>>> I believe you would be farther ahead by reading the wealth of
>>>>>>>> information in the document site.  It was not available when I
>>>>> started.
>>>>>>>> for instance the service.xml is for runing services defined in other
>>>>> xml
>>>>>>>> files that relate to ofbiz structure.
>>>>>>>>
>>>>>>>> what you call a java xml web service would be a module like the one
>>>>> in
>>>>>>>> /framework/example
>>>>>>>>
>>>>>>>>
>>>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>>>>>> Hi all
>>>>>>>>>
>>>>>>>>> I am a newbie to ofbiz. I understood that the services are
>>>>>>>>> specified
>>>>>>>>> service.xml.
>>>>>>>>>
>>>>>>>>> Is there any possibility to develop my own "java xml web services"
>>>>> and
>>>>>>>>> deploy then om ofbiz tomcat server?.
>>>>>>>>>
>>>>>>>>> Need : I want to make a web services layer in ofbiz project and
>>>>> expose
>>>>>>>>> the
>>>>>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>>>>>
>>>>>>>>> Suggestion are welcome :-)
>>>>>>>>>
>>>>>>>>> Thanks in advance
>>>>>>>>>
>>>>>>>>> /Regards
>>>>>>>>> Rakesh
>>>>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

guo weizhan
In reply to this post by RockyOfbiz
it seems you haven't add the NewWebService  class to the classpath, have
you packege the class to the jar and place in the lib folder?
try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>


2007/10/16, RockyOfbiz <[hidden email]>:

>
>
> Hi there.
>
> Sorry...I am new to java and ofbiz. It might sounds odd to you. But I will
> give a explanation here.
>
> Basically we like to use all the functionalities provided by ofbiz but we
> wanna replace the UI. So what we thought is we can just expose the ofbiz
> functionalities like product, catelog and etc to outside using services.
>
> To satisfy that requirement. I looked into server.xml. Unfortunately we
> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> service.xml. Probably we need to make so many stub generations from WSDL.
> We
> didnt liked it.
>
> So what we convinced ourselves is to make a web service like this.
>
> package wspackage;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService;
>
> @WebService()
> public class NewWebService {
>    @WebMethod
>    public String getName() {
>        return "Here we will contact Ofbiz classes or services";
>    }
> }
>
> So i created a new webapplication in hotdepoy and created a simple webpage
> (index.jsp) and a simple service(NewWebService). The combiled classes are
> placed in build/web/WEB-INF/lib. and configured that inside
> ofbiz-component.xml. When i start the ofbiz server it throws error saying
> it
> cant find the classes.
>
> classpath in is ofbiz-component.xml
> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
>
> Is this makes any sense?
>
> Just wondering with this issue .. i might be wrong .. i dont know whether
> am
> allowed to do like this or not.
>
> /R
>
>
>
>
> BJ Freeman wrote:
> >
> > maybe someone else will understand what you are trying to do
> > But I need clarification.
> > please explain java web services you are referring to.
> > you are not following normal best practices so I not sure what you are
> > doing.
> >
> > RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> >> Hi There
> >>
> >> Thanks for your reply. Certainly i have gone through of these videos.
> >>
> >> I have created a new web application (myOwnWebapplication) in
> hot-deploy.
> >> and configured in ofbiz-component.xml
> >>
> >> it works perfect.
> >>
> >> But if i create a java web service in that webapplication
> >> (myOwnWebapplication) and trying to run the server and it throws the
> >> error
> >> saying it cant find the web service implementation. I have set the
> class
> >> paths to build/web/WEB-INF/lib. and all classes are there.
> >>
> >> I am using java 1.5 and netbeans.
> >>
> >> Any idea Whats wrong?
> >> Thanks in advance
> >>
> >> Here is a stack trace
> >> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> >> Exception sending context initialized event to listener instance of
> class
> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> >> failed to parse runtime descriptor:
> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class not
> >> found
> >> in runtime descriptor: newpackage.NewWebService
> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >>      at
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:107)
> >>      at
> >> org.apache.catalina.core.StandardContext.listenerStart(
> StandardContext.java:3763)
> >>      at
> >> org.apache.catalina.core.StandardContext.start(StandardContext.java
> :4211)
> >>      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
> >>      at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :718)
> >>      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
> >>      at
> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> >>      at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> >>      at
> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> CatalinaContainer.java:225)
> >>      at
> >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> >>      at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >>      at org.ofbiz.base.start.Start.start(Start.java:321)
> >>      at org.ofbiz.base.start.Start.main(Start.java:407)
> >> Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException:
> >> class
> >> not found in runtime descriptor: newpackage.NewWebService
> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >>      at
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> (DeploymentDescriptorParser.java:531)
> >>      at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> DeploymentDescriptorParser.java:207)
> >>      at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> DeploymentDescriptorParser.java:133)
> >>      at
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:97)
> >>      ... 13 more
> >> Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
> >>      at
> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1355)
> >>      at
> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1201)
> >>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> >>      at java.lang.Class.forName0(Native Method)
> >>      at java.lang.Class.forName(Class.java:242)
> >>      at
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> (DeploymentDescriptorParser.java:528)
> >>
> >>
> >> jacques.le.roux wrote:
> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM
> >>> and more generally
> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
> >>>
> >>> Jacques
> >>>
> >>> De : "RockyOfbiz" <[hidden email]>
> >>>
> >>>
> >>>> Hi BJ
> >>>>
> >>>> No i am not talking about contribution. I am just trying to
> understand
> >>>> the
> >>>> things now so i dont think i can do contribute at this stage. ;-).
> >>>>
> >>>> I am just trying to find out a way to my problem.
> >>>>
> >>>> How can i deploy my own java xml web services on ofbiz tomcat
> server?.
> >>>>
> >>>> is it possible or not?
> >>>>
> >>>> /R
> >>>>
> >>>> BJ Freeman wrote:
> >>>>> You are welcome to do what you want.
> >>>>> Are you asking if it is something you can to contribute to ofbiz?
> >>>>> Have you read the best practices
> >>>>>
> >>>>
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >>>>>
> >>>>>
> >>>>>
> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >>>>>> Hi BJ,
> >>>>>>
> >>>>>> I am not sure about the framework/example. Can u tell me in detail
> if
> >>>>>> possible please?.
> >>>>>>
> >>>>>> I wanna develop a web service layer kinda stuff. So that i can
> reduce
> >>>> the
> >>>>>> generation of stubs for WSDL.
> >>>>>>
> >>>>>> It can act like a wrapper and combile all the services (service.xml
> )
> >>>> and
> >>>>>> provide only one endpoint for each application like this.
> >>>>>>
> >>>>>> http://localhost/webtools/product?wsdl
> >>>>>> http://localhost/webtools/accounting?wsdl
> >>>>>>
> >>>>>> Do u have any other plans?
> >>>>>>
> >>>>>> /R
> >>>>>>
> >>>>>> BJ Freeman wrote:
> >>>>>>> Like me when I first came, I had a misconception about what things
> >>>>>>> meant.
> >>>>>>> I believe you would be farther ahead by reading the wealth of
> >>>>>>> information in the document site.  It was not available when I
> >>>> started.
> >>>>>>> for instance the service.xml is for runing services defined in
> other
> >>>> xml
> >>>>>>> files that relate to ofbiz structure.
> >>>>>>>
> >>>>>>> what you call a java xml web service would be a module like the
> one
> >>>> in
> >>>>>>> /framework/example
> >>>>>>>
> >>>>>>>
> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >>>>>>>> Hi all
> >>>>>>>>
> >>>>>>>> I am a newbie to ofbiz. I understood that the services are
> >>>>>>>> specified
> >>>>>>>> service.xml.
> >>>>>>>>
> >>>>>>>> Is there any possibility to develop my own "java xml web
> services"
> >>>> and
> >>>>>>>> deploy then om ofbiz tomcat server?.
> >>>>>>>>
> >>>>>>>> Need : I want to make a web services layer in ofbiz project and
> >>>> expose
> >>>>>>>> the
> >>>>>>>> ofbiz services (service.xml) with some extra funtionality.
> >>>>>>>>
> >>>>>>>> Suggestion are welcome :-)
> >>>>>>>>
> >>>>>>>> Thanks in advance
> >>>>>>>>
> >>>>>>>> /Regards
> >>>>>>>> Rakesh
> >>>>>>>>
> >>>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>>>
> >>>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

guo weizhan
Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String)
method is not found,
http://forums.java.net/jive/thread.jspa?messageID=33340

maybe this post can help you.

you need to copy the jars your need to the classpath(like
build/web/WEB-INF/lib/ ) to let the class execute correctly

2007/10/16, RockyOfbiz <[hidden email]>:

>
>
> Hi weizhan
>
> Thansk for your reply. You are right. I appreciate it.
>
>
> I created a jar file containing newWebService.class and its methodclasses.
> Here am attaching a image which gives a screen shot of Webapplication4
> which
> i place in hotdeploy
>
> http://www.nabble.com/file/p13228821/errorScreen.jpg
>
> When i put the myfile.jar in lib it worked but at the same time it thrown
> an
> other error
>
> Can u also guide me through this problem.
>
> Exception sending context initialized event to listener instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> failed to parse runtime descriptor: java.lang.NoSuchMethodError:
> javax.xml.soap.MessageFactory.newInstance
> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>        at
>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:107)
>        at
> org.apache.catalina.core.StandardContext.listenerStart(
> StandardContext.java:3763)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :718)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:442)
>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>        at
> org.ofbiz.catalina.container.CatalinaContainer.start(
> CatalinaContainer.java:225)
>        at org.ofbiz.base.container.ContainerLoader.start(
> ContainerLoader.java:83)
>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
>        at org.ofbiz.base.start.Start.start(Start.java:321)
>        at org.ofbiz.base.start.Start.main(Start.java:407)
> Caused by: java.lang.NoSuchMethodError:
> javax.xml.soap.MessageFactory.newInstance
> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>        at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163)
>        at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68)
>        at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(
> DeploymentDescriptorParser.java:286)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> DeploymentDescriptorParser.java:227)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> DeploymentDescriptorParser.java:133)
>        at
>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:97)
>        ... 13 more
>
> Thanks in advance.
> /R
>
> guo weizhan wrote:
> >
> > it seems you haven't add the NewWebService  class to the classpath, have
> > you packege the class to the jar and place in the lib folder?
> > try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>
> >
> >
> > 2007/10/16, RockyOfbiz <[hidden email]>:
> >>
> >>
> >> Hi there.
> >>
> >> Sorry...I am new to java and ofbiz. It might sounds odd to you. But I
> >> will
> >> give a explanation here.
> >>
> >> Basically we like to use all the functionalities provided by ofbiz but
> we
> >> wanna replace the UI. So what we thought is we can just expose the
> ofbiz
> >> functionalities like product, catelog and etc to outside using
> services.
> >>
> >> To satisfy that requirement. I looked into server.xml. Unfortunately we
> >> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> >> service.xml. Probably we need to make so many stub generations from
> WSDL.
> >> We
> >> didnt liked it.
> >>
> >> So what we convinced ourselves is to make a web service like this.
> >>
> >> package wspackage;
> >>
> >> import javax.jws.WebMethod;
> >> import javax.jws.WebService;
> >>
> >> @WebService()
> >> public class NewWebService {
> >>    @WebMethod
> >>    public String getName() {
> >>        return "Here we will contact Ofbiz classes or services";
> >>    }
> >> }
> >>
> >> So i created a new webapplication in hotdepoy and created a simple
> >> webpage
> >> (index.jsp) and a simple service(NewWebService). The combiled classes
> are
> >> placed in build/web/WEB-INF/lib. and configured that inside
> >> ofbiz-component.xml. When i start the ofbiz server it throws error
> saying
> >> it
> >> cant find the classes.
> >>
> >> classpath in is ofbiz-component.xml
> >> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
> >>
> >> Is this makes any sense?
> >>
> >> Just wondering with this issue .. i might be wrong .. i dont know
> whether
> >> am
> >> allowed to do like this or not.
> >>
> >> /R
> >>
> >>
> >>
> >>
> >> BJ Freeman wrote:
> >> >
> >> > maybe someone else will understand what you are trying to do
> >> > But I need clarification.
> >> > please explain java web services you are referring to.
> >> > you are not following normal best practices so I not sure what you
> are
> >> > doing.
> >> >
> >> > RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> >> >> Hi There
> >> >>
> >> >> Thanks for your reply. Certainly i have gone through of these
> videos.
> >> >>
> >> >> I have created a new web application (myOwnWebapplication) in
> >> hot-deploy.
> >> >> and configured in ofbiz-component.xml
> >> >>
> >> >> it works perfect.
> >> >>
> >> >> But if i create a java web service in that webapplication
> >> >> (myOwnWebapplication) and trying to run the server and it throws the
> >> >> error
> >> >> saying it cant find the web service implementation. I have set the
> >> class
> >> >> paths to build/web/WEB-INF/lib. and all classes are there.
> >> >>
> >> >> I am using java 1.5 and netbeans.
> >> >>
> >> >> Any idea Whats wrong?
> >> >> Thanks in advance
> >> >>
> >> >> Here is a stack trace
> >> >> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> >> >> Exception sending context initialized event to listener instance of
> >> class
> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> >> com.sun.xml.ws.transport.http.servlet.WSServletException:
> WSSERVLET11:
> >> >> failed to parse runtime descriptor:
> >> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> not
> >> >> found
> >> >> in runtime descriptor: newpackage.NewWebService
> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:107)
> >> >>      at
> >> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> StandardContext.java:3763)
> >> >>      at
> >> >> org.apache.catalina.core.StandardContext.start(StandardContext.java
> >> :4211)
> >> >>      at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> :1013)
> >> >>      at org.apache.catalina.core.StandardHost.start(
> StandardHost.java
> >> :718)
> >> >>      at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> :1013)
> >> >>      at
> >> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java
> :442)
> >> >>      at org.apache.catalina.startup.Embedded.start(Embedded.java
> :821)
> >> >>      at
> >> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> CatalinaContainer.java:225)
> >> >>      at
> >> >>
> >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> >> >>      at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >> >>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >> >>      at org.ofbiz.base.start.Start.start(Start.java:321)
> >> >>      at org.ofbiz.base.start.Start.main(Start.java:407)
> >> >> Caused by:
> com.sun.xml.ws.util.exception.LocatableWebServiceException:
> >> >> class
> >> >> not found in runtime descriptor: newpackage.NewWebService
> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> (DeploymentDescriptorParser.java:531)
> >> >>      at
> >> >>
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> DeploymentDescriptorParser.java:207)
> >> >>      at
> >> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> DeploymentDescriptorParser.java:133)
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:97)
> >> >>      ... 13 more
> >> >> Caused by: java.lang.ClassNotFoundException:
> newpackage.NewWebService
> >> >>      at
> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> WebappClassLoader.java:1355)
> >> >>      at
> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> WebappClassLoader.java:1201)
> >> >>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java
> :319)
> >> >>      at java.lang.Class.forName0(Native Method)
> >> >>      at java.lang.Class.forName(Class.java:242)
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> (DeploymentDescriptorParser.java:528)
> >> >>
> >> >>
> >> >> jacques.le.roux wrote:
> >> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM
> >> >>> and more generally
> >> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
> >> >>>
> >> >>> Jacques
> >> >>>
> >> >>> De : "RockyOfbiz" <[hidden email]>
> >> >>>
> >> >>>
> >> >>>> Hi BJ
> >> >>>>
> >> >>>> No i am not talking about contribution. I am just trying to
> >> understand
> >> >>>> the
> >> >>>> things now so i dont think i can do contribute at this stage. ;-).
> >> >>>>
> >> >>>> I am just trying to find out a way to my problem.
> >> >>>>
> >> >>>> How can i deploy my own java xml web services on ofbiz tomcat
> >> server?.
> >> >>>>
> >> >>>> is it possible or not?
> >> >>>>
> >> >>>> /R
> >> >>>>
> >> >>>> BJ Freeman wrote:
> >> >>>>> You are welcome to do what you want.
> >> >>>>> Are you asking if it is something you can to contribute to ofbiz?
> >> >>>>> Have you read the best practices
> >> >>>>>
> >> >>>>
> >>
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> >>>>>> Hi BJ,
> >> >>>>>>
> >> >>>>>> I am not sure about the framework/example. Can u tell me in
> detail
> >> if
> >> >>>>>> possible please?.
> >> >>>>>>
> >> >>>>>> I wanna develop a web service layer kinda stuff. So that i can
> >> reduce
> >> >>>> the
> >> >>>>>> generation of stubs for WSDL.
> >> >>>>>>
> >> >>>>>> It can act like a wrapper and combile all the services
> >> (service.xml
> >> )
> >> >>>> and
> >> >>>>>> provide only one endpoint for each application like this.
> >> >>>>>>
> >> >>>>>> http://localhost/webtools/product?wsdl
> >> >>>>>> http://localhost/webtools/accounting?wsdl
> >> >>>>>>
> >> >>>>>> Do u have any other plans?
> >> >>>>>>
> >> >>>>>> /R
> >> >>>>>>
> >> >>>>>> BJ Freeman wrote:
> >> >>>>>>> Like me when I first came, I had a misconception about what
> >> things
> >> >>>>>>> meant.
> >> >>>>>>> I believe you would be farther ahead by reading the wealth of
> >> >>>>>>> information in the document site.  It was not available when I
> >> >>>> started.
> >> >>>>>>> for instance the service.xml is for runing services defined in
> >> other
> >> >>>> xml
> >> >>>>>>> files that relate to ofbiz structure.
> >> >>>>>>>
> >> >>>>>>> what you call a java xml web service would be a module like the
> >> one
> >> >>>> in
> >> >>>>>>> /framework/example
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >> >>>>>>>> Hi all
> >> >>>>>>>>
> >> >>>>>>>> I am a newbie to ofbiz. I understood that the services are
> >> >>>>>>>> specified
> >> >>>>>>>> service.xml.
> >> >>>>>>>>
> >> >>>>>>>> Is there any possibility to develop my own "java xml web
> >> services"
> >> >>>> and
> >> >>>>>>>> deploy then om ofbiz tomcat server?.
> >> >>>>>>>>
> >> >>>>>>>> Need : I want to make a web services layer in ofbiz project
> and
> >> >>>> expose
> >> >>>>>>>> the
> >> >>>>>>>> ofbiz services (service.xml) with some extra funtionality.
> >> >>>>>>>>
> >> >>>>>>>> Suggestion are welcome :-)
> >> >>>>>>>>
> >> >>>>>>>> Thanks in advance
> >> >>>>>>>>
> >> >>>>>>>> /Regards
> >> >>>>>>>> Rakesh
> >> >>>>>>>>
> >> >>>>>
> >> >>>> --
> >> >>>> View this message in context:
> >> >>>>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> >> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >>>>
> >> >>>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
Hi weizhan

Thanks for reply.

I have googled and found the same page so then i have replaced saaj-api.jar and saaj-impl.jar in
D:\opentaps-1.0\framework\base\lib\j2eespecs. It worked.

Now i have another problem here.. Please help me again .. It says it can not cast the newpackage.NewWebService. When looked the method loadServelet in org.apache.catalina.core.StandardWrapper.loadServlet().. it return type is javax.servlet.Servlet.

It throws this error ..

StandardContext.java:3953:ERROR] Servlet /webapplication4 threw load() exception
java.lang.ClassCastException: newpackage.NewWebService
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
        at org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
        at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
        at org.ofbiz.base.start.Start.startServer(Start.java:317)
        at org.ofbiz.base.start.Start.start(Start.java:321)
        at org.ofbiz.base.start.Start.main(Start.java:407)

Any idea?

help out...

guo weizhan wrote
Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String)
method is not found,
http://forums.java.net/jive/thread.jspa?messageID=33340

maybe this post can help you.

you need to copy the jars your need to the classpath(like
build/web/WEB-INF/lib/ ) to let the class execute correctly

2007/10/16, RockyOfbiz <rakesh_bov@yahoo.com>:
>
>
> Hi weizhan
>
> Thansk for your reply. You are right. I appreciate it.
>
>
> I created a jar file containing newWebService.class and its methodclasses.
> Here am attaching a image which gives a screen shot of Webapplication4
> which
> i place in hotdeploy
>
> http://www.nabble.com/file/p13228821/errorScreen.jpg
>
> When i put the myfile.jar in lib it worked but at the same time it thrown
> an
> other error
>
> Can u also guide me through this problem.
>
> Exception sending context initialized event to listener instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> failed to parse runtime descriptor: java.lang.NoSuchMethodError:
> javax.xml.soap.MessageFactory.newInstance
> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>        at
>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:107)
>        at
> org.apache.catalina.core.StandardContext.listenerStart(
> StandardContext.java:3763)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :718)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:442)
>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>        at
> org.ofbiz.catalina.container.CatalinaContainer.start(
> CatalinaContainer.java:225)
>        at org.ofbiz.base.container.ContainerLoader.start(
> ContainerLoader.java:83)
>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
>        at org.ofbiz.base.start.Start.start(Start.java:321)
>        at org.ofbiz.base.start.Start.main(Start.java:407)
> Caused by: java.lang.NoSuchMethodError:
> javax.xml.soap.MessageFactory.newInstance
> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>        at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163)
>        at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68)
>        at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(
> DeploymentDescriptorParser.java:286)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> DeploymentDescriptorParser.java:227)
>        at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> DeploymentDescriptorParser.java:133)
>        at
>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> (WSServletContextListener.java:97)
>        ... 13 more
>
> Thanks in advance.
> /R
>
> guo weizhan wrote:
> >
> > it seems you haven't add the NewWebService  class to the classpath, have
> > you packege the class to the jar and place in the lib folder?
> > try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>
> >
> >
> > 2007/10/16, RockyOfbiz <rakesh_bov@yahoo.com>:
> >>
> >>
> >> Hi there.
> >>
> >> Sorry...I am new to java and ofbiz. It might sounds odd to you. But I
> >> will
> >> give a explanation here.
> >>
> >> Basically we like to use all the functionalities provided by ofbiz but
> we
> >> wanna replace the UI. So what we thought is we can just expose the
> ofbiz
> >> functionalities like product, catelog and etc to outside using
> services.
> >>
> >> To satisfy that requirement. I looked into server.xml. Unfortunately we
> >> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> >> service.xml. Probably we need to make so many stub generations from
> WSDL.
> >> We
> >> didnt liked it.
> >>
> >> So what we convinced ourselves is to make a web service like this.
> >>
> >> package wspackage;
> >>
> >> import javax.jws.WebMethod;
> >> import javax.jws.WebService;
> >>
> >> @WebService()
> >> public class NewWebService {
> >>    @WebMethod
> >>    public String getName() {
> >>        return "Here we will contact Ofbiz classes or services";
> >>    }
> >> }
> >>
> >> So i created a new webapplication in hotdepoy and created a simple
> >> webpage
> >> (index.jsp) and a simple service(NewWebService). The combiled classes
> are
> >> placed in build/web/WEB-INF/lib. and configured that inside
> >> ofbiz-component.xml. When i start the ofbiz server it throws error
> saying
> >> it
> >> cant find the classes.
> >>
> >> classpath in is ofbiz-component.xml
> >> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
> >>
> >> Is this makes any sense?
> >>
> >> Just wondering with this issue .. i might be wrong .. i dont know
> whether
> >> am
> >> allowed to do like this or not.
> >>
> >> /R
> >>
> >>
> >>
> >>
> >> BJ Freeman wrote:
> >> >
> >> > maybe someone else will understand what you are trying to do
> >> > But I need clarification.
> >> > please explain java web services you are referring to.
> >> > you are not following normal best practices so I not sure what you
> are
> >> > doing.
> >> >
> >> > RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> >> >> Hi There
> >> >>
> >> >> Thanks for your reply. Certainly i have gone through of these
> videos.
> >> >>
> >> >> I have created a new web application (myOwnWebapplication) in
> >> hot-deploy.
> >> >> and configured in ofbiz-component.xml
> >> >>
> >> >> it works perfect.
> >> >>
> >> >> But if i create a java web service in that webapplication
> >> >> (myOwnWebapplication) and trying to run the server and it throws the
> >> >> error
> >> >> saying it cant find the web service implementation. I have set the
> >> class
> >> >> paths to build/web/WEB-INF/lib. and all classes are there.
> >> >>
> >> >> I am using java 1.5 and netbeans.
> >> >>
> >> >> Any idea Whats wrong?
> >> >> Thanks in advance
> >> >>
> >> >> Here is a stack trace
> >> >> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> >> >> Exception sending context initialized event to listener instance of
> >> class
> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> >> com.sun.xml.ws.transport.http.servlet.WSServletException:
> WSSERVLET11:
> >> >> failed to parse runtime descriptor:
> >> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> not
> >> >> found
> >> >> in runtime descriptor: newpackage.NewWebService
> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:107)
> >> >>      at
> >> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> StandardContext.java:3763)
> >> >>      at
> >> >> org.apache.catalina.core.StandardContext.start(StandardContext.java
> >> :4211)
> >> >>      at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> :1013)
> >> >>      at org.apache.catalina.core.StandardHost.start(
> StandardHost.java
> >> :718)
> >> >>      at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> :1013)
> >> >>      at
> >> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java
> :442)
> >> >>      at org.apache.catalina.startup.Embedded.start(Embedded.java
> :821)
> >> >>      at
> >> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> CatalinaContainer.java:225)
> >> >>      at
> >> >>
> >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> >> >>      at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >> >>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >> >>      at org.ofbiz.base.start.Start.start(Start.java:321)
> >> >>      at org.ofbiz.base.start.Start.main(Start.java:407)
> >> >> Caused by:
> com.sun.xml.ws.util.exception.LocatableWebServiceException:
> >> >> class
> >> >> not found in runtime descriptor: newpackage.NewWebService
> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> (DeploymentDescriptorParser.java:531)
> >> >>      at
> >> >>
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> DeploymentDescriptorParser.java:207)
> >> >>      at
> >> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> DeploymentDescriptorParser.java:133)
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:97)
> >> >>      ... 13 more
> >> >> Caused by: java.lang.ClassNotFoundException:
> newpackage.NewWebService
> >> >>      at
> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> WebappClassLoader.java:1355)
> >> >>      at
> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> WebappClassLoader.java:1201)
> >> >>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java
> :319)
> >> >>      at java.lang.Class.forName0(Native Method)
> >> >>      at java.lang.Class.forName(Class.java:242)
> >> >>      at
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> (DeploymentDescriptorParser.java:528)
> >> >>
> >> >>
> >> >> jacques.le.roux wrote:
> >> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM
> >> >>> and more generally
> >> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
> >> >>>
> >> >>> Jacques
> >> >>>
> >> >>> De : "RockyOfbiz" <rakesh_bov@yahoo.com>
> >> >>>
> >> >>>
> >> >>>> Hi BJ
> >> >>>>
> >> >>>> No i am not talking about contribution. I am just trying to
> >> understand
> >> >>>> the
> >> >>>> things now so i dont think i can do contribute at this stage. ;-).
> >> >>>>
> >> >>>> I am just trying to find out a way to my problem.
> >> >>>>
> >> >>>> How can i deploy my own java xml web services on ofbiz tomcat
> >> server?.
> >> >>>>
> >> >>>> is it possible or not?
> >> >>>>
> >> >>>> /R
> >> >>>>
> >> >>>> BJ Freeman wrote:
> >> >>>>> You are welcome to do what you want.
> >> >>>>> Are you asking if it is something you can to contribute to ofbiz?
> >> >>>>> Have you read the best practices
> >> >>>>>
> >> >>>>
> >>
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> >>>>>> Hi BJ,
> >> >>>>>>
> >> >>>>>> I am not sure about the framework/example. Can u tell me in
> detail
> >> if
> >> >>>>>> possible please?.
> >> >>>>>>
> >> >>>>>> I wanna develop a web service layer kinda stuff. So that i can
> >> reduce
> >> >>>> the
> >> >>>>>> generation of stubs for WSDL.
> >> >>>>>>
> >> >>>>>> It can act like a wrapper and combile all the services
> >> (service.xml
> >> )
> >> >>>> and
> >> >>>>>> provide only one endpoint for each application like this.
> >> >>>>>>
> >> >>>>>> http://localhost/webtools/product?wsdl
> >> >>>>>> http://localhost/webtools/accounting?wsdl
> >> >>>>>>
> >> >>>>>> Do u have any other plans?
> >> >>>>>>
> >> >>>>>> /R
> >> >>>>>>
> >> >>>>>> BJ Freeman wrote:
> >> >>>>>>> Like me when I first came, I had a misconception about what
> >> things
> >> >>>>>>> meant.
> >> >>>>>>> I believe you would be farther ahead by reading the wealth of
> >> >>>>>>> information in the document site.  It was not available when I
> >> >>>> started.
> >> >>>>>>> for instance the service.xml is for runing services defined in
> >> other
> >> >>>> xml
> >> >>>>>>> files that relate to ofbiz structure.
> >> >>>>>>>
> >> >>>>>>> what you call a java xml web service would be a module like the
> >> one
> >> >>>> in
> >> >>>>>>> /framework/example
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >> >>>>>>>> Hi all
> >> >>>>>>>>
> >> >>>>>>>> I am a newbie to ofbiz. I understood that the services are
> >> >>>>>>>> specified
> >> >>>>>>>> service.xml.
> >> >>>>>>>>
> >> >>>>>>>> Is there any possibility to develop my own "java xml web
> >> services"
> >> >>>> and
> >> >>>>>>>> deploy then om ofbiz tomcat server?.
> >> >>>>>>>>
> >> >>>>>>>> Need : I want to make a web services layer in ofbiz project
> and
> >> >>>> expose
> >> >>>>>>>> the
> >> >>>>>>>> ofbiz services (service.xml) with some extra funtionality.
> >> >>>>>>>>
> >> >>>>>>>> Suggestion are welcome :-)
> >> >>>>>>>>
> >> >>>>>>>> Thanks in advance
> >> >>>>>>>>
> >> >>>>>>>> /Regards
> >> >>>>>>>> Rakesh
> >> >>>>>>>>
> >> >>>>>
> >> >>>> --
> >> >>>> View this message in context:
> >> >>>>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> >> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >>>>
> >> >>>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

guo weizhan
Have no idea about this, but I think it's not the ofbiz problem, there are
something wrong in your program, please check this in detail.

2007/10/16, RockyOfbiz <[hidden email]>:

>
>
> Hi weizhan
>
> Thanks for reply.
>
> I have googled and found the same page so then i have replaced
> saaj-api.jar
> and saaj-impl.jar in
> D:\opentaps-1.0\framework\base\lib\j2eespecs. It worked.
>
> Now i have another problem here.. Please help me again .. It says it can
> not
> cast the newpackage.NewWebService. When looked the method loadServelet in
> org.apache.catalina.core.StandardWrapper.loadServlet().. it return type is
> javax.servlet.Servlet.
>
> It throws this error ..
>
> StandardContext.java:3953:ERROR] Servlet /webapplication4 threw load()
> exception
> java.lang.ClassCastException: newpackage.NewWebService
>        at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1055)
>        at org.apache.catalina.core.StandardWrapper.load(
> StandardWrapper.java:932)
>        at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3951)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :718)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:442)
>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>        at
> org.ofbiz.catalina.container.CatalinaContainer.start(
> CatalinaContainer.java:225)
>        at org.ofbiz.base.container.ContainerLoader.start(
> ContainerLoader.java:83)
>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
>        at org.ofbiz.base.start.Start.start(Start.java:321)
>        at org.ofbiz.base.start.Start.main(Start.java:407)
>
> Any idea?
>
> help out...
>
>
> guo weizhan wrote:
> >
> > Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String)
> > method is not found,
> > http://forums.java.net/jive/thread.jspa?messageID=33340
> >
> > maybe this post can help you.
> >
> > you need to copy the jars your need to the classpath(like
> > build/web/WEB-INF/lib/ ) to let the class execute correctly
> >
> > 2007/10/16, RockyOfbiz <[hidden email]>:
> >>
> >>
> >> Hi weizhan
> >>
> >> Thansk for your reply. You are right. I appreciate it.
> >>
> >>
> >> I created a jar file containing newWebService.class and its
> >> methodclasses.
> >> Here am attaching a image which gives a screen shot of Webapplication4
> >> which
> >> i place in hotdeploy
> >>
> >> http://www.nabble.com/file/p13228821/errorScreen.jpg
> >>
> >> When i put the myfile.jar in lib it worked but at the same time it
> thrown
> >> an
> >> other error
> >>
> >> Can u also guide me through this problem.
> >>
> >> Exception sending context initialized event to listener instance of
> class
> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> >> failed to parse runtime descriptor: java.lang.NoSuchMethodError:
> >> javax.xml.soap.MessageFactory.newInstance
> >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
> >>        at
> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:107)
> >>        at
> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> StandardContext.java:3763)
> >>        at
> >> org.apache.catalina.core.StandardContext.start(StandardContext.java
> :4211)
> >>        at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >> :1013)
> >>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> >> :718)
> >>        at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >> :1013)
> >>        at org.apache.catalina.core.StandardEngine.start(
> >> StandardEngine.java:442)
> >>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> >>        at
> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> CatalinaContainer.java:225)
> >>        at org.ofbiz.base.container.ContainerLoader.start(
> >> ContainerLoader.java:83)
> >>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >>        at org.ofbiz.base.start.Start.start(Start.java:321)
> >>        at org.ofbiz.base.start.Start.main(Start.java:407)
> >> Caused by: java.lang.NoSuchMethodError:
> >> javax.xml.soap.MessageFactory.newInstance
> >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
> >>        at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163)
> >>        at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68)
> >>        at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(
> >> DeploymentDescriptorParser.java:286)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> DeploymentDescriptorParser.java:227)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> DeploymentDescriptorParser.java:133)
> >>        at
> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:97)
> >>        ... 13 more
> >>
> >> Thanks in advance.
> >> /R
> >>
> >> guo weizhan wrote:
> >> >
> >> > it seems you haven't add the NewWebService  class to the classpath,
> >> have
> >> > you packege the class to the jar and place in the lib folder?
> >> > try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>
> >> >
> >> >
> >> > 2007/10/16, RockyOfbiz <[hidden email]>:
> >> >>
> >> >>
> >> >> Hi there.
> >> >>
> >> >> Sorry...I am new to java and ofbiz. It might sounds odd to you. But
> I
> >> >> will
> >> >> give a explanation here.
> >> >>
> >> >> Basically we like to use all the functionalities provided by ofbiz
> but
> >> we
> >> >> wanna replace the UI. So what we thought is we can just expose the
> >> ofbiz
> >> >> functionalities like product, catelog and etc to outside using
> >> services.
> >> >>
> >> >> To satisfy that requirement. I looked into server.xml. Unfortunately
> >> we
> >> >> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> >> >> service.xml. Probably we need to make so many stub generations from
> >> WSDL.
> >> >> We
> >> >> didnt liked it.
> >> >>
> >> >> So what we convinced ourselves is to make a web service like this.
> >> >>
> >> >> package wspackage;
> >> >>
> >> >> import javax.jws.WebMethod;
> >> >> import javax.jws.WebService;
> >> >>
> >> >> @WebService()
> >> >> public class NewWebService {
> >> >>    @WebMethod
> >> >>    public String getName() {
> >> >>        return "Here we will contact Ofbiz classes or services";
> >> >>    }
> >> >> }
> >> >>
> >> >> So i created a new webapplication in hotdepoy and created a simple
> >> >> webpage
> >> >> (index.jsp) and a simple service(NewWebService). The combiled
> classes
> >> are
> >> >> placed in build/web/WEB-INF/lib. and configured that inside
> >> >> ofbiz-component.xml. When i start the ofbiz server it throws error
> >> saying
> >> >> it
> >> >> cant find the classes.
> >> >>
> >> >> classpath in is ofbiz-component.xml
> >> >> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
> >> >>
> >> >> Is this makes any sense?
> >> >>
> >> >> Just wondering with this issue .. i might be wrong .. i dont know
> >> whether
> >> >> am
> >> >> allowed to do like this or not.
> >> >>
> >> >> /R
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> BJ Freeman wrote:
> >> >> >
> >> >> > maybe someone else will understand what you are trying to do
> >> >> > But I need clarification.
> >> >> > please explain java web services you are referring to.
> >> >> > you are not following normal best practices so I not sure what you
> >> are
> >> >> > doing.
> >> >> >
> >> >> > RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> >> >> >> Hi There
> >> >> >>
> >> >> >> Thanks for your reply. Certainly i have gone through of these
> >> videos.
> >> >> >>
> >> >> >> I have created a new web application (myOwnWebapplication) in
> >> >> hot-deploy.
> >> >> >> and configured in ofbiz-component.xml
> >> >> >>
> >> >> >> it works perfect.
> >> >> >>
> >> >> >> But if i create a java web service in that webapplication
> >> >> >> (myOwnWebapplication) and trying to run the server and it throws
> >> the
> >> >> >> error
> >> >> >> saying it cant find the web service implementation. I have set
> the
> >> >> class
> >> >> >> paths to build/web/WEB-INF/lib. and all classes are there.
> >> >> >>
> >> >> >> I am using java 1.5 and netbeans.
> >> >> >>
> >> >> >> Any idea Whats wrong?
> >> >> >> Thanks in advance
> >> >> >>
> >> >> >> Here is a stack trace
> >> >> >> 2007-10-15 20:50:28,468 (main) [
> >> StandardContext.java:3767:ERROR]
> >> >> >> Exception sending context initialized event to listener instance
> of
> >> >> class
> >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletException:
> >> WSSERVLET11:
> >> >> >> failed to parse runtime descriptor:
> >> >> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> >> not
> >> >> >> found
> >> >> >> in runtime descriptor: newpackage.NewWebService
> >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> >> (WSServletContextListener.java:107)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> >> StandardContext.java:3763)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardContext.start(
> StandardContext.java
> >> >> :4211)
> >> >> >>      at
> >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> >> :1013)
> >> >> >>      at org.apache.catalina.core.StandardHost.start(
> >> StandardHost.java
> >> >> :718)
> >> >> >>      at
> >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> >> :1013)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java
> >> :442)
> >> >> >>      at org.apache.catalina.startup.Embedded.start(Embedded.java
> >> :821)
> >> >> >>      at
> >> >> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> >> CatalinaContainer.java:225)
> >> >> >>      at
> >> >> >>
> >> >>
> >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> >> >> >>      at
> >> org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >> >> >>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >> >> >>      at org.ofbiz.base.start.Start.start(Start.java:321)
> >> >> >>      at org.ofbiz.base.start.Start.main(Start.java:407)
> >> >> >> Caused by:
> >> com.sun.xml.ws.util.exception.LocatableWebServiceException:
> >> >> >> class
> >> >> >> not found in runtime descriptor: newpackage.NewWebService
> >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> >> (DeploymentDescriptorParser.java:531)
> >> >> >>      at
> >> >> >>
> >> >>
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> >> DeploymentDescriptorParser.java:207)
> >> >> >>      at
> >> >> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> >> DeploymentDescriptorParser.java:133)
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> >> (WSServletContextListener.java:97)
> >> >> >>      ... 13 more
> >> >> >> Caused by: java.lang.ClassNotFoundException:
> >> newpackage.NewWebService
> >> >> >>      at
> >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> >> WebappClassLoader.java:1355)
> >> >> >>      at
> >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> >> WebappClassLoader.java:1201)
> >> >> >>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java
> >> :319)
> >> >> >>      at java.lang.Class.forName0(Native Method)
> >> >> >>      at java.lang.Class.forName(Class.java:242)
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> >> (DeploymentDescriptorParser.java:528)
> >> >> >>
> >> >> >>
> >> >> >> jacques.le.roux wrote:
> >> >> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM
> >> >> >>> and more generally
> >> >> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
> >> >> >>>
> >> >> >>> Jacques
> >> >> >>>
> >> >> >>> De : "RockyOfbiz" <[hidden email]>
> >> >> >>>
> >> >> >>>
> >> >> >>>> Hi BJ
> >> >> >>>>
> >> >> >>>> No i am not talking about contribution. I am just trying to
> >> >> understand
> >> >> >>>> the
> >> >> >>>> things now so i dont think i can do contribute at this stage.
> >> ;-).
> >> >> >>>>
> >> >> >>>> I am just trying to find out a way to my problem.
> >> >> >>>>
> >> >> >>>> How can i deploy my own java xml web services on ofbiz tomcat
> >> >> server?.
> >> >> >>>>
> >> >> >>>> is it possible or not?
> >> >> >>>>
> >> >> >>>> /R
> >> >> >>>>
> >> >> >>>> BJ Freeman wrote:
> >> >> >>>>> You are welcome to do what you want.
> >> >> >>>>> Are you asking if it is something you can to contribute to
> >> ofbiz?
> >> >> >>>>> Have you read the best practices
> >> >> >>>>>
> >> >> >>>>
> >> >>
> >>
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> >> >>>>>> Hi BJ,
> >> >> >>>>>>
> >> >> >>>>>> I am not sure about the framework/example. Can u tell me in
> >> detail
> >> >> if
> >> >> >>>>>> possible please?.
> >> >> >>>>>>
> >> >> >>>>>> I wanna develop a web service layer kinda stuff. So that i
> can
> >> >> reduce
> >> >> >>>> the
> >> >> >>>>>> generation of stubs for WSDL.
> >> >> >>>>>>
> >> >> >>>>>> It can act like a wrapper and combile all the services
> >> >> (service.xml
> >> >> )
> >> >> >>>> and
> >> >> >>>>>> provide only one endpoint for each application like this.
> >> >> >>>>>>
> >> >> >>>>>> http://localhost/webtools/product?wsdl
> >> >> >>>>>> http://localhost/webtools/accounting?wsdl
> >> >> >>>>>>
> >> >> >>>>>> Do u have any other plans?
> >> >> >>>>>>
> >> >> >>>>>> /R
> >> >> >>>>>>
> >> >> >>>>>> BJ Freeman wrote:
> >> >> >>>>>>> Like me when I first came, I had a misconception about what
> >> >> things
> >> >> >>>>>>> meant.
> >> >> >>>>>>> I believe you would be farther ahead by reading the wealth
> of
> >> >> >>>>>>> information in the document site.  It was not available when
> I
> >> >> >>>> started.
> >> >> >>>>>>> for instance the service.xml is for runing services defined
> in
> >> >> other
> >> >> >>>> xml
> >> >> >>>>>>> files that relate to ofbiz structure.
> >> >> >>>>>>>
> >> >> >>>>>>> what you call a java xml web service would be a module like
> >> the
> >> >> one
> >> >> >>>> in
> >> >> >>>>>>> /framework/example
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >> >> >>>>>>>> Hi all
> >> >> >>>>>>>>
> >> >> >>>>>>>> I am a newbie to ofbiz. I understood that the services are
> >> >> >>>>>>>> specified
> >> >> >>>>>>>> service.xml.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Is there any possibility to develop my own "java xml web
> >> >> services"
> >> >> >>>> and
> >> >> >>>>>>>> deploy then om ofbiz tomcat server?.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Need : I want to make a web services layer in ofbiz project
> >> and
> >> >> >>>> expose
> >> >> >>>>>>>> the
> >> >> >>>>>>>> ofbiz services (service.xml) with some extra funtionality.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Suggestion are welcome :-)
> >> >> >>>>>>>>
> >> >> >>>>>>>> Thanks in advance
> >> >> >>>>>>>>
> >> >> >>>>>>>> /Regards
> >> >> >>>>>>>> Rakesh
> >> >> >>>>>>>>
> >> >> >>>>>
> >> >> >>>> --
> >> >> >>>> View this message in context:
> >> >> >>>>
> >> >>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> >> >> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >> >>>>
> >> >> >>>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
> >> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13229837
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

BJ Freeman
In reply to this post by RockyOfbiz
Couple of things:
1) it is best you move this to the opentaps forum since that is the
distro you are using.
2)the mailing list deals only the apache ofbiz svn not customize
programs.  if you have a question about apache ofbiz then we can help,
as we have time.

RockyOfbiz sent the following on 10/16/2007 2:46 AM:

> Hi weizhan
>
> Thanks for reply.
>
> I have googled and found the same page so then i have replaced saaj-api.jar
> and saaj-impl.jar in
> D:\opentaps-1.0\framework\base\lib\j2eespecs. It worked.
>
> Now i have another problem here.. Please help me again .. It says it can not
> cast the newpackage.NewWebService. When looked the method loadServelet in
> org.apache.catalina.core.StandardWrapper.loadServlet().. it return type is
> javax.servlet.Servlet.
>
> It throws this error ..
>
> StandardContext.java:3953:ERROR] Servlet /webapplication4 threw load()
> exception
> java.lang.ClassCastException: newpackage.NewWebService
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> at
> org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> at org.ofbiz.base.start.Start.startServer(Start.java:317)
> at org.ofbiz.base.start.Start.start(Start.java:321)
> at org.ofbiz.base.start.Start.main(Start.java:407)
>
> Any idea?
>
> help out...
>
>
> guo weizhan wrote:
>> Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String)
>> method is not found,
>> http://forums.java.net/jive/thread.jspa?messageID=33340
>>
>> maybe this post can help you.
>>
>> you need to copy the jars your need to the classpath(like
>> build/web/WEB-INF/lib/ ) to let the class execute correctly
>>
>> 2007/10/16, RockyOfbiz <[hidden email]>:
>>>
>>> Hi weizhan
>>>
>>> Thansk for your reply. You are right. I appreciate it.
>>>
>>>
>>> I created a jar file containing newWebService.class and its
>>> methodclasses.
>>> Here am attaching a image which gives a screen shot of Webapplication4
>>> which
>>> i place in hotdeploy
>>>
>>> http://www.nabble.com/file/p13228821/errorScreen.jpg
>>>
>>> When i put the myfile.jar in lib it worked but at the same time it thrown
>>> an
>>> other error
>>>
>>> Can u also guide me through this problem.
>>>
>>> Exception sending context initialized event to listener instance of class
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
>>> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
>>> failed to parse runtime descriptor: java.lang.NoSuchMethodError:
>>> javax.xml.soap.MessageFactory.newInstance
>>> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>>>        at
>>>
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
>>> (WSServletContextListener.java:107)
>>>        at
>>> org.apache.catalina.core.StandardContext.listenerStart(
>>> StandardContext.java:3763)
>>>        at
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
>>> :1013)
>>>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
>>> :718)
>>>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
>>> :1013)
>>>        at org.apache.catalina.core.StandardEngine.start(
>>> StandardEngine.java:442)
>>>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>>>        at
>>> org.ofbiz.catalina.container.CatalinaContainer.start(
>>> CatalinaContainer.java:225)
>>>        at org.ofbiz.base.container.ContainerLoader.start(
>>> ContainerLoader.java:83)
>>>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>>>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
>>>        at org.ofbiz.base.start.Start.start(Start.java:321)
>>>        at org.ofbiz.base.start.Start.main(Start.java:407)
>>> Caused by: java.lang.NoSuchMethodError:
>>> javax.xml.soap.MessageFactory.newInstance
>>> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
>>>        at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163)
>>>        at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68)
>>>        at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304)
>>>        at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(
>>> DeploymentDescriptorParser.java:286)
>>>        at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
>>> DeploymentDescriptorParser.java:227)
>>>        at
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
>>> DeploymentDescriptorParser.java:133)
>>>        at
>>>
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
>>> (WSServletContextListener.java:97)
>>>        ... 13 more
>>>
>>> Thanks in advance.
>>> /R
>>>
>>> guo weizhan wrote:
>>>> it seems you haven't add the NewWebService  class to the classpath,
>>> have
>>>> you packege the class to the jar and place in the lib folder?
>>>> try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>
>>>>
>>>>
>>>> 2007/10/16, RockyOfbiz <[hidden email]>:
>>>>>
>>>>> Hi there.
>>>>>
>>>>> Sorry...I am new to java and ofbiz. It might sounds odd to you. But I
>>>>> will
>>>>> give a explanation here.
>>>>>
>>>>> Basically we like to use all the functionalities provided by ofbiz but
>>> we
>>>>> wanna replace the UI. So what we thought is we can just expose the
>>> ofbiz
>>>>> functionalities like product, catelog and etc to outside using
>>> services.
>>>>> To satisfy that requirement. I looked into server.xml. Unfortunately
>>> we
>>>>> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
>>>>> service.xml. Probably we need to make so many stub generations from
>>> WSDL.
>>>>> We
>>>>> didnt liked it.
>>>>>
>>>>> So what we convinced ourselves is to make a web service like this.
>>>>>
>>>>> package wspackage;
>>>>>
>>>>> import javax.jws.WebMethod;
>>>>> import javax.jws.WebService;
>>>>>
>>>>> @WebService()
>>>>> public class NewWebService {
>>>>>    @WebMethod
>>>>>    public String getName() {
>>>>>        return "Here we will contact Ofbiz classes or services";
>>>>>    }
>>>>> }
>>>>>
>>>>> So i created a new webapplication in hotdepoy and created a simple
>>>>> webpage
>>>>> (index.jsp) and a simple service(NewWebService). The combiled classes
>>> are
>>>>> placed in build/web/WEB-INF/lib. and configured that inside
>>>>> ofbiz-component.xml. When i start the ofbiz server it throws error
>>> saying
>>>>> it
>>>>> cant find the classes.
>>>>>
>>>>> classpath in is ofbiz-component.xml
>>>>> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
>>>>>
>>>>> Is this makes any sense?
>>>>>
>>>>> Just wondering with this issue .. i might be wrong .. i dont know
>>> whether
>>>>> am
>>>>> allowed to do like this or not.
>>>>>
>>>>> /R
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> BJ Freeman wrote:
>>>>>> maybe someone else will understand what you are trying to do
>>>>>> But I need clarification.
>>>>>> please explain java web services you are referring to.
>>>>>> you are not following normal best practices so I not sure what you
>>> are
>>>>>> doing.
>>>>>>
>>>>>> RockyOfbiz sent the following on 10/15/2007 12:29 PM:
>>>>>>> Hi There
>>>>>>>
>>>>>>> Thanks for your reply. Certainly i have gone through of these
>>> videos.
>>>>>>> I have created a new web application (myOwnWebapplication) in
>>>>> hot-deploy.
>>>>>>> and configured in ofbiz-component.xml
>>>>>>>
>>>>>>> it works perfect.
>>>>>>>
>>>>>>> But if i create a java web service in that webapplication
>>>>>>> (myOwnWebapplication) and trying to run the server and it throws
>>> the
>>>>>>> error
>>>>>>> saying it cant find the web service implementation. I have set the
>>>>> class
>>>>>>> paths to build/web/WEB-INF/lib. and all classes are there.
>>>>>>>
>>>>>>> I am using java 1.5 and netbeans.
>>>>>>>
>>>>>>> Any idea Whats wrong?
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> Here is a stack trace
>>>>>>> 2007-10-15 20:50:28,468 (main) [  
>>> StandardContext.java:3767:ERROR]
>>>>>>> Exception sending context initialized event to listener instance of
>>>>> class
>>>>>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
>>>>>>> com.sun.xml.ws.transport.http.servlet.WSServletException:
>>> WSSERVLET11:
>>>>>>> failed to parse runtime descriptor:
>>>>>>> com.sun.xml.ws.util.exception.LocatableWebServiceException: class
>>> not
>>>>>>> found
>>>>>>> in runtime descriptor: newpackage.NewWebService
>>>>>>> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
>>>>>>>      at
>>>>>>>
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
>>>>> (WSServletContextListener.java:107)
>>>>>>>      at
>>>>>>> org.apache.catalina.core.StandardContext.listenerStart(
>>>>> StandardContext.java:3763)
>>>>>>>      at
>>>>>>> org.apache.catalina.core.StandardContext.start(StandardContext.java
>>>>> :4211)
>>>>>>>      at
>>>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
>>>>> :1013)
>>>>>>>      at org.apache.catalina.core.StandardHost.start(
>>> StandardHost.java
>>>>> :718)
>>>>>>>      at
>>>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
>>>>> :1013)
>>>>>>>      at
>>>>>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java
>>> :442)
>>>>>>>      at org.apache.catalina.startup.Embedded.start(Embedded.java
>>> :821)
>>>>>>>      at
>>>>>>> org.ofbiz.catalina.container.CatalinaContainer.start(
>>>>> CatalinaContainer.java:225)
>>>>>>>      at
>>>>>>>
>>> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
>>>>>>>      at
>>> org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>>>>>>>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
>>>>>>>      at org.ofbiz.base.start.Start.start(Start.java:321)
>>>>>>>      at org.ofbiz.base.start.Start.main(Start.java:407)
>>>>>>> Caused by:
>>> com.sun.xml.ws.util.exception.LocatableWebServiceException:
>>>>>>> class
>>>>>>> not found in runtime descriptor: newpackage.NewWebService
>>>>>>> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
>>>>>>>      at
>>>>>>>
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
>>>>> (DeploymentDescriptorParser.java:531)
>>>>>>>      at
>>>>>>>
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
>>>>> DeploymentDescriptorParser.java:207)
>>>>>>>      at
>>>>>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
>>>>> DeploymentDescriptorParser.java:133)
>>>>>>>      at
>>>>>>>
>>> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
>>>>> (WSServletContextListener.java:97)
>>>>>>>      ... 13 more
>>>>>>> Caused by: java.lang.ClassNotFoundException:
>>> newpackage.NewWebService
>>>>>>>      at
>>>>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(
>>>>> WebappClassLoader.java:1355)
>>>>>>>      at
>>>>>>> org.apache.catalina.loader.WebappClassLoader.loadClass(
>>>>> WebappClassLoader.java:1201)
>>>>>>>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java
>>> :319)
>>>>>>>      at java.lang.Class.forName0(Native Method)
>>>>>>>      at java.lang.Class.forName(Class.java:242)
>>>>>>>      at
>>>>>>>
>>> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
>>>>> (DeploymentDescriptorParser.java:528)
>>>>>>>
>>>>>>> jacques.le.roux wrote:
>>>>>>>> You may have at least a look at http://docs.ofbiz.org/x/PQM
>>>>>>>> and more generally
>>>>>>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> De : "RockyOfbiz" <[hidden email]>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi BJ
>>>>>>>>>
>>>>>>>>> No i am not talking about contribution. I am just trying to
>>>>> understand
>>>>>>>>> the
>>>>>>>>> things now so i dont think i can do contribute at this stage.
>>> ;-).
>>>>>>>>> I am just trying to find out a way to my problem.
>>>>>>>>>
>>>>>>>>> How can i deploy my own java xml web services on ofbiz tomcat
>>>>> server?.
>>>>>>>>> is it possible or not?
>>>>>>>>>
>>>>>>>>> /R
>>>>>>>>>
>>>>>>>>> BJ Freeman wrote:
>>>>>>>>>> You are welcome to do what you want.
>>>>>>>>>> Are you asking if it is something you can to contribute to
>>> ofbiz?
>>>>>>>>>> Have you read the best practices
>>>>>>>>>>
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>>>>>>>>>> Hi BJ,
>>>>>>>>>>>
>>>>>>>>>>> I am not sure about the framework/example. Can u tell me in
>>> detail
>>>>> if
>>>>>>>>>>> possible please?.
>>>>>>>>>>>
>>>>>>>>>>> I wanna develop a web service layer kinda stuff. So that i can
>>>>> reduce
>>>>>>>>> the
>>>>>>>>>>> generation of stubs for WSDL.
>>>>>>>>>>>
>>>>>>>>>>> It can act like a wrapper and combile all the services
>>>>> (service.xml
>>>>> )
>>>>>>>>> and
>>>>>>>>>>> provide only one endpoint for each application like this.
>>>>>>>>>>>
>>>>>>>>>>> http://localhost/webtools/product?wsdl
>>>>>>>>>>> http://localhost/webtools/accounting?wsdl
>>>>>>>>>>>
>>>>>>>>>>> Do u have any other plans?
>>>>>>>>>>>
>>>>>>>>>>> /R
>>>>>>>>>>>
>>>>>>>>>>> BJ Freeman wrote:
>>>>>>>>>>>> Like me when I first came, I had a misconception about what
>>>>> things
>>>>>>>>>>>> meant.
>>>>>>>>>>>> I believe you would be farther ahead by reading the wealth of
>>>>>>>>>>>> information in the document site.  It was not available when I
>>>>>>>>> started.
>>>>>>>>>>>> for instance the service.xml is for runing services defined in
>>>>> other
>>>>>>>>> xml
>>>>>>>>>>>> files that relate to ofbiz structure.
>>>>>>>>>>>>
>>>>>>>>>>>> what you call a java xml web service would be a module like
>>> the
>>>>> one
>>>>>>>>> in
>>>>>>>>>>>> /framework/example
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>>>>>>>>>> Hi all
>>>>>>>>>>>>>
>>>>>>>>>>>>> I am a newbie to ofbiz. I understood that the services are
>>>>>>>>>>>>> specified
>>>>>>>>>>>>> service.xml.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Is there any possibility to develop my own "java xml web
>>>>> services"
>>>>>>>>> and
>>>>>>>>>>>>> deploy then om ofbiz tomcat server?.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Need : I want to make a web services layer in ofbiz project
>>> and
>>>>>>>>> expose
>>>>>>>>>>>>> the
>>>>>>>>>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Suggestion are welcome :-)
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks in advance
>>>>>>>>>>>>>
>>>>>>>>>>>>> /Regards
>>>>>>>>>>>>> Rakesh
>>>>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>>
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
>>>>>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
>>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

RockyOfbiz
In reply to this post by guo weizhan
Hi there

Thx for the help i got from u. I fixed it .. it was some problem in web.xml.

i mapped it wrongly ..

Anyway.. thx a lot ..

/R
guo weizhan wrote
Have no idea about this, but I think it's not the ofbiz problem, there are
something wrong in your program, please check this in detail.

2007/10/16, RockyOfbiz <rakesh_bov@yahoo.com>:
>
>
> Hi weizhan
>
> Thanks for reply.
>
> I have googled and found the same page so then i have replaced
> saaj-api.jar
> and saaj-impl.jar in
> D:\opentaps-1.0\framework\base\lib\j2eespecs. It worked.
>
> Now i have another problem here.. Please help me again .. It says it can
> not
> cast the newpackage.NewWebService. When looked the method loadServelet in
> org.apache.catalina.core.StandardWrapper.loadServlet().. it return type is
> javax.servlet.Servlet.
>
> It throws this error ..
>
> StandardContext.java:3953:ERROR] Servlet /webapplication4 threw load()
> exception
> java.lang.ClassCastException: newpackage.NewWebService
>        at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1055)
>        at org.apache.catalina.core.StandardWrapper.load(
> StandardWrapper.java:932)
>        at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3951)
>        at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :718)
>        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1013)
>        at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:442)
>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
>        at
> org.ofbiz.catalina.container.CatalinaContainer.start(
> CatalinaContainer.java:225)
>        at org.ofbiz.base.container.ContainerLoader.start(
> ContainerLoader.java:83)
>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
>        at org.ofbiz.base.start.Start.start(Start.java:321)
>        at org.ofbiz.base.start.Start.main(Start.java:407)
>
> Any idea?
>
> help out...
>
>
> guo weizhan wrote:
> >
> > Looks like javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String)
> > method is not found,
> > http://forums.java.net/jive/thread.jspa?messageID=33340
> >
> > maybe this post can help you.
> >
> > you need to copy the jars your need to the classpath(like
> > build/web/WEB-INF/lib/ ) to let the class execute correctly
> >
> > 2007/10/16, RockyOfbiz <rakesh_bov@yahoo.com>:
> >>
> >>
> >> Hi weizhan
> >>
> >> Thansk for your reply. You are right. I appreciate it.
> >>
> >>
> >> I created a jar file containing newWebService.class and its
> >> methodclasses.
> >> Here am attaching a image which gives a screen shot of Webapplication4
> >> which
> >> i place in hotdeploy
> >>
> >> http://www.nabble.com/file/p13228821/errorScreen.jpg
> >>
> >> When i put the myfile.jar in lib it worked but at the same time it
> thrown
> >> an
> >> other error
> >>
> >> Can u also guide me through this problem.
> >>
> >> Exception sending context initialized event to listener instance of
> class
> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> >> failed to parse runtime descriptor: java.lang.NoSuchMethodError:
> >> javax.xml.soap.MessageFactory.newInstance
> >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
> >>        at
> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:107)
> >>        at
> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> StandardContext.java:3763)
> >>        at
> >> org.apache.catalina.core.StandardContext.start(StandardContext.java
> :4211)
> >>        at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >> :1013)
> >>        at org.apache.catalina.core.StandardHost.start(StandardHost.java
> >> :718)
> >>        at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java
> >> :1013)
> >>        at org.apache.catalina.core.StandardEngine.start(
> >> StandardEngine.java:442)
> >>        at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> >>        at
> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> CatalinaContainer.java:225)
> >>        at org.ofbiz.base.container.ContainerLoader.start(
> >> ContainerLoader.java:83)
> >>        at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >>        at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >>        at org.ofbiz.base.start.Start.start(Start.java:321)
> >>        at org.ofbiz.base.start.Start.main(Start.java:407)
> >> Caused by: java.lang.NoSuchMethodError:
> >> javax.xml.soap.MessageFactory.newInstance
> >> (Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
> >>        at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:163)
> >>        at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:68)
> >>        at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:304)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(
> >> DeploymentDescriptorParser.java:286)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> DeploymentDescriptorParser.java:227)
> >>        at
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> DeploymentDescriptorParser.java:133)
> >>        at
> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> (WSServletContextListener.java:97)
> >>        ... 13 more
> >>
> >> Thanks in advance.
> >> /R
> >>
> >> guo weizhan wrote:
> >> >
> >> > it seems you haven't add the NewWebService  class to the classpath,
> >> have
> >> > you packege the class to the jar and place in the lib folder?
> >> > try add : <classpath type="dir" location="build/web/WEB-INF/lib"/>
> >> >
> >> >
> >> > 2007/10/16, RockyOfbiz <rakesh_bov@yahoo.com>:
> >> >>
> >> >>
> >> >> Hi there.
> >> >>
> >> >> Sorry...I am new to java and ofbiz. It might sounds odd to you. But
> I
> >> >> will
> >> >> give a explanation here.
> >> >>
> >> >> Basically we like to use all the functionalities provided by ofbiz
> but
> >> we
> >> >> wanna replace the UI. So what we thought is we can just expose the
> >> ofbiz
> >> >> functionalities like product, catelog and etc to outside using
> >> services.
> >> >>
> >> >> To satisfy that requirement. I looked into server.xml. Unfortunately
> >> we
> >> >> didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and
> >> >> service.xml. Probably we need to make so many stub generations from
> >> WSDL.
> >> >> We
> >> >> didnt liked it.
> >> >>
> >> >> So what we convinced ourselves is to make a web service like this.
> >> >>
> >> >> package wspackage;
> >> >>
> >> >> import javax.jws.WebMethod;
> >> >> import javax.jws.WebService;
> >> >>
> >> >> @WebService()
> >> >> public class NewWebService {
> >> >>    @WebMethod
> >> >>    public String getName() {
> >> >>        return "Here we will contact Ofbiz classes or services";
> >> >>    }
> >> >> }
> >> >>
> >> >> So i created a new webapplication in hotdepoy and created a simple
> >> >> webpage
> >> >> (index.jsp) and a simple service(NewWebService). The combiled
> classes
> >> are
> >> >> placed in build/web/WEB-INF/lib. and configured that inside
> >> >> ofbiz-component.xml. When i start the ofbiz server it throws error
> >> saying
> >> >> it
> >> >> cant find the classes.
> >> >>
> >> >> classpath in is ofbiz-component.xml
> >> >> <classpath type="jar" location="build/web/WEB-INF/lib/*"/>
> >> >>
> >> >> Is this makes any sense?
> >> >>
> >> >> Just wondering with this issue .. i might be wrong .. i dont know
> >> whether
> >> >> am
> >> >> allowed to do like this or not.
> >> >>
> >> >> /R
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> BJ Freeman wrote:
> >> >> >
> >> >> > maybe someone else will understand what you are trying to do
> >> >> > But I need clarification.
> >> >> > please explain java web services you are referring to.
> >> >> > you are not following normal best practices so I not sure what you
> >> are
> >> >> > doing.
> >> >> >
> >> >> > RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> >> >> >> Hi There
> >> >> >>
> >> >> >> Thanks for your reply. Certainly i have gone through of these
> >> videos.
> >> >> >>
> >> >> >> I have created a new web application (myOwnWebapplication) in
> >> >> hot-deploy.
> >> >> >> and configured in ofbiz-component.xml
> >> >> >>
> >> >> >> it works perfect.
> >> >> >>
> >> >> >> But if i create a java web service in that webapplication
> >> >> >> (myOwnWebapplication) and trying to run the server and it throws
> >> the
> >> >> >> error
> >> >> >> saying it cant find the web service implementation. I have set
> the
> >> >> class
> >> >> >> paths to build/web/WEB-INF/lib. and all classes are there.
> >> >> >>
> >> >> >> I am using java 1.5 and netbeans.
> >> >> >>
> >> >> >> Any idea Whats wrong?
> >> >> >> Thanks in advance
> >> >> >>
> >> >> >> Here is a stack trace
> >> >> >> 2007-10-15 20:50:28,468 (main) [
> >> StandardContext.java:3767:ERROR]
> >> >> >> Exception sending context initialized event to listener instance
> of
> >> >> class
> >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletException:
> >> WSSERVLET11:
> >> >> >> failed to parse runtime descriptor:
> >> >> >> com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> >> not
> >> >> >> found
> >> >> >> in runtime descriptor: newpackage.NewWebService
> >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> >> (WSServletContextListener.java:107)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardContext.listenerStart(
> >> >> StandardContext.java:3763)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardContext.start(
> StandardContext.java
> >> >> :4211)
> >> >> >>      at
> >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> >> :1013)
> >> >> >>      at org.apache.catalina.core.StandardHost.start(
> >> StandardHost.java
> >> >> :718)
> >> >> >>      at
> >> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> >> >> :1013)
> >> >> >>      at
> >> >> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java
> >> :442)
> >> >> >>      at org.apache.catalina.startup.Embedded.start(Embedded.java
> >> :821)
> >> >> >>      at
> >> >> >> org.ofbiz.catalina.container.CatalinaContainer.start(
> >> >> CatalinaContainer.java:225)
> >> >> >>      at
> >> >> >>
> >> >>
> >> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> >> >> >>      at
> >> org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> >> >> >>      at org.ofbiz.base.start.Start.startServer(Start.java:317)
> >> >> >>      at org.ofbiz.base.start.Start.start(Start.java:321)
> >> >> >>      at org.ofbiz.base.start.Start.main(Start.java:407)
> >> >> >> Caused by:
> >> com.sun.xml.ws.util.exception.LocatableWebServiceException:
> >> >> >> class
> >> >> >> not found in runtime descriptor: newpackage.NewWebService
> >> >> >> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> >> (DeploymentDescriptorParser.java:531)
> >> >> >>      at
> >> >> >>
> >> >>
> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(
> >> >> DeploymentDescriptorParser.java:207)
> >> >> >>      at
> >> >> >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(
> >> >> DeploymentDescriptorParser.java:133)
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized
> >> >> (WSServletContextListener.java:97)
> >> >> >>      ... 13 more
> >> >> >> Caused by: java.lang.ClassNotFoundException:
> >> newpackage.NewWebService
> >> >> >>      at
> >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> >> WebappClassLoader.java:1355)
> >> >> >>      at
> >> >> >> org.apache.catalina.loader.WebappClassLoader.loadClass(
> >> >> WebappClassLoader.java:1201)
> >> >> >>      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java
> >> :319)
> >> >> >>      at java.lang.Class.forName0(Native Method)
> >> >> >>      at java.lang.Class.forName(Class.java:242)
> >> >> >>      at
> >> >> >>
> >> >>
> >>
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass
> >> >> (DeploymentDescriptorParser.java:528)
> >> >> >>
> >> >> >>
> >> >> >> jacques.le.roux wrote:
> >> >> >>> You may have at least a look at http://docs.ofbiz.org/x/PQM
> >> >> >>> and more generally
> >> >> >>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
> >> >> >>>
> >> >> >>> Jacques
> >> >> >>>
> >> >> >>> De : "RockyOfbiz" <rakesh_bov@yahoo.com>
> >> >> >>>
> >> >> >>>
> >> >> >>>> Hi BJ
> >> >> >>>>
> >> >> >>>> No i am not talking about contribution. I am just trying to
> >> >> understand
> >> >> >>>> the
> >> >> >>>> things now so i dont think i can do contribute at this stage.
> >> ;-).
> >> >> >>>>
> >> >> >>>> I am just trying to find out a way to my problem.
> >> >> >>>>
> >> >> >>>> How can i deploy my own java xml web services on ofbiz tomcat
> >> >> server?.
> >> >> >>>>
> >> >> >>>> is it possible or not?
> >> >> >>>>
> >> >> >>>> /R
> >> >> >>>>
> >> >> >>>> BJ Freeman wrote:
> >> >> >>>>> You are welcome to do what you want.
> >> >> >>>>> Are you asking if it is something you can to contribute to
> >> ofbiz?
> >> >> >>>>> Have you read the best practices
> >> >> >>>>>
> >> >> >>>>
> >> >>
> >>
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>>
> >> >> >>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
> >> >> >>>>>> Hi BJ,
> >> >> >>>>>>
> >> >> >>>>>> I am not sure about the framework/example. Can u tell me in
> >> detail
> >> >> if
> >> >> >>>>>> possible please?.
> >> >> >>>>>>
> >> >> >>>>>> I wanna develop a web service layer kinda stuff. So that i
> can
> >> >> reduce
> >> >> >>>> the
> >> >> >>>>>> generation of stubs for WSDL.
> >> >> >>>>>>
> >> >> >>>>>> It can act like a wrapper and combile all the services
> >> >> (service.xml
> >> >> )
> >> >> >>>> and
> >> >> >>>>>> provide only one endpoint for each application like this.
> >> >> >>>>>>
> >> >> >>>>>> http://localhost/webtools/product?wsdl
> >> >> >>>>>> http://localhost/webtools/accounting?wsdl
> >> >> >>>>>>
> >> >> >>>>>> Do u have any other plans?
> >> >> >>>>>>
> >> >> >>>>>> /R
> >> >> >>>>>>
> >> >> >>>>>> BJ Freeman wrote:
> >> >> >>>>>>> Like me when I first came, I had a misconception about what
> >> >> things
> >> >> >>>>>>> meant.
> >> >> >>>>>>> I believe you would be farther ahead by reading the wealth
> of
> >> >> >>>>>>> information in the document site.  It was not available when
> I
> >> >> >>>> started.
> >> >> >>>>>>> for instance the service.xml is for runing services defined
> in
> >> >> other
> >> >> >>>> xml
> >> >> >>>>>>> files that relate to ofbiz structure.
> >> >> >>>>>>>
> >> >> >>>>>>> what you call a java xml web service would be a module like
> >> the
> >> >> one
> >> >> >>>> in
> >> >> >>>>>>> /framework/example
> >> >> >>>>>>>
> >> >> >>>>>>>
> >> >> >>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
> >> >> >>>>>>>> Hi all
> >> >> >>>>>>>>
> >> >> >>>>>>>> I am a newbie to ofbiz. I understood that the services are
> >> >> >>>>>>>> specified
> >> >> >>>>>>>> service.xml.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Is there any possibility to develop my own "java xml web
> >> >> services"
> >> >> >>>> and
> >> >> >>>>>>>> deploy then om ofbiz tomcat server?.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Need : I want to make a web services layer in ofbiz project
> >> and
> >> >> >>>> expose
> >> >> >>>>>>>> the
> >> >> >>>>>>>> ofbiz services (service.xml) with some extra funtionality.
> >> >> >>>>>>>>
> >> >> >>>>>>>> Suggestion are welcome :-)
> >> >> >>>>>>>>
> >> >> >>>>>>>> Thanks in advance
> >> >> >>>>>>>>
> >> >> >>>>>>>> /Regards
> >> >> >>>>>>>> Rakesh
> >> >> >>>>>>>>
> >> >> >>>>>
> >> >> >>>> --
> >> >> >>>> View this message in context:
> >> >> >>>>
> >> >>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
> >> >> >>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >> >>>>
> >> >> >>>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13221873
> >> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13228821
> >> Sent from the OFBiz - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13229837
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can i deploy java xml web services on ofbiz tomcat ?

Alfredo Rueda
In reply to this post by RockyOfbiz
Check this:

http://docs.ofbiz.org/display/OFBIZ/Export+Ofbiz+Services+that+use+complex+type+parameters+via+SOAP


RockyOfbiz wrote
Hi there.

Sorry...I am new to java and ofbiz. It might sounds odd to you. But I will give a explanation here.

Basically we like to use all the functionalities provided by ofbiz but we wanna replace the UI. So what we thought is we can just expose the ofbiz functionalities like product, catelog and etc to outside using services.

To satisfy that requirement. I looked into server.xml. Unfortunately we didnt liked the way ofbiz deals the WSDL. If we wanna use ofbiz and service.xml. Probably we need to make so many stub generations from WSDL. We didnt liked it.

So what we convinced ourselves is to make a web service like this.

package wspackage;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService()
public class NewWebService {
    @WebMethod
    public String getName() {
        return "Here we will contact Ofbiz classes or services";
    }
}

So i created a new webapplication in hotdepoy and created a simple webpage (index.jsp) and a simple service(NewWebService). The combiled classes are placed in build/web/WEB-INF/lib. and configured that inside ofbiz-component.xml. When i start the ofbiz server it throws error saying it cant find the classes.

classpath in is ofbiz-component.xml
 <classpath type="jar" location="build/web/WEB-INF/lib/*"/>

Is this makes any sense?

Just wondering with this issue .. i might be wrong .. i dont know whether am allowed to do like this or not.

/R



BJ Freeman wrote
maybe someone else will understand what you are trying to do
But I need clarification.
please explain java web services you are referring to.
you are not following normal best practices so I not sure what you are
doing.

RockyOfbiz sent the following on 10/15/2007 12:29 PM:
> Hi There
>
> Thanks for your reply. Certainly i have gone through of these videos.
>
> I have created a new web application (myOwnWebapplication) in hot-deploy.
> and configured in ofbiz-component.xml
>
> it works perfect.
>
> But if i create a java web service in that webapplication
> (myOwnWebapplication) and trying to run the server and it throws the error
> saying it cant find the web service implementation. I have set the class
> paths to build/web/WEB-INF/lib. and all classes are there.
>
> I am using java 1.5 and netbeans.
>
> Any idea Whats wrong?
> Thanks in advance
>
> Here is a stack trace
> 2007-10-15 20:50:28,468 (main) [    StandardContext.java:3767:ERROR]
> Exception sending context initialized event to listener instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11:
> failed to parse runtime descriptor:
> com.sun.xml.ws.util.exception.LocatableWebServiceException: class not found
> in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:107)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:821)
> at
> org.ofbiz.catalina.container.CatalinaContainer.start(CatalinaContainer.java:225)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:83)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:266)
> at org.ofbiz.base.start.Start.startServer(Start.java:317)
> at org.ofbiz.base.start.Start.start(Start.java:321)
> at org.ofbiz.base.start.Start.main(Start.java:407)
> Caused by: com.sun.xml.ws.util.exception.LocatableWebServiceException: class
> not found in runtime descriptor: newpackage.NewWebService
> at line 3 of jndi:/0.0.0.0/webapplication4/WEB-INF/sun-jaxws.xml
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:531)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:207)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
> at
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
> ... 13 more
> Caused by: java.lang.ClassNotFoundException: newpackage.NewWebService
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:242)
> at
> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:528)
>
>
> jacques.le.roux wrote:
>> You may have at least a look at http://docs.ofbiz.org/x/PQM
>> and more generally
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index
>>
>> Jacques
>>
>> De : "RockyOfbiz" <rakesh_bov@yahoo.com>
>>
>>
>>> Hi BJ
>>>
>>> No i am not talking about contribution. I am just trying to understand
>>> the
>>> things now so i dont think i can do contribute at this stage. ;-).
>>>
>>> I am just trying to find out a way to my problem.
>>>
>>> How can i deploy my own java xml web services on ofbiz tomcat server?.
>>>
>>> is it possible or not?
>>>
>>> /R
>>>
>>> BJ Freeman wrote:
>>>> You are welcome to do what you want.
>>>> Are you asking if it is something you can to contribute to ofbiz?
>>>> Have you read the best practices
>>>>
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>>>
>>>>
>>>>
>>>> RockyOfbiz sent the following on 10/13/2007 5:31 AM:
>>>>> Hi BJ,
>>>>>
>>>>> I am not sure about the framework/example. Can u tell me in detail if
>>>>> possible please?.
>>>>>
>>>>> I wanna develop a web service layer kinda stuff. So that i can reduce
>>> the
>>>>> generation of stubs for WSDL.
>>>>>
>>>>> It can act like a wrapper and combile all the services (service.xml)
>>> and
>>>>> provide only one endpoint for each application like this.
>>>>>
>>>>> http://localhost/webtools/product?wsdl
>>>>> http://localhost/webtools/accounting?wsdl
>>>>>
>>>>> Do u have any other plans?
>>>>>
>>>>> /R
>>>>>
>>>>> BJ Freeman wrote:
>>>>>> Like me when I first came, I had a misconception about what things
>>>>>> meant.
>>>>>> I believe you would be farther ahead by reading the wealth of
>>>>>> information in the document site.  It was not available when I
>>> started.
>>>>>> for instance the service.xml is for runing services defined in other
>>> xml
>>>>>> files that relate to ofbiz structure.
>>>>>>
>>>>>> what you call a java xml web service would be a module like the one
>>> in
>>>>>> /framework/example
>>>>>>
>>>>>>
>>>>>> RockyOfbiz sent the following on 10/12/2007 9:14 AM:
>>>>>>> Hi all
>>>>>>>
>>>>>>> I am a newbie to ofbiz. I understood that the services are specified
>>>>>>> service.xml.
>>>>>>>
>>>>>>> Is there any possibility to develop my own "java xml web services"
>>> and
>>>>>>> deploy then om ofbiz tomcat server?.
>>>>>>>
>>>>>>> Need : I want to make a web services layer in ofbiz project and
>>> expose
>>>>>>> the
>>>>>>> ofbiz services (service.xml) with some extra funtionality.
>>>>>>>
>>>>>>> Suggestion are welcome :-)
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> /Regards
>>>>>>> Rakesh
>>>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Can-i-deploy-java-xml-web-services-on-ofbiz-tomcat---tf4614184.html#a13192333
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>
>