You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Claus Straube <cl...@xdoo.de> on 2005/02/20 12:02:56 UTC

Web3

Hello!
 
I try to connect a SAP system via Cocoon. The Web3 sample from the blocks
works fine, but I’ve got problems with more complex datastructures. Here’s
my example (it’s like the – very small – example out of the Web3
documentation):
 
<?xml version="1.0" encoding="ISO-8859-1"?>
<page xmlns:rfc="http://apache.org/cocoon/Web3-Rfc/1.0">
      <rfc:include name="BAPI_MATERIAL_GETLIST">
          <rfc:import>
            <rfc:tables>
                  <rfc:table name="MATERIALSHORTDESCSEL">
                        <rfc:structure name="1">     
                              <rfc:field name="SIGN">I</rfc:field>
                              <rfc:field name="OPTION">CP</rfc:field>
                              <rfc:field name="DESCR_LOW">Sch*</rfc:field>
                              <rfc:field name="DESCR_HIGH"> </rfc:field>
                      </rfc:structure>
                  </rfc:table>
            <rfc:table name="PLANTSELECTION">
                <rfc:structure name="2">
                       <rfc:field name="SIGN">I</rfc:field>
                       <rfc:field name="OPTION">EQ</rfc:field>
                       <rfc:field name="PLANT_LOW">1000</rfc:field>
                       <rfc:field name="PLANT_HIGH"> </rfc:field>
                </rfc:structure>
            </rfc:table>
            </rfc:tables>
          </rfc:import>
      </rfc:include>
</page>
 
I’m trying to get a materiallist out of the System. The attribute values are
correct (I’ve tested that with Java). The problem is the “structure” element
in the table. In Java you’ve to add a row with ‘appendRow()’ to the table,
before you can fill it with values. I think the ‘structure’ has a function
like that. 
 
But if I add this element to the xml, I get this error message --> Field 1
not a member of INPUT 
I can delete the ‘name’ attribute --> Error executing pipeline. (NPE)
I can delete the structure element --> Trying to access row values in a
table which does not have any rows yet 
 
Has anyone an experience about Web3? Can anyone help me to solve this
problem?
 
Thank you - Claus
 
__________________________________________
 
Claus Straube
Francéstrasse 31
80997 München
+49 (089) 14 16 682