Taverna 2

XML splitters don't support optional inputs - WSDL minOccurs ignored

Details

Description

WSDL services (typically Document/literal) that define an optional input element using minOccurs="0", such as:

<xsd:element name="matrix" type="valuedomains:Matrix" minOccurs="0"
				maxOccurs="1" default="BLOSUM62"> 
				<xsd:annotation> 
					<xsd:documentation> 
						Scoring (comparison) matrix to use when
						searching the database. Supported matrices
						includes: BLOSUM45, BLOSUM50, BLOSUM62,
						BLOSUM80, BLOSUM90, PAM30, PAM70, PAM250.
					</xsd:documentation> 
				</xsd:annotation> 
			</xsd:element>

is not honoured by Taverna's XML splitters.

The optional ports, even if not connected, are inserted with an empty string like <matrix></matrix> - when they should have been left out:

<NCBIBLASTInputParameters xmlns="gme://Taverna-caGrid.caBIG/1.0/uk.org.mygrid.cagrid.domain.ncbiblast"><alignmentsToOutput></alignmentsToOutput><blastProgram>BLASTP</blastProgram><databaseName>uniprot</databaseName><dropoff></dropoff><email>mannen@soiland-reyes.com</email><expectedThreshold></expectedThreshold><extendGap></extendGap><filter></filter><gapAlignment></gapAlignment><match></match><matrix></matrix><maxScores></maxScores><mismatch></mismatch><openGap></openGap></NCBIBLASTInputParameters>

Some services just ignore these, but this does not work with Axis 1 - based services, such as used in caGrid (this example):

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.IllegalArgumentException
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException
        at uk.org.mygrid.cagrid.valuedomains.Matrix.fromValue(Matrix.java:41)
        at uk.org.mygrid.cagrid.valuedomains.Matrix.fromString(Matrix.java:46)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.axis.encoding.ser.EnumDeserializer.makeValue(EnumDeserializer.java:53)
        at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:171)
        at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
        at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
        at org.globus.wsrf.container.ServiceThread.doPost(ServiceThread.java:676)
        at org.globus.wsrf.container.ServiceThread.process(ServiceThread.java:397)
        at org.globus.wsrf.container.ServiceThread.run(ServiceThread.java:302)

        {http://xml.apache.org/axis/}hostname:ralph
        {http://xml.apache.org/axis/}isRuntimeException:true

In the same way, nillable=true is ignored, and an empty string is inserted instead of xsi:null=true.

Contact Stian for details on example service that requires this, like the wrapped NCBI Blast service for caGrid.

Issue Links

Activity

Hide
Alan Williams added a comment - 2009-08-13 14:34

This has also been reported by the user Simon Felix. For the WSDL location http://virtualsolar.org/VSO/VSOi the following body is created:

<body xmlns="http://virtualsolar.org/VSO/VSOi">
<version xmlns=""></version>
<block xmlns="">
<provider />
<source />
<instrument />
<physobs />
<time />
<wave />
<extent />
<field />
</block>
</body>

The wave element should not be present

Show
Alan Williams added a comment - 2009-08-13 14:34 This has also been reported by the user Simon Felix. For the WSDL location http://virtualsolar.org/VSO/VSOi the following body is created: <body xmlns="http://virtualsolar.org/VSO/VSOi"> <version xmlns=""></version> <block xmlns=""> <provider /> <source /> <instrument /> <physobs /> <time /> <wave /> <extent /> <field /> </block> </body> The wave element should not be present
Hide
Alan Williams added a comment - 2009-09-11 14:57

This is annoying, but it can be patched later and should not delay 2.1

Show
Alan Williams added a comment - 2009-09-11 14:57 This is annoying, but it can be patched later and should not delay 2.1
Hide
Hudson Daemon added a comment - 2010-04-29 15:55

Integrated in net.sf.taverna.wsdl-generic #376
support optional/nillable
support optional/nillable
support optional/nillable

Show
Hudson Daemon added a comment - 2010-04-29 15:55 Integrated in net.sf.taverna.wsdl-generic #376 support optional/nillable support optional/nillable support optional/nillable
Hide
Hudson Daemon added a comment - 2010-04-29 16:42

Integrated in net.sf.taverna.t2.activities #959
use newer wsdl-generic (but everything stays at 1.1-SNAPSHOT)

Show
Hudson Daemon added a comment - 2010-04-29 16:42 Integrated in net.sf.taverna.t2.activities #959 use newer wsdl-generic (but everything stays at 1.1-SNAPSHOT)
Hide
Stian Soiland-Reyes added a comment - 2010-04-30 11:11

Fixed so that optional (minoccurs=0) elements are skipped if no input is provided by Taverna (ie. port not connected).

If port is not connected and minOccurs is 1 or higher, but xsi:nillable is true, then the xsi:nil attribute will be sent instead.

To force sending of the xsi:nil attribute, use the magic string xsi:nil as a string constant on an input port.

Also see the method TestNulls in http://rpc466.cs.man.ac.uk:8080/ondex/services/ONDEXapiWS?wsdl - this should return "null null null".

Show
Stian Soiland-Reyes added a comment - 2010-04-30 11:11 Fixed so that optional (minoccurs=0) elements are skipped if no input is provided by Taverna (ie. port not connected). If port is not connected and minOccurs is 1 or higher, but xsi:nillable is true, then the xsi:nil attribute will be sent instead. To force sending of the xsi:nil attribute, use the magic string xsi:nil as a string constant on an input port. Also see the method TestNulls in http://rpc466.cs.man.ac.uk:8080/ondex/services/ONDEXapiWS?wsdl - this should return "null null null".
Hide
Alan Williams added a comment - 2010-06-09 15:24

Assigned for testing

Show
Alan Williams added a comment - 2010-06-09 15:24 Assigned for testing
Hide
Alan Williams added a comment - 2010-07-05 17:24

Partially confirmed so closed

Show
Alan Williams added a comment - 2010-07-05 17:24 Partially confirmed so closed

People

Vote (0)
Watch (0)

Dates

  • Created:
    2009-08-05 11:36
    Updated:
    2010-07-05 17:24
    Resolved:
    2010-04-30 11:11

Time Tracking

Estimated:
Not Specified
Original Estimate - Not Specified
Remaining:
0m
Remaining Estimate - 0 minutes
Logged:
2h
Time Spent - 2 hours