New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAP 1.1 body is not parsed correctly when binding use is literal, style is rpc, and message uses type #260

Closed
romainreuillon opened this Issue Jun 8, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@romainreuillon
Contributor

romainreuillon commented Jun 8, 2014

Hello,

I get this error from the parser:

[error] (run-main-0) scalaxb.ParserFailure: Error while parsing <Body xmlns:glitejsdlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:glitenstypes="http://glite.org/wms/wmproxy" xmlns:jsdl-posix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" xmlns:tns="http://www.gridsite.org/namespaces/delegation-2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns1:jobRegisterResponse xmlns:ns1="http://glite.org/wms/wmproxy" xmlns:delegationns="http://www.gridsite.org/namespaces/delegation-2" xmlns:delegation1="http://www.gridsite.org/namespaces/delegation-1" xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl" xmlns:jsdlposix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns=""><jobIdStruct><id>https://lb01.athena.hellasgrid.gr:9000/iOSz2BhRB-pddGQbYXEq7w</id><name/><path>SandboxDir/iO/https_3a_2f_2flb01.athena.hellasgrid.gr_3a9000_2fiOSz2BhRB-pddGQbYXEq7w/input</path></jobIdStruct></ns1:jobRegisterResponse></Body>: parser error "`id' expected but {http://glite.org/wms/wmproxy}jobRegisterResponse found" while parsing /Body/{http://glite.org/wms/wmproxy}jobRegisterResponse

The associated wsdl looks like:

    <wsdl:message name="jobRegisterResponse">
        <wsdl:part name="jobIdStruct" type="glitenstypes:JobIdStructType"/>
    </wsdl:message>

<wsdl:operation name="jobRegister" parameterOrder="jdl delegationId">
            <wsdl:documentation>
                    This operation registers a job for submission. The JDL description of the job provided by the client is first validated by the service and then registered to the LB.
                    The unique identifier assigned to the job is returned to the client. Note that this operation only registers the job and assign it with an identifier.
                    The actual submission of the job has to be triggered by a call to the jobStart operation after all preparation activities, such as the Input sandbox files upload, have been completed.
                    The service supports registration of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs;
                    the description is always provided through a single JDL description (see "GLite JDL Attributes" document for details).
                    When a clients requests for registration of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs),
                    the operations returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs.

                    Input: string containing the job jdl representation.
                    Input: string containing the Id of the delegated proxy associated to the job.

                    Output: string containing the unique jobId assigned to the job.

                    Faults:
                    AuthenticationFault:        a generic authentication problem occured.
                    AuthorizationFault:         client is not authorized to perform this operation.
                    InvalidArgumentFault:   the provided job JDL expression is not valid.
                    GenericFault:           another problem occured. 

            </wsdl:documentation>
            <wsdl:input name="jobRegisterRequest" message="glitens:jobRegisterRequest"/>
            <wsdl:output name="jobRegisterResponse" message="glitens:jobRegisterResponse"/>
            <wsdl:fault name="AuthenticationFault" message="glitens:AuthenticationFault"/>
            <wsdl:fault name="InvalidArgumentFault" message="glitens:InvalidArgumentFault"/>
            <wsdl:fault name="GenericFault" message="glitens:GenericFault"/>
            <wsdl:fault name="AuthorizationFault" message="glitens:AuthorizationFault"/>
            <wsdl:fault name="ServerOverloadedFault" message="glitens:ServerOverloadedFault"/>
        </wsdl:operation>

Any idea what goes wrong?

Cheers,
Romain

@eed3si9n eed3si9n added the duplicate label Jun 8, 2014

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Jun 8, 2014

Owner

scalaxb seems to have problem with wsdl:documentation tag. The current workaround is to remove it from wsdl. See #248.

Owner

eed3si9n commented Jun 8, 2014

scalaxb seems to have problem with wsdl:documentation tag. The current workaround is to remove it from wsdl. See #248.

@eed3si9n eed3si9n closed this Jun 8, 2014

@romainreuillon

This comment has been minimized.

Show comment
Hide comment
@romainreuillon

romainreuillon Jun 8, 2014

Contributor

It doesn't seem to be the same issue, I removed the doc and I get the same answer.

Contributor

romainreuillon commented Jun 8, 2014

It doesn't seem to be the same issue, I removed the doc and I get the same answer.

@eed3si9n eed3si9n reopened this Jun 8, 2014

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Jun 8, 2014

Owner

You're right. The error message says:

 [error] (run-main-0) scalaxb.ParserFailure: Error while parsing
<Body xmlns:glitejsdlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" 
  xmlns:glitenstypes="http://glite.org/wms/wmproxy"
  xmlns:jsdl-posix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" 
  xmlns:tns="http://www.gridsite.org/namespaces/delegation-2" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:jobRegisterResponse xmlns:ns1="http://glite.org/wms/wmproxy"
  xmlns:delegationns="http://www.gridsite.org/namespaces/delegation-2"
   xmlns:delegation1="http://www.gridsite.org/namespaces/delegation-1"
   xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
   xmlns:jsdlposix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns="">
