AW: AW: AW: [OFBiz] Users - SOAP service call

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

AW: AW: AW: [OFBiz] Users - SOAP service call

Javrishvili, Giorgi (Key-Work)
Hi peter!

I made it run!!! Strange, but the problem was with export attribute od service definition: It should be true. May be it is a version question...

Now I'm facing problem with Deserializing:

org.xml.sax.SAXException: Deserializing parameter 'message':  could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}string
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:273)

My code looks like this:

public static Map hello(DispatchContext ctx, Map context) {
                GenericDelegator delegator = ctx.getDelegator();
        LocalDispatcher dispatcher = ctx.getDispatcher();
        String userName = (String)context.get("userName");
        Map result = ServiceUtil.returnSuccess();
                Debug.logInfo("*************** "+userName+" says Hello, this is our first SOAP service in OFBiz", module);
                result.put("message", "*************** "+userName+" says Hello, this is our first SOAP service in OFBiz");
                return result;
        }

How did you cope with that?

Thank you,

Giorgi

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Peter Goron
Gesendet: Mittwoch, 27. Juli 2005 14:40
An: OFBiz Users / Usage Discussion
Betreff: Re: AW: AW: [OFBiz] Users - SOAP service call


Hi Giorgi,

Your service definitions seem to be correct but I've never tried to call a webservice from ofbiz.

Does the ofbiz log file contain some errors or warnings ?

You can also try to a call an external webservice from ofbiz (e.g.
google) to check if the problem comes from the client or server part of ofbiz soap implementation.


Peter

> Hi, Peter.
>
> Many thanks for your answers. They are extremely useful, believe me!
> So, with outgoing soap is now OK. I finally found the problem. I mean,
> I see now at least following:
>
> If I call my service, I mean, "soapHello", I get
>
> **********************************************************************
> **
> *** Incoming SOAP ******************************************************
> Requested service not available
> ************************************************************************
>
> But if I call some "soapHelloGoodByeDontComeBack"(which doesn't exist
> at all) I'm getting
>
> **********************************************************************
> **
> *** Incoming SOAP ******************************************************
> Problem processing the service
> ************************************************************************
>
> Here is a services.xml part:
>
> <service name="hello" default-entity-name="Product"
> engine="java" location="de.kw.tech_tools.TechToolServices"
> invoke="hello" export="true">
> <description>
> Service for testing java services in Ofbiz
> </description>
> <attribute name="userName" type="String" mode="IN"
> optional="true">
> </attribute>
> <attribute name="message" type="String" mode="OUT"
> optional="true">
> </attribute>
> </service>
>
> <service name="soapHello" engine="soap"
> location="http://localhost:22080/webtools/control/SOAPService"
> invoke="hello" auth="false" export="false">
> <description>
> SOAP service;
> </description>
> <!-- <namespace>http://localhost:22080/</namespace>-->
> <namespace>http://www.ofbiz.org/service/</namespace>
> <attribute name="userName" type="String" mode="IN"
> optional="true">
> </attribute>
> <attribute name="message" type="String" mode="OUT"
> optional="true">
> </attribute>
> </service>
>
> What is important, that "hello" service itself is called without
> problems by dispatcher.runSync("hello"...).
>
> Does it need any additional configuration?
>
> Thank you in advance,
>
> Giorgi
>
>


 
_______________________________________________
Users mailing list
[hidden email] http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: AW: [OFBiz] Users - SOAP service call

Peter Goron
> Hi peter!
>
> I made it run!!! Strange, but the problem was with export attribute od service definition: It should be true. May be it is a version question...
As I said I've never try to call a webservice from ofbiz, so maybe it's
required to defined a service as exportable to be able to do a soap
call.

> Now I'm facing problem with Deserializing:
>
> org.xml.sax.SAXException: Deserializing parameter 'message':  could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}string
>         at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:273)

I don't know enough soap but I think it's a bug in ofbiz or soap
implementation.

Peter


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: AW: [OFBiz] Users - SOAP service call

jitender
In reply to this post by Javrishvili, Giorgi (Key-Work)

Javrishvili, Giorgi (Key-Work) wrote
Hi peter!

I made it run!!! Strange, but the problem was with export attribute od service definition: It should be true. May be it is a version question...

Now I'm facing problem with Deserializing:

org.xml.sax.SAXException: Deserializing parameter 'message':  could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}string
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:273)

My code looks like this:

public static Map hello(DispatchContext ctx, Map context) {
                GenericDelegator delegator = ctx.getDelegator();
        LocalDispatcher dispatcher = ctx.getDispatcher();
        String userName = (String)context.get("userName");
        Map result = ServiceUtil.returnSuccess();
                Debug.logInfo("*************** "+userName+" says Hello, this is our first SOAP service in OFBiz", module);
                result.put("message", "*************** "+userName+" says Hello, this is our first SOAP service in OFBiz");
                return result;
        }

How did you cope with that?

Thank you,

Giorgi

-----Ursprüngliche Nachricht-----
Von: users-bounces@lists.ofbiz.org [mailto:users-bounces@lists.ofbiz.org] Im Auftrag von Peter Goron
Gesendet: Mittwoch, 27. Juli 2005 14:40
An: OFBiz Users / Usage Discussion
Betreff: Re: AW: AW: [OFBiz] Users - SOAP service call


Hi Giorgi,

Your service definitions seem to be correct but I've never tried to call a webservice from ofbiz.

Does the ofbiz log file contain some errors or warnings ?

You can also try to a call an external webservice from ofbiz (e.g.
google) to check if the problem comes from the client or server part of ofbiz soap implementation.


Peter

> Hi, Peter.
>
> Many thanks for your answers. They are extremely useful, believe me!
> So, with outgoing soap is now OK. I finally found the problem. I mean,
> I see now at least following:
>
> If I call my service, I mean, "soapHello", I get
>
> **********************************************************************
> **
> *** Incoming SOAP ******************************************************
> Requested service not available
> ************************************************************************
>
> But if I call some "soapHelloGoodByeDontComeBack"(which doesn't exist
> at all) I'm getting
>
> **********************************************************************
> **
> *** Incoming SOAP ******************************************************
> Problem processing the service
> ************************************************************************
>
> Here is a services.xml part:
>
> <service name="hello" default-entity-name="Product"
>  engine="java" location="de.kw.tech_tools.TechToolServices"
> invoke="hello" export="true">
> <description>
> Service for testing java services in Ofbiz
> </description>
> <attribute name="userName" type="String" mode="IN"
>  optional="true">
> </attribute>
> <attribute name="message" type="String" mode="OUT"
>  optional="true">
> </attribute>
> </service>
>
> <service name="soapHello" engine="soap"
>  location="http://localhost:22080/webtools/control/SOAPService"
> invoke="hello" auth="false" export="false">
> <description>
> SOAP service;
> </description>
>
> <namespace>http://www.ofbiz.org/service/</namespace>
> <attribute name="userName" type="String" mode="IN"
>  optional="true">
> </attribute>               
> <attribute name="message" type="String" mode="OUT"
>  optional="true">
> </attribute>
> </service>
>
> What is important, that "hello" service itself is called without
> problems by dispatcher.runSync("hello"...).
>
> Does it need any additional configuration?
>
> Thank you in advance,
>
> Giorgi
>
>


 
_______________________________________________
Users mailing list
Users@lists.ofbiz.org http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
Users@lists.ofbiz.org
http://lists.ofbiz.org/mailman/listinfo/users
Function is ok but how to call this function from userinterface.
where i need to change in configuration.