Webservice interfaces

From EgeeWiki

Contents

Provided interfaces

  • LB (Logging and Bokkeeping)
    • legacy interface - custom protocol, using libraries in C language on client side
    • webservice interface - anything supporting SSL compatible with Globus on client side
  • JP (Job Provenance)
    • based on webservices

Webservices are provided by gSoap (written in C language).

Requirements on server side

  • gsoap plugin >= 1.4.0 || >= 1.2.6.1 (not sure if propagated to glite 3.0.2)
  • LB server >= 1.3.14.1

WSDL

http://egee.cesnet.cz/en/WSDL

API documentation

Examples

About Java examples: With some older SW versions (Java or Globus?), Java SSL is not compatible with Globus SSL. Workarond was disabling RC4 cipher on client side: little hack in the first "pure Java" example, patch to trustmanager in second "trustmanager" example. It isn't reproducible with recent versions on SLC4.

Troubleshooting

Transport endpoint is not connected

[main] ERROR ws_getversion  -  AxisFault - End of file or no input:  
'Transport endpoint is not connected'
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: End of file or no input: 'Transport endpoint is not connected'
  • service is not running
  • missing certificate on client or server
  • there was bug around VOMS too (workaround is on server site: using non-existant VOMS directory or having VOMS CA certificate of client)
  • used wrong VO

java.lang.NumberFormatException: For input string: "Status"

java.lang.NumberFormatException: For input string: "Status"
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/} 
Server.userException
faultSubcode:
faultString: java.lang.NumberFormatException: For input string:  
"Status"
faultActor:
faultNode:
faultDetail:
         {http://xml.apache.org/axis/} 
stackTrace:java.lang.NumberFormatException: For input string:  
"Status"
         at java.lang.NumberFormatException.forInputString 
(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:447)
         at java.lang.Integer.parseInt(Integer.java:497)
	 ...
  • too old gsoap-plugin on server side

gsoap incompatibilities in fault propagation

There has been changed XML format of error messages since gsoap >= 2.7.9, so using the same version on client and server is recommended.

Axis project doesn't parse fault messages at all (prints XML dump). Not too good. But no bad change there. :-)

  • Proper error message (similar gsoap versions on server and client):
Oh, shit!
  __jpsrv__QueryJobs:633: Operation not permitted (Error getting attributes of the job 'https://skurut1.cesnet.cz:9000/hox_00D0B7A78CF7lig_01')
    get_attr:469: Input/output error (SELECT from attribute 'http://egee.cesnet.cz/en/Schema/LB/Attributes:user2' failed)
      glite_jp_db_execstmt:220: Input/output error (Table 'jpisvaltri.attr_7f6a4a7f0c0ee7ec4a0319c847f9e536' doesn't exist)

Ideal case.

  • Too old at client with new at server (client gsoap 2.7.0f, server gsoap 2.7.9d):
Oh, shit!

2.7.0 can't handle messages from 2.7.9b nor as raw XML dump.

  • Old at server, new at client with good version (client gsoap 2.7.9b, server gsoap 2.7.0f):
Oh, shit!
  <genericFault>
    <jpelem:genericFault>
      <source>__jpsrv__QueryJobs:633</source>
      <code>1</code>
      <text>Operation not permitted</text>
      <description>Error getting attributes of the job 'https://skurut1.cesnet.cz:9000/hox_00D0B7A78CF7lig_01'</description>
      <reason>
        <source>get_attr:469</source>
        <code>5</code>
        <text>Input/output error</text>
        <description>SELECT from attribute 'http://egee.cesnet.cz/en/Schema/LB/Attributes:user2' failed</description>
        <reason>
          <source>glite_jp_db_execstmt:220</source>
          <code>5</code>
          <text>Input/output error</text>
          <description>Table 'jpis.attr_7f6a4a7f0c0ee7ec4a0319c847f9e536' doesn't exist</description>
        </reason>
      </reason>
    </jpelem:genericFault>
  </genericFault>

(manually reformated) 2.7.9b behaves good on unknown fault format, we can get info in raw XML.

  • Old at server, new at client with bad version (client gsoap 2.7.9d, server gsoap 2.7.0f):
SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"Validation constraint violation: tag name or namespace mismatch in element <genericFault>"
Detail: [no detail]

Back to the stone age: 2.7.9d can't handle faults from 2.7.0f nor as raw XML dump.
To get raw XML is needed a small patch to gsoap.