<jobIdStruct>
<id>https://lb01.athena.hellasgrid.gr:9000/iOSz2BhRB-pddGQbYXEq7w</id>
<name/>
<path>SandboxDir/iO/https_3a_2f_2flb01.athena.hellasgrid.gr_3a9000_2fiOSz2BhRB-pddGQbYXEq7w/input</path>
</jobIdStruct>
</ns1:jobRegisterResponse>
</Body>
parser error "`id' expected but {http://glite.org/wms/wmproxy}jobRegisterResponse found" while parsing /Body/{http://glite.org/wms/wmproxy}jobRegisterResponse
Owner

eed3si9n commented Jun 8, 2014

You're right. The error message says:

 [error] (run-main-0) scalaxb.ParserFailure: Error while parsing
<Body xmlns:glitejsdlns="http://schemas.ggf.org/jsdl/2005/11/jsdl" 
  xmlns:glitenstypes="http://glite.org/wms/wmproxy"
  xmlns:jsdl-posix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix" 
  xmlns:tns="http://www.gridsite.org/namespaces/delegation-2" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:jobRegisterResponse xmlns:ns1="http://glite.org/wms/wmproxy"
  xmlns:delegationns="http://www.gridsite.org/namespaces/delegation-2"
   xmlns:delegation1="http://www.gridsite.org/namespaces/delegation-1"
   xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
   xmlns:jsdlposix="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns="">
<jobIdStruct>
<id>https://lb01.athena.hellasgrid.gr:9000/iOSz2BhRB-pddGQbYXEq7w</id>
<name/>
<path>SandboxDir/iO/https_3a_2f_2flb01.athena.hellasgrid.gr_3a9000_2fiOSz2BhRB-pddGQbYXEq7w/input</path>
</jobIdStruct>
</ns1:jobRegisterResponse>
</Body>
parser error "`id' expected but {http://glite.org/wms/wmproxy}jobRegisterResponse found" while parsing /Body/{http://glite.org/wms/wmproxy}jobRegisterResponse

@eed3si9n eed3si9n added bug and removed duplicate labels Jun 8, 2014

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Jun 8, 2014

Owner

https://github.com/italiangrid/org.glite.wms/blob/master/org.glite.wms.interface/src/server/WMProxy.wsdl#L1457:

    <!-- ==== Binding definition ==== -->
    <wsdl:binding name="WMProxy" type="glitens:WMProxy_PortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
....
        <wsdl:operation name="jobRegister">
            <wsdl:input>
                <soap:body use="literal" namespace="http://glite.org/wms/wmproxy"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" namespace="http://glite.org/wms/wmproxy"/>
            </wsdl:output>
            <wsdl:fault name="AuthenticationFault">
                <soap:fault name="AuthenticationFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="AuthorizationFault">
                <soap:fault name="AuthorizationFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="InvalidArgumentFault">
                <soap:fault name="InvalidArgumentFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="GenericFault">
                <soap:fault name="GenericFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="ServerOverloadedFault">
                <soap:fault name="ServerOverloadedFault" use="literal"/>
            </wsdl:fault>
        </wsdl:operation>

http://www.w3.org/TR/wsdl#_soap:body:

If use is literal, then each part references a concrete schema definition using either the element or type attribute. In the first case, [snip]. In the second, the type referenced by the part becomes the schema type of the enclosing element (Body for document style or part accessor element for rpc style).

Owner

eed3si9n commented Jun 8, 2014

https://github.com/italiangrid/org.glite.wms/blob/master/org.glite.wms.interface/src/server/WMProxy.wsdl#L1457:

    <!-- ==== Binding definition ==== -->
    <wsdl:binding name="WMProxy" type="glitens:WMProxy_PortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
....
        <wsdl:operation name="jobRegister">
            <wsdl:input>
                <soap:body use="literal" namespace="http://glite.org/wms/wmproxy"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" namespace="http://glite.org/wms/wmproxy"/>
            </wsdl:output>
            <wsdl:fault name="AuthenticationFault">
                <soap:fault name="AuthenticationFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="AuthorizationFault">
                <soap:fault name="AuthorizationFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="InvalidArgumentFault">
                <soap:fault name="InvalidArgumentFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="GenericFault">
                <soap:fault name="GenericFault" use="literal"/>
            </wsdl:fault>
            <wsdl:fault name="ServerOverloadedFault">
                <soap:fault name="ServerOverloadedFault" use="literal"/>
            </wsdl:fault>
        </wsdl:operation>

http://www.w3.org/TR/wsdl#_soap:body:

If use is literal, then each part references a concrete schema definition using either the element or type attribute. In the first case, [snip]. In the second, the type referenced by the part becomes the schema type of the enclosing element (Body for document style or part accessor element for rpc style).

@eed3si9n eed3si9n changed the title from Problem while parsing to SOAP 1.1 body is not parsed correctly when binding use is literal, style is rpc, and message uses type Jun 8, 2014

@eed3si9n eed3si9n removed the duplicate label Jun 8, 2014

@eed3si9n eed3si9n added this to the 1.2.0 milestone Jun 8, 2014

@eed3si9n eed3si9n self-assigned this Jun 8, 2014

@eed3si9n eed3si9n closed this in 41a6859 Jun 9, 2014

@eed3si9n

This comment has been minimized.

Show comment
Hide comment
@eed3si9n

eed3si9n Jun 9, 2014

Owner

Could you try 1.2.0-SNAPSHOT and see if the problem is sill there?

Owner

eed3si9n commented Jun 9, 2014

Could you try 1.2.0-SNAPSHOT and see if the problem is sill there?

@romainreuillon

This comment has been minimized.

Show comment
Hide comment
@romainreuillon

romainreuillon Jun 9, 2014

Contributor

It seems to work, thx! I'll test that further today.

Contributor

romainreuillon commented Jun 9, 2014

It seems to work, thx! I'll test that further today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment