Re: how to use ofBiz service in .Net application?

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

Re: how to use ofBiz service in .Net application?

Paul Foxworthy
Hi Deval,

OK.

A ref parameter is both an input and an output.

Is there anything in the mapEntryArray after you've called the CallupdateInventory method?

Cheers

Paul Foxworthy

devalpatel wrote
Hi  Paul,

Thanks for your reply.

There is no WSDLException generated.

void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter is Map (ofBiz  method 's return type Map).

I have converted it according to the java Map type :
//c# code
static mapEntry makeMap(String keyString, String valString) {

    stdString mapKeyString = new stdString();

    stdString mapValString = new stdString();

    mapKeyString.value = keyString;

    mapValString.value = valString;

    mapKey key = new mapKey();

    key.stdString = mapKeyString;

    mapValue val = new mapValue();

    val.Item = mapValString;

    val.ItemElementName = ItemChoiceType.stdString;

    mapEntry entry = new mapEntry();

    entry.mapKey = key;

    entry.mapValue = val;

    return entry;

  }


//c# code for calling ofBiz service CallupdateInventory.

mapEntry[] mapEntryArray = new mapEntry[5];

mapEntryArray[0] = makeMap("productId", ofbizProductid);

mapEntryArray[1] = makeMap("quantity", ofbizQOH);

mapEntryArray[2] = makeMap("status", "Paid");

mapEntryArray[3] = makeMap("login.username", "admin");

mapEntryArray[4] = makeMap("login.password", "ofbiz");

ofBizInventory.CallupdateInventory(ref mapEntryArray);

So, the input paramter map passed to ofbiz service is received successfully at ofBiz side with all key values set from c# as shown ablve.

But, as you know the return of all methods in ofBiz is map so ofBiz returns map as result of "CallupdateInventory" api call.

In C#, the return type of CallupdateInventory API is void. That also mystery for me that why the generated client stub classes in c# are having return type void?? And, the actual method name in ofBiz is updateInventory(), but in the generated classes of c# there isn't updateInventory method & its CallupdateInventory().

Hope, the above details provides more clarity of the problem.

Thanks,

Deval

  ----- Original Message -----
  From: Paul Foxworthy [via OFBiz]
  To: devalpatel
  Sent: Wednesday, May 09, 2012 4:45 AM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval,

  Some of the nulls may not be a problem, if a method takes no parameters or returns void.

  What's the message from the WSDLException?

  Also, I noticed you mentioned earlier that your proxy in C# has

  void CallsearchHelloPerson(ref map)

  What's the type of the map parameter? Is there any value in it after you call OFBiz?

  Cheers

  Paul Foxworthy


    devalpatel wrote
    Hi Paul,
    http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
    while generating the wsdl by hitting above URL in browser,,, i have debug the code in public void getWSDL(Definition def, String locationURI) throws WSDLException{} method.
    *****DEBUG RESULT (i have make BOLD to the null values in below result..)
    ________________________________________________________________________________________
    (com.ibm.wsdl.DefinitionImpl) Definition: name=null targetNamespace=http://ofbiz.apache.org/service/
    Types:
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
    Operation: name=searchHelloPerson
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
    Operation: name=searchHelloPerson
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    BindingOperation: name=searchHelloPerson
    BindingInput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
    namespaceURI=http://ofbiz.apache.org/service/
    BindingOutput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
    namespaceURI=http://ofbiz.apache.org/service/
    SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
    required=null
    soapActionURI=http://localhost:8080/webtools/control/SOAPService
    style=rpc
    SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
    required=null
    transportURI=http://schemas.xmlsoap.org/soap/http
    style=rpc
    ________________________________________________________________________________________
     
    The generated WSDL is as below :


    <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
    −
    <wsdl:types>
    −
    <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
    −
    <xsd:element name="std-String">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Integer">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:integer" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Long">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:long" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Float">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:float" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Double">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:double" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Boolean">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:boolean" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Locale">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Timestamp">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Date">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:date" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Time">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:time" use="required"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
    <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
    <xsd:element name="col-Stack" type="tns:col-Collection"/>
    <xsd:element name="col-Vector" type="tns:col-Collection"/>
    <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
    <xsd:element name="col-HashSet" type="tns:col-Collection"/>
    <xsd:element name="col-Collection" type="tns:col-Collection"/>
    <xsd:element name="map-TreeMap" type="tns:map-Map"/>
    <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
    <xsd:element name="map-Hashtable" type="tns:map-Map"/>
    <xsd:element name="map-Properties" type="tns:map-Map"/>
    <xsd:element name="map-HashMap" type="tns:map-Map"/>
    <xsd:element name="map-Map" type="tns:map-Map"/>
    <xsd:element name="map-Entry" type="tns:map-Entry"/>
    <xsd:element name="map-Key" type="tns:map-Key"/>
    <xsd:element name="map-Value" type="tns:map-Value"/>
    −
    <xsd:element name="eepk-" type="tns:map-Map">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eepk-Product for Product entity.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:element name="eeval-" type="tns:map-Map">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eeval-Product for Product entity.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:element name="cus-obj">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    Object content need to be in CDATA such as <cus-obj></cus-obj>
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:complexType name="map-Map">
    −
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
    </xsd:sequence>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Entry">
    −
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
    </xsd:sequence>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Key">
    −
    <xsd:all>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    </xsd:all>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Value">
    −
    <xsd:choice>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    −
    <xsd:complexType name="col-Collection">
    −
    <xsd:choice>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    </xsd:schema>
    </wsdl:types>
    −
    <wsdl:message name="searchHelloPersonRequest">
    −
    <wsdl:part name="map-Map" type="tns:map-Map">
    −
    <wsdl:documentation>
    <attribute java-class="String" name="helloPersonId" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.username" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.password" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    −
    <wsdl:message name="searchHelloPersonResponse">
    −
    <wsdl:part name="map-Map" type="tns:map-Map">
    −
    <wsdl:documentation>
    <attribute java-class="Map" name="name" namespace="http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    −
    <wsdl:portType name="searchHelloPersonPortType">
    −
    <wsdl:operation name="searchHelloPerson">
    <wsdl:input message="tns:searchHelloPersonRequest"/>
    <wsdl:output message="tns:searchHelloPersonResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    −
    <wsdl:binding name="searchHelloPersonSoapBinding" type="tns:searchHelloPersonPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    −
    <wsdl:operation name="searchHelloPerson">
    <soap:operation soapAction="http://localhost:8080/webtools/control/SOAPService" style="rpc"/>
    −
    <wsdl:input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:input>
    −
    <wsdl:output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    −
    <wsdl:service name="searchHelloPerson">
    −
    <wsdl:port binding="tns:searchHelloPersonSoapBinding" name="searchHelloPersonPort">
    <soap:address location="http://localhost:8080/webtools/control/SOAPService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    So, is there any problem in WSDL generation or generated WSDL  or any changes reauired in ofbiz ModelService.java????
  --
  Coherent Software Australia Pty Ltd
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  If you reply to this email, your message will be added to the discussion below:
  http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4619013.html 
  To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
  NAML
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

devalpatel


Hello Paul.

 

After CallUpdateInventory method call,  the mapEntryArray beocomes null. That means in ofBiz the mapEntryArray is processed and then after it becomes null in ofbiz.

 

so, after calling CallUpdateInventory  in .net, the value for mapEntryArray is null. In ofBiz, i debug the code and found that, the values set in mapEntryArray  from c# is retrieved successfully. And after proccessing, the ofbiz method returns the required paramaters . But, i did not come to know that, then after from where the map becomes null ???

 

Thanks in advance.

 

Regards,

Deval

----- Original Message -----
Sent: Thursday, May 10, 2012 3:55 AM
Subject: Re: how to use ofBiz service in .Net application?

Hi Deval,

OK.

A ref parameter is both an input and an output.

Is there anything in the mapEntryArray after you've called the CallupdateInventory method?

Cheers

Paul Foxworthy

devalpatel wrote
Hi  Paul,

Thanks for your reply.

There is no WSDLException generated.

void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter is Map (ofBiz  method 's return type Map).

I have converted it according to the java Map type :
//c# code
static mapEntry makeMap(String keyString, String valString) {

    stdString mapKeyString = new stdString();

    stdString mapValString = new stdString();

    mapKeyString.value = keyString;

    mapValString.value = valString;

    mapKey key = new mapKey();

    key.stdString = mapKeyString;

    mapValue val = new mapValue();

    val.Item = mapValString;

    val.ItemElementName = ItemChoiceType.stdString;

    mapEntry entry = new mapEntry();

    entry.mapKey = key;

    entry.mapValue = val;

    return entry;

  }


//c# code for calling ofBiz service CallupdateInventory.

mapEntry[] mapEntryArray = new mapEntry[5];

mapEntryArray[0] = makeMap("productId", ofbizProductid);

mapEntryArray[1] = makeMap("quantity", ofbizQOH);

mapEntryArray[2] = makeMap("status", "Paid");

mapEntryArray[3] = makeMap("login.username", "admin");

mapEntryArray[4] = makeMap("login.password", "ofbiz");

ofBizInventory.CallupdateInventory(ref mapEntryArray);

So, the input paramter map passed to ofbiz service is received successfully at ofBiz side with all key values set from c# as shown ablve.

But, as you know the return of all methods in ofBiz is map so ofBiz returns map as result of "CallupdateInventory" api call.

In C#, the return type of CallupdateInventory API is void. That also mystery for me that why the generated client stub classes in c# are having return type void?? And, the actual method name in ofBiz is updateInventory(), but in the generated classes of c# there isn't updateInventory method & its CallupdateInventory().

Hope, the above details provides more clarity of the problem.

Thanks,

Deval

  ----- Original Message -----
  From: Paul Foxworthy [via OFBiz]
  To: devalpatel
  Sent: Wednesday, May 09, 2012 4:45 AM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval,

  Some of the nulls may not be a problem, if a method takes no parameters or returns void.

  What's the message from the WSDLException?

  Also, I noticed you mentioned earlier that your proxy in C# has

  void CallsearchHelloPerson(ref map)

  What's the type of the map parameter? Is there any value in it after you call OFBiz?

  Cheers

  Paul Foxworthy


    devalpatel wrote
    Hi Paul,
    http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
    while generating the wsdl by hitting above URL in browser,,, i have debug the code in public void getWSDL(Definition def, String locationURI) throws WSDLException{} method.
    *****DEBUG RESULT (i have make BOLD to the null values in below result..)
    ________________________________________________________________________________________
    (com.ibm.wsdl.DefinitionImpl) Definition: name=null targetNamespace=http://ofbiz.apache.org/service/
    Types:
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
    Operation: name=searchHelloPerson
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
    PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
    Operation: name=searchHelloPerson
    Input: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    Output: name=null
    Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
    Part: name=map-Map
    typeName={http://ofbiz.apache.org/service/}map-Map
    BindingOperation: name=searchHelloPerson
    BindingInput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
    namespaceURI=http://ofbiz.apache.org/service/
    BindingOutput: name=null
    SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
    required=null
    use=literal
    encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
    namespaceURI=http://ofbiz.apache.org/service/
    SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
    required=null
    soapActionURI=http://localhost:8080/webtools/control/SOAPService
    style=rpc
    SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
    required=null
    transportURI=http://schemas.xmlsoap.org/soap/http
    style=rpc
    ________________________________________________________________________________________
     
    The generated WSDL is as below :


    <wsdl:definitions targetNamespace="<A href='http://ofbiz.apache.org/service/">' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/">
    −
    <wsdl:types>
    −
    <xsd:schema targetNamespace="<A href='http://ofbiz.apache.org/service/">' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/">
    −
    <xsd:element name="std-String">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Integer">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:integer" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Long">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:long" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Float">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:float" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Double">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:double" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Boolean">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:boolean" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="std-Locale">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Timestamp">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Date">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:date" use="required"/>
    </xsd:complexType>
    </xsd:element>
    −
    <xsd:element name="sql-Time">
    −
    <xsd:complexType>
    <xsd:attribute name="value" type="xsd:time" use="required"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
    <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
    <xsd:element name="col-Stack" type="tns:col-Collection"/>
    <xsd:element name="col-Vector" type="tns:col-Collection"/>
    <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
    <xsd:element name="col-HashSet" type="tns:col-Collection"/>
    <xsd:element name="col-Collection" type="tns:col-Collection"/>
    <xsd:element name="map-TreeMap" type="tns:map-Map"/>
    <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
    <xsd:element name="map-Hashtable" type="tns:map-Map"/>
    <xsd:element name="map-Properties" type="tns:map-Map"/>
    <xsd:element name="map-HashMap" type="tns:map-Map"/>
    <xsd:element name="map-Map" type="tns:map-Map"/>
    <xsd:element name="map-Entry" type="tns:map-Entry"/>
    <xsd:element name="map-Key" type="tns:map-Key"/>
    <xsd:element name="map-Value" type="tns:map-Value"/>
    −
    <xsd:element name="eepk-" type="tns:map-Map">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eepk-Product for Product entity.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:element name="eeval-" type="tns:map-Map">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    The name of element need to be appended with name of entity such as eeval-Product for Product entity.
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:element name="cus-obj">
    −
    <xsd:annotation>
    −
    <xsd:documentation>
    Object content need to be in CDATA such as <cus-obj></cus-obj>
    </xsd:documentation>
    </xsd:annotation>
    </xsd:element>
    −
    <xsd:complexType name="map-Map">
    −
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
    </xsd:sequence>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Entry">
    −
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
    </xsd:sequence>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Key">
    −
    <xsd:all>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    </xsd:all>
    </xsd:complexType>
    −
    <xsd:complexType name="map-Value">
    −
    <xsd:choice>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
    <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    −
    <xsd:complexType name="col-Collection">
    −
    <xsd:choice>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
    <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
    </xsd:choice>
    </xsd:complexType>
    </xsd:schema>
    </wsdl:types>
    −
    <wsdl:message name="searchHelloPersonRequest">
    −
    <wsdl:part name="map-Map" type="tns:map-Map">
    −
    <wsdl:documentation>
    <attribute java-class="String" name="helloPersonId" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.username" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    <attribute java-class="java.lang.String" name="login.password" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    −
    <wsdl:message name="searchHelloPersonResponse">
    −
    <wsdl:part name="map-Map" type="tns:map-Map">
    −
    <wsdl:documentation>
    <attribute java-class="Map" name="name" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
    </wsdl:documentation>
    </wsdl:part>
    </wsdl:message>
    −
    <wsdl:portType name="searchHelloPersonPortType">
    −
    <wsdl:operation name="searchHelloPerson">
    <wsdl:input message="tns:searchHelloPersonRequest"/>
    <wsdl:output message="tns:searchHelloPersonResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    −
    <wsdl:binding name="searchHelloPersonSoapBinding" type="tns:searchHelloPersonPortType">
    <soap:binding style="rpc" transport="<A href='http://schemas.xmlsoap.org/soap/http"/>' target=_top rel=nofollow link="external">http://schemas.xmlsoap.org/soap/http"/>
    −
    <wsdl:operation name="searchHelloPerson">
    <soap:operation soapAction="<A href='http://localhost:8080/webtools/control/SOAPService"' target=_top rel=nofollow link="external">http://localhost:8080/webtools/control/SOAPService" style="rpc"/>
    −
    <wsdl:input>
    <soap:body encodingStyle="<A href='http://schemas.xmlsoap.org/soap/encoding/"' target=_top rel=nofollow link="external">http://schemas.xmlsoap.org/soap/encoding/" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:input>
    −
    <wsdl:output>
    <soap:body encodingStyle="<A href='http://schemas.xmlsoap.org/soap/encoding/"' target=_top rel=nofollow link="external">http://schemas.xmlsoap.org/soap/encoding/" namespace="<A href='http://ofbiz.apache.org/service/"' target=_top rel=nofollow link="external">http://ofbiz.apache.org/service/" use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    −
    <wsdl:service name="searchHelloPerson">
    −
    <wsdl:port binding="tns:searchHelloPersonSoapBinding" name="searchHelloPersonPort">
    <soap:address location="<A href='http://localhost:8080/webtools/control/SOAPService"/>' target=_top rel=nofollow link="external">http://localhost:8080/webtools/control/SOAPService"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    So, is there any problem in WSDL generation or generated WSDL  or any changes reauired in ofbiz ModelService.java????
  --
  Coherent Software Australia Pty Ltd
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  If you reply to this email, your message will be added to the discussion below:
  http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4619013.html 
  To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
  NAML
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4621981.html
To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Paul Foxworthy
Hi Deval,

I tried to create a .NET web service that returned a Dictionary, then to consume it from another .NET application. When I tried to consume it, I got the error message "The type ... is not supported because it implements IDictionary". It seems Microsoft's XmlSerializer mandates custom serialization and deserialization of Dictionary and Hashtable, which are the .NET equivalents of Map. In other words, you can't use those types in a web service. See discussions of the issue at http://stackoverflow.com/questions/679050/how-to-return-generic-dictionary-in-a-webservice, http://blogs.msdn.com/b/adam/archive/2010/09/10/how-to-serialize-a-dictionary-or-hashtable-in-c.aspx, http://forums.asp.net/t/63683.aspx/1, http://forums.asp.net/t/1567938.aspx/1

You can regard this as a limitation or bug that has been addressed in WCF.

Here's an article from Stack Overflow where someone overcame a similar problem by just doing an HTTP request for the URL, then parsing the XML themselves.

http://stackoverflow.com/questions/1132536/consuming-apachesoapmap-complex-datatype-in-webservice-using-net

Alternatives I can think of:

- Go to WCF and do something like http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx

- Do as Rajbir Saini suggested: write a new web service in Java that packages the data you want in a more accessible format for .NET.

Cheers

Paul Foxworthy

devalpatel wrote
Hello Paul.



After CallUpdateInventory method call,  the mapEntryArray beocomes null. That means in ofBiz the mapEntryArray is processed and then after it becomes null in ofbiz.



so, after calling CallUpdateInventory  in .net, the value for mapEntryArray is null. In ofBiz, i debug the code and found that, the values set in mapEntryArray  from c# is retrieved successfully. And after proccessing, the ofbiz method returns the required paramaters . But, i did not come to know that, then after from where the map becomes null ???



Thanks in advance.



Regards,

Deval

  ----- Original Message -----
  From: Paul Foxworthy [via OFBiz]
  To: devalpatel
  Sent: Thursday, May 10, 2012 3:55 AM
  Subject: Re: how to use ofBiz service in .Net application?


  Hi Deval,

  OK.

  A ref parameter is both an input and an output.

  Is there anything in the mapEntryArray after you've called the CallupdateInventory method?

  Cheers

  Paul Foxworthy


    devalpatel wrote
    Hi  Paul,

    Thanks for your reply.

    There is no WSDLException generated.

    void CallsearchHelloPerson(ref map)  => Here,  the type of map parameter is Map (ofBiz  method 's return type Map).

    I have converted it according to the java Map type :
    //c# code
    static mapEntry makeMap(String keyString, String valString) {

        stdString mapKeyString = new stdString();

        stdString mapValString = new stdString();

        mapKeyString.value = keyString;

        mapValString.value = valString;

        mapKey key = new mapKey();

        key.stdString = mapKeyString;

        mapValue val = new mapValue();

        val.Item = mapValString;

        val.ItemElementName = ItemChoiceType.stdString;

        mapEntry entry = new mapEntry();

        entry.mapKey = key;

        entry.mapValue = val;

        return entry;

      }


    //c# code for calling ofBiz service CallupdateInventory.

    mapEntry[] mapEntryArray = new mapEntry[5];

    mapEntryArray[0] = makeMap("productId", ofbizProductid);

    mapEntryArray[1] = makeMap("quantity", ofbizQOH);

    mapEntryArray[2] = makeMap("status", "Paid");

    mapEntryArray[3] = makeMap("login.username", "admin");

    mapEntryArray[4] = makeMap("login.password", "ofbiz");

    ofBizInventory.CallupdateInventory(ref mapEntryArray);

    So, the input paramter map passed to ofbiz service is received successfully at ofBiz side with all key values set from c# as shown ablve.

    But, as you know the return of all methods in ofBiz is map so ofBiz returns map as result of "CallupdateInventory" api call.

    In C#, the return type of CallupdateInventory API is void. That also mystery for me that why the generated client stub classes in c# are having return type void?? And, the actual method name in ofBiz is updateInventory(), but in the generated classes of c# there isn't updateInventory method & its CallupdateInventory().

    Hope, the above details provides more clarity of the problem.

    Thanks,

    Deval

      ----- Original Message -----
      From: Paul Foxworthy [via OFBiz]
      To: devalpatel
      Sent: Wednesday, May 09, 2012 4:45 AM
      Subject: Re: how to use ofBiz service in .Net application?


      Hi Deval,

      Some of the nulls may not be a problem, if a method takes no parameters or returns void.

      What's the message from the WSDLException?

      Also, I noticed you mentioned earlier that your proxy in C# has

      void CallsearchHelloPerson(ref map)

      What's the type of the map parameter? Is there any value in it after you call OFBiz?

      Cheers

      Paul Foxworthy


        devalpatel wrote
        Hi Paul,
        http://localhost:8080/webtools/control/SOAPService/searchHelloPerson?wsdl
        while generating the wsdl by hitting above URL in browser,,, i have debug the code in public void getWSDL(Definition def, String locationURI) throws WSDLException{} method.
        *****DEBUG RESULT (i have make BOLD to the null values in below result..)
        ________________________________________________________________________________________
        (com.ibm.wsdl.DefinitionImpl) Definition: name=null targetNamespace=http://ofbiz.apache.org/service/
        Types:
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
        Operation: name=searchHelloPerson
        Input: name=null
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        Output: name=null
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        Binding: name={http://ofbiz.apache.org/service/}searchHelloPersonSoapBinding
        PortType: name={http://ofbiz.apache.org/service/}searchHelloPersonPortType
        Operation: name=searchHelloPerson
        Input: name=null
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonRequest
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        Output: name=null
        Message: name={http://ofbiz.apache.org/service/}searchHelloPersonResponse
        Part: name=map-Map
        typeName={http://ofbiz.apache.org/service/}map-Map
        BindingOperation: name=searchHelloPerson
        BindingInput: name=null
        SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
        required=null
        use=literal
        encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
        namespaceURI=http://ofbiz.apache.org/service/
        BindingOutput: name=null
        SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
        required=null
        use=literal
        encodingStyles={http://schemas.xmlsoap.org/soap/encoding/}
        namespaceURI=http://ofbiz.apache.org/service/
        SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
        required=null
        soapActionURI=http://localhost:8080/webtools/control/SOAPService
        style=rpc
        SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
        required=null
        transportURI=http://schemas.xmlsoap.org/soap/http
        style=rpc
        ________________________________________________________________________________________
         
        The generated WSDL is as below :


        <wsdl:definitions targetNamespace="http://ofbiz.apache.org/service/">
        −
        <wsdl:types>
        −
        <xsd:schema targetNamespace="http://ofbiz.apache.org/service/">
        −
        <xsd:element name="std-String">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Integer">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:integer" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Long">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:long" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Float">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:float" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Double">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:double" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Boolean">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:boolean" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="std-Locale">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="sql-Timestamp">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:dateTime" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="sql-Date">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:date" use="required"/>
        </xsd:complexType>
        </xsd:element>
        −
        <xsd:element name="sql-Time">
        −
        <xsd:complexType>
        <xsd:attribute name="value" type="xsd:time" use="required"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="col-ArrayList" type="tns:col-Collection"/>
        <xsd:element name="col-LinkedList" type="tns:col-Collection"/>
        <xsd:element name="col-Stack" type="tns:col-Collection"/>
        <xsd:element name="col-Vector" type="tns:col-Collection"/>
        <xsd:element name="col-TreeSet" type="tns:col-Collection"/>
        <xsd:element name="col-HashSet" type="tns:col-Collection"/>
        <xsd:element name="col-Collection" type="tns:col-Collection"/>
        <xsd:element name="map-TreeMap" type="tns:map-Map"/>
        <xsd:element name="map-WeakHashMap" type="tns:map-Map"/>
        <xsd:element name="map-Hashtable" type="tns:map-Map"/>
        <xsd:element name="map-Properties" type="tns:map-Map"/>
        <xsd:element name="map-HashMap" type="tns:map-Map"/>
        <xsd:element name="map-Map" type="tns:map-Map"/>
        <xsd:element name="map-Entry" type="tns:map-Entry"/>
        <xsd:element name="map-Key" type="tns:map-Key"/>
        <xsd:element name="map-Value" type="tns:map-Value"/>
        −
        <xsd:element name="eepk-" type="tns:map-Map">
        −
        <xsd:annotation>
        −
        <xsd:documentation>
        The name of element need to be appended with name of entity such as eepk-Product for Product entity.
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        −
        <xsd:element name="eeval-" type="tns:map-Map">
        −
        <xsd:annotation>
        −
        <xsd:documentation>
        The name of element need to be appended with name of entity such as eeval-Product for Product entity.
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        −
        <xsd:element name="cus-obj">
        −
        <xsd:annotation>
        −
        <xsd:documentation>
        Object content need to be in CDATA such as <cus-obj></cus-obj>
        </xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        −
        <xsd:complexType name="map-Map">
        −
        <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Entry"/>
        </xsd:sequence>
        </xsd:complexType>
        −
        <xsd:complexType name="map-Entry">
        −
        <xsd:sequence>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Key"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Value"/>
        </xsd:sequence>
        </xsd:complexType>
        −
        <xsd:complexType name="map-Key">
        −
        <xsd:all>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
        </xsd:all>
        </xsd:complexType>
        −
        <xsd:complexType name="map-Value">
        −
        <xsd:choice>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-String"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Integer"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Long"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Float"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Double"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Boolean"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:std-Locale"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Timestamp"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Date"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:sql-Time"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-ArrayList"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-LinkedList"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Stack"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Vector"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-TreeSet"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-HashSet"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:col-Collection"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-HashMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Properties"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Hashtable"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-WeakHashMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-TreeMap"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:map-Map"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eepk-"/>
        <xsd:element maxOccurs="1" minOccurs="1" ref="tns:eeval-"/>
        </xsd:choice>
        </xsd:complexType>
        −
        <xsd:complexType name="col-Collection">
        −
        <xsd:choice>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-String"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Integer"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Long"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Float"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Double"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Boolean"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:std-Locale"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Timestamp"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Date"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:sql-Time"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-ArrayList"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-LinkedList"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Stack"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Vector"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-TreeSet"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-HashSet"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:col-Collection"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-HashMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Properties"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Hashtable"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-WeakHashMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-TreeMap"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:map-Map"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eepk-"/>
        <xsd:element maxOccurs="unbounded" minOccurs="0" ref="tns:eeval-"/>
        </xsd:choice>
        </xsd:complexType>
        </xsd:schema>
        </wsdl:types>
        −
        <wsdl:message name="searchHelloPersonRequest">
        −
        <wsdl:part name="map-Map" type="tns:map-Map">
        −
        <wsdl:documentation>
        <attribute java-class="String" name="helloPersonId" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        <attribute java-class="java.lang.String" name="login.username" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        <attribute java-class="java.lang.String" name="login.password" namespace="http://ofbiz.apache.org/service/" optional="true" type="std-String"/>
        </wsdl:documentation>
        </wsdl:part>
        </wsdl:message>
        −
        <wsdl:message name="searchHelloPersonResponse">
        −
        <wsdl:part name="map-Map" type="tns:map-Map">
        −
        <wsdl:documentation>
        <attribute java-class="Map" name="name" namespace="http://ofbiz.apache.org/service/" optional="true" type="eeval-"/>
        </wsdl:documentation>
        </wsdl:part>
        </wsdl:message>
        −
        <wsdl:portType name="searchHelloPersonPortType">
        −
        <wsdl:operation name="searchHelloPerson">
        <wsdl:input message="tns:searchHelloPersonRequest"/>
        <wsdl:output message="tns:searchHelloPersonResponse"/>
        </wsdl:operation>
        </wsdl:portType>
        −
        <wsdl:binding name="searchHelloPersonSoapBinding" type="tns:searchHelloPersonPortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        −
        <wsdl:operation name="searchHelloPerson">
        <soap:operation soapAction="http://localhost:8080/webtools/control/SOAPService" style="rpc"/>
        −
        <wsdl:input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
        </wsdl:input>
        −
        <wsdl:output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ofbiz.apache.org/service/" use="literal"/>
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
        −
        <wsdl:service name="searchHelloPerson">
        −
        <wsdl:port binding="tns:searchHelloPersonSoapBinding" name="searchHelloPersonPort">
        <soap:address location="http://localhost:8080/webtools/control/SOAPService"/>
        </wsdl:port>
        </wsdl:service>
        </wsdl:definitions>

        So, is there any problem in WSDL generation or generated WSDL  or any changes reauired in ofbiz ModelService.java????
      --
      Coherent Software Australia Pty Ltd
      http://www.cohsoft.com.au/

      Bonsai ERP, the all-inclusive ERP system
      http://www.bonsaierp.com.au/




    ------------------------------------------------------------------------------

      If you reply to this email, your message will be added to the discussion below:
      http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4619013.html 
      To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
      NAML
  --
  Coherent Software Australia Pty Ltd
  http://www.cohsoft.com.au/

  Bonsai ERP, the all-inclusive ERP system
  http://www.bonsaierp.com.au/




------------------------------------------------------------------------------

  If you reply to this email, your message will be added to the discussion below:
  http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4621981.html 
  To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
  NAML
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

devalpatel
In reply to this post by Rajbir Saini
Rajbir,

You have suggested to wrap the ofBiz services into our own SOAP services that returns the primitives types or whatever we want.

So, does the SOAP services will be implemented and deployed in ofBiz ? because, i am not clear about how to fit the independent SOAP services into the ofBiz framework.

Thanks in advance.

Regards,
Deval
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Rajbir Saini
Deval,

Yes, you will need to implement the SOAP services and deploy them in the
OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
CXF to deploy your services. I understand it is going to be a lot of
work but I think this is the best way out looking at the state of OFBiz
exported web services.

Thanks,

Raj

On Friday 11 May 2012 10:38 AM, devalpatel wrote:

> Rajbir,
>
> You have suggested to wrap the ofBiz services into our own SOAP services
> that returns the primitives types or whatever we want.
>
> So, does the SOAP services will be implemented and deployed in ofBiz ?
> because, i am not clear about how to fit the independent SOAP services into
> the ofBiz framework.
>
> Thanks in advance.
>
> Regards,
> Deval
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

devalpatel
Hi Rajbir,
 
Thanks for the reply.
 
How to deploy the soap service in ofBiz. Means, if  I create a new project for implementing a SOAP webservice, how to deploy it in ofBiz?
 
Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into ofBiz... 3) required components etc........
 
Just brief level direction for implementing wrapper soap service............
 
Thanks in advance.
 
Regards,
 
Deval
----- Original Message -----
Sent: Friday, May 11, 2012 11:30 AM
Subject: Re: how to use ofBiz service in .Net application?

Deval,

Yes, you will need to implement the SOAP services and deploy them in the
OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
CXF to deploy your services. I understand it is going to be a lot of
work but I think this is the best way out looking at the state of OFBiz
exported web services.

Thanks,

Raj

On Friday 11 May 2012 10:38 AM, devalpatel wrote:

> Rajbir,
>
> You have suggested to wrap the ofBiz services into our own SOAP services
> that returns the primitives types or whatever we want.
>
> So, does the SOAP services will be implemented and deployed in ofBiz ?
> because, i am not clear about how to fit the independent SOAP services into
> the ofBiz framework.
>
> Thanks in advance.
>
> Regards,
> Deval
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html
To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Rajbir Saini
Hi Deval,

Below is rough outline of the step to deploy a web service using CXF.
You can replace CXF with any other web services engine such as Axis2.

1. Download CXF web application from Apache CXF.
2. Create OFBiz component in hot-deploy or you can use your existing
component.
3. Configure CXF servlet into the web.xml. You may need to copy the CXF
jar files in the lib folder of your component.
4. Deploy your services using cxf.xml. You can inject Delegator and
LocalDispatcher using Spring beans and use the dispatcher to call the
OFBiz services within your web service.

Thanks,

Raj

On Friday 11 May 2012 06:41 PM, devalpatel wrote:

> Hi Rajbir,
>
> Thanks for the reply.
>
> How to deploy the soap service in ofBiz. Means, if  I create a new project for implementing a SOAP webservice, how to deploy it in ofBiz?
>
> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into ofBiz... 3) required components etc........
>
> Just brief level direction for implementing wrapper soap service............
>
> Thanks in advance.
>
> Regards,
>
> Deval
>    ----- Original Message -----
>    From: Rajbir Saini [via OFBiz]
>    To: devalpatel
>    Sent: Friday, May 11, 2012 11:30 AM
>    Subject: Re: how to use ofBiz service in .Net application?
>
>
>    Deval,
>
>    Yes, you will need to implement the SOAP services and deploy them in the
>    OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
>    CXF to deploy your services. I understand it is going to be a lot of
>    work but I think this is the best way out looking at the state of OFBiz
>    exported web services.
>
>    Thanks,
>
>    Raj
>
>    On Friday 11 May 2012 10:38 AM, devalpatel wrote:
>
>    >  Rajbir,
>    >
>    >  You have suggested to wrap the ofBiz services into our own SOAP services
>    >  that returns the primitives types or whatever we want.
>    >
>    >  So, does the SOAP services will be implemented and deployed in ofBiz ?
>    >  because, i am not clear about how to fit the independent SOAP services into
>    >  the ofBiz framework.
>    >
>    >  Thanks in advance.
>    >
>    >  Regards,
>    >  Deval
>    >
>    >  --
>    >  View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
>    >  Sent from the OFBiz - User mailing list archive at Nabble.com.
>    >
>
>
>
>
> ------------------------------------------------------------------------------
>
>    If you reply to this email, your message will be added to the discussion below:
>    http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html
>    To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>    NAML
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Jacques Le Roux
Administrator
BTW we could build an adapter for that. I mean to encapsulate OFBiz services in CXF when needed...
Also be careful from the other side if ever you use also CXF: https://issues.apache.org/jira/browse/OFBIZ-4245

Jacques

From: "Rajbir Saini" <[hidden email]>

> Hi Deval,
>
> Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine such
> as Axis2.
>
> 1. Download CXF web application from Apache CXF.
> 2. Create OFBiz component in hot-deploy or you can use your existing component.
> 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component.
> 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher to
> call the OFBiz services within your web service.
>
> Thanks,
>
> Raj
>
> On Friday 11 May 2012 06:41 PM, devalpatel wrote:
>> Hi Rajbir,
>>
>> Thanks for the reply.
>>
>> How to deploy the soap service in ofBiz. Means, if  I create a new project for implementing a SOAP webservice, how to deploy it
>> in ofBiz?
>>
>> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into
>> ofBiz... 3) required components etc........
>>
>> Just brief level direction for implementing wrapper soap service............
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> Deval
>>    ----- Original Message -----
>>    From: Rajbir Saini [via OFBiz]
>>    To: devalpatel
>>    Sent: Friday, May 11, 2012 11:30 AM
>>    Subject: Re: how to use ofBiz service in .Net application?
>>
>>
>>    Deval,
>>
>>    Yes, you will need to implement the SOAP services and deploy them in the
>>    OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
>>    CXF to deploy your services. I understand it is going to be a lot of
>>    work but I think this is the best way out looking at the state of OFBiz
>>    exported web services.
>>
>>    Thanks,
>>
>>    Raj
>>
>>    On Friday 11 May 2012 10:38 AM, devalpatel wrote:
>>
>>    >  Rajbir,
>>    >
>>    >  You have suggested to wrap the ofBiz services into our own SOAP services
>>    >  that returns the primitives types or whatever we want.
>>    >
>>    >  So, does the SOAP services will be implemented and deployed in ofBiz ?
>>    >  because, i am not clear about how to fit the independent SOAP services into
>>    >  the ofBiz framework.
>>    >
>>    >  Thanks in advance.
>>    >
>>    >  Regards,
>>    >  Deval
>>    >
>>    >  --
>>    >  View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
>>    >  Sent from the OFBiz - User mailing list archive at Nabble.com.
>>    >
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>    If you reply to this email, your message will be added to the discussion below:
>>    http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html
>>    To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>>    NAML
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

devalpatel
Jacques,
 
Is there any other solution to my problem of calling ofBiz services from .Net? .........may be different perspective?
 
 
----- Original Message -----
Sent: Friday, May 11, 2012 7:53 PM
Subject: Re: how to use ofBiz service in .Net application?

BTW we could build an adapter for that. I mean to encapsulate OFBiz services in CXF when needed...
Also be careful from the other side if ever you use also CXF: https://issues.apache.org/jira/browse/OFBIZ-4245

Jacques

From: "Rajbir Saini" <[hidden email]>

> Hi Deval,
>
> Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine such
> as Axis2.
>
> 1. Download CXF web application from Apache CXF.
> 2. Create OFBiz component in hot-deploy or you can use your existing component.
> 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component.
> 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher to
> call the OFBiz services within your web service.
>
> Thanks,
>
> Raj
>
> On Friday 11 May 2012 06:41 PM, devalpatel wrote:
>> Hi Rajbir,
>>
>> Thanks for the reply.
>>
>> How to deploy the soap service in ofBiz. Means, if  I create a new project for implementing a SOAP webservice, how to deploy it
>> in ofBiz?
>>
>> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into
>> ofBiz... 3) required components etc........
>>
>> Just brief level direction for implementing wrapper soap service............
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> Deval
>>    ----- Original Message -----
>>    From: Rajbir Saini [via OFBiz]
>>    To: devalpatel
>>    Sent: Friday, May 11, 2012 11:30 AM
>>    Subject: Re: how to use ofBiz service in .Net application?
>>
>>
>>    Deval,
>>
>>    Yes, you will need to implement the SOAP services and deploy them in the
>>    OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
>>    CXF to deploy your services. I understand it is going to be a lot of
>>    work but I think this is the best way out looking at the state of OFBiz
>>    exported web services.
>>
>>    Thanks,
>>
>>    Raj
>>
>>    On Friday 11 May 2012 10:38 AM, devalpatel wrote:
>>
>>    >  Rajbir,
>>    >
>>    >  You have suggested to wrap the ofBiz services into our own SOAP services
>>    >  that returns the primitives types or whatever we want.
>>    >
>>    >  So, does the SOAP services will be implemented and deployed in ofBiz ?
>>    >  because, i am not clear about how to fit the independent SOAP services into
>>    >  the ofBiz framework.
>>    >
>>    >  Thanks in advance.
>>    >
>>    >  Regards,
>>    >  Deval
>>    >
>>    >  --
>>    >  View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
>>    >  Sent from the OFBiz - User mailing list archive at Nabble.com.
>>    >
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>>    If you reply to this email, your message will be added to the discussion below:
>>    http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html
>>    To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>>    NAML
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>



If you reply to this email, your message will be added to the discussion below:
http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626573.html
To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Jacques Le Roux
Administrator
Sorry, I never worked with SOAP + .Net.
I'd follow Paul recommendation about WCF

Jacques

From: "devalpatel" <[hidden email]>

> Jacques,
>
> Is there any other solution to my problem of calling ofBiz services from .Net? .........may be different perspective?
>
>
>  ----- Original Message -----
>  From: Jacques Le Roux [via OFBiz]
>  To: devalpatel
>  Sent: Friday, May 11, 2012 7:53 PM
>  Subject: Re: how to use ofBiz service in .Net application?
>
>
>  BTW we could build an adapter for that. I mean to encapsulate OFBiz services in CXF when needed...
>  Also be careful from the other side if ever you use also CXF: https://issues.apache.org/jira/browse/OFBIZ-4245
>
>  Jacques
>
>  From: "Rajbir Saini" <[hidden email]>
>
>  > Hi Deval,
>  >
>  > Below is rough outline of the step to deploy a web service using CXF. You can replace CXF with any other web services engine
> such
>  > as Axis2.
>  >
>  > 1. Download CXF web application from Apache CXF.
>  > 2. Create OFBiz component in hot-deploy or you can use your existing component.
>  > 3. Configure CXF servlet into the web.xml. You may need to copy the CXF jar files in the lib folder of your component.
>  > 4. Deploy your services using cxf.xml. You can inject Delegator and LocalDispatcher using Spring beans and use the dispatcher
> to
>  > call the OFBiz services within your web service.
>  >
>  > Thanks,
>  >
>  > Raj
>  >
>  > On Friday 11 May 2012 06:41 PM, devalpatel wrote:
>  >> Hi Rajbir,
>  >>
>  >> Thanks for the reply.
>  >>
>  >> How to deploy the soap service in ofBiz. Means, if  I create a new project for implementing a SOAP webservice, how to deploy
> it
>  >> in ofBiz?
>  >>
>  >> Can you give some simple steps or example...For exmplae . 1) create a soap webservice. 2) put the war into XXX folder into
>  >> ofBiz... 3) required components etc........
>  >>
>  >> Just brief level direction for implementing wrapper soap service............
>  >>
>  >> Thanks in advance.
>  >>
>  >> Regards,
>  >>
>  >> Deval
>  >>    ----- Original Message -----
>  >>    From: Rajbir Saini [via OFBiz]
>  >>    To: devalpatel
>  >>    Sent: Friday, May 11, 2012 11:30 AM
>  >>    Subject: Re: how to use ofBiz service in .Net application?
>  >>
>  >>
>  >>    Deval,
>  >>
>  >>    Yes, you will need to implement the SOAP services and deploy them in the
>  >>    OFBiz. You can use Axis2 (Older version is part of OFBiz) or you can use
>  >>    CXF to deploy your services. I understand it is going to be a lot of
>  >>    work but I think this is the best way out looking at the state of OFBiz
>  >>    exported web services.
>  >>
>  >>    Thanks,
>  >>
>  >>    Raj
>  >>
>  >>    On Friday 11 May 2012 10:38 AM, devalpatel wrote:
>  >>
>  >>    >  Rajbir,
>  >>    >
>  >>    >  You have suggested to wrap the ofBiz services into our own SOAP services
>  >>    >  that returns the primitives types or whatever we want.
>  >>    >
>  >>    >  So, does the SOAP services will be implemented and deployed in ofBiz ?
>  >>    >  because, i am not clear about how to fit the independent SOAP services into
>  >>    >  the ofBiz framework.
>  >>    >
>  >>    >  Thanks in advance.
>  >>    >
>  >>    >  Regards,
>  >>    >  Deval
>  >>    >
>  >>    >  --
>  >>    >  View this message in context:
>  >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625479.html
>  >>    >  Sent from the OFBiz - User mailing list archive at Nabble.com.
>  >>    >
>  >>
>  >>
>  >>
>  >>
>  >> ------------------------------------------------------------------------------
>  >>
>  >>    If you reply to this email, your message will be added to the discussion below:
>  >>    http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4625558.html
>  >>    To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>  >>    NAML
>  >>
>  >> --
>  >> View this message in context:
>  >> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626369.html
>  >> Sent from the OFBiz - User mailing list archive at Nabble.com.
>  >
>
>
>
>
> ------------------------------------------------------------------------------
>
>  If you reply to this email, your message will be added to the discussion below:
>  http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626573.html
>  To unsubscribe from Re: how to use ofBiz service in .Net application?, click here.
>  NAML
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4626647.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

devalpatel
Hi all,

Finally, I have resolved the .Net - ofBiz webservice communication issue by using following way :

1) In ofBiz, the call for .Net was successful and response also received successfully.

2) The problem was such that, while calling ofBiz service from .Net app...the response was recieved was null   values. However, the required task in the ofBiz service was performed. In order to send the response or success notification to .Net app, i have called another .Net webservice in ofBiz service implementation. Hence, after performing the task of .Net request in ofBiz service i send the response to .Net by calling .Net service.

e.g.
  ofBiz service - updateInventory()
  .Net service - getUpdateInvNotificationFrmOfbiz()

1) .Net app calls  updateInventory().

2)  updateInventory {
       // perform required task based on received params from .Net req.
       //call  getUpdateInvNotificationFrmOfbiz().
}

3) ofBiz sends "SUCCESS" as req param to .Net service getUpdateInvNotificationFrmOfbiz().

This is how the communication achieved.

Regards,

Deval
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Jacques Le Roux
Administrator
Thanks for the update,

Maybe you could write a word in the FAQ?
https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo

Jacques

devalpatel wrote:

> Hi all,
>
> Finally, I have resolved the .Net - ofBiz webservice communication issue by
> using following way :
>
> 1) In ofBiz, the call for .Net was successful and response also received
> successfully.
>
> 2) The problem was such that, while calling ofBiz service from .Net
> app...the response was recieved was null   values. However, the required
> task in the ofBiz service was performed. In order to send the response or
> success notification to .Net app, i have called another .Net webservice in
> ofBiz service implementation. Hence, after performing the task of .Net
> request in ofBiz service i send the response to .Net by calling .Net
> service.
>
> e.g.
>  ofBiz service - updateInventory()
>  .Net service - getUpdateInvNotificationFrmOfbiz()
>
> 1) .Net app calls  updateInventory().
>
> 2)  updateInventory {
>       // perform required task based on received params from .Net req.
>       //call  getUpdateInvNotificationFrmOfbiz().
> }
>
> 3) ofBiz sends "SUCCESS" as req param to .Net service
> getUpdateInvNotificationFrmOfbiz().
>
> This is how the communication achieved.
>
> Regards,
>
> Deval
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

ashish-gupta
In reply to this post by Jacques Le Roux
Hi,
I want to use ofbiz service in .net 4.0 application.

What i did...

1. i added service as web reference in .net

2. i created proxy object.

3. Created Map Entry parameter list

4. Invoked web service method with map entry parameter

But i received null response.

Can you please tell me what wrong i did?
And also please suggest me what steps i need to follow to get the right response.

Thanks in advance...
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Paul Foxworthy
Hi Ashish,

Please read through this thread from the mailing list.

http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144.html

Please, please use WCF, so create a Service Reference not a Web Reference. It really is no harder, and gives you much more flexibility.

Cheers

Paul Foxworthy

ashish-gupta wrote
Hi,
I want to use ofbiz service in .net 4.0 application.

What i did...

1. i added service as web reference in .net

2. i created proxy object.

3. Created Map Entry parameter list

4. Invoked web service method with map entry parameter

But i received null response.

Can you please tell me what wrong i did?
And also please suggest me what steps i need to follow to get the right response.

Thanks in advance...
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Jacques Le Roux
Administrator
Hi Paul,

If you did not do it yet, maybe a reference in FAQ page would help in future?

Thanks

Jacques

From: "Paul Foxworthy" <[hidden email]>

> Hi Ashish,
>
> Please read through this thread from the mailing list.
>
> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144.html
>
> Please, please use WCF, so create a Service Reference not a Web Reference.
> It really is no harder, and gives you much more flexibility.
>
> Cheers
>
> Paul Foxworthy
>
>
> ashish-gupta wrote
>> Hi,
>> I want to use ofbiz service in .net 4.0 application.
>>
>> What i did...
>>
>> 1. i added service as web reference in .net
>>
>> 2. i created proxy object.
>>
>> 3. Created Map Entry parameter list
>>
>> 4. Invoked web service method with map entry parameter
>>
>> But i received null response.
>>
>> Can you please tell me what wrong i did?
>> And also please suggest me what steps i need to follow to get the right
>> response.
>>
>> Thanks in advance...
>
>
>
>
>
> -----
> --
> Coherent Software Australia Pty Ltd
> http://www.coherentsoftware.com.au/
>
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4639795.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: how to use ofBiz service in .Net application?

Paul Foxworthy
Hi Jacques,

I haven't yet. I intend to put together a simple example when I've got some time.

Cheers

Paul

Jacques Le Roux wrote
Hi Paul,

If you did not do it yet, maybe a reference in FAQ page would help in future?

Thanks

Jacques

From: "Paul Foxworthy" <[hidden email]>
> Hi Ashish,
>
> Please read through this thread from the mailing list.
>
> http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144.html
>
> Please, please use WCF, so create a Service Reference not a Web Reference.
> It really is no harder, and gives you much more flexibility.
>
> Cheers
>
> Paul Foxworthy
>
>
> ashish-gupta wrote
>> Hi,
>> I want to use ofbiz service in .net 4.0 application.
>>
>> What i did...
>>
>> 1. i added service as web reference in .net
>>
>> 2. i created proxy object.
>>
>> 3. Created Map Entry parameter list
>>
>> 4. Invoked web service method with map entry parameter
>>
>> But i received null response.
>>
>> Can you please tell me what wrong i did?
>> And also please suggest me what steps i need to follow to get the right
>> response.
>>
>> Thanks in advance...
>
>
>
>
>
> -----
> --
> Coherent Software Australia Pty Ltd
> http://www.coherentsoftware.com.au/
>
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Re-how-to-use-ofBiz-service-in-Net-application-tp4580144p4639795.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
12