You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by seriousme <se...@orange.fr> on 2008/08/21 21:10:22 UTC

Strange error : SOAP body does not contain expected part wrapper: service

Hi,
first of all thanks for the job you do developing Apache ODE, that's a
really great product.
But, trying to make a very simple service invocation this error is raised by
Apache ODE :

"ERROR - GeronimoLog.error(108) | Unable to process response: SOAP body does
not contain expected part wrapper: service {http://services}prefixer port
prefixerOperations wrapper prefixResponse
org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
wrapper: service {http://services}prefixer port prefixerOperations wrapper
prefixResponse
        at
org.apache.ode.axis2.util.SoapMessageConverter.extractSoapBodyParts(SoapMessageConverter.java:361)
        at
org.apache.ode.axis2.util.SoapMessageConverter.parseSoapResponse(SoapMessageConverter.java:325)
        at
org.apache.ode.axis2.SoapExternalService$4.call(SoapExternalService.java:356)
        at
org.apache.ode.axis2.SoapExternalService$4.call(SoapExternalService.java:329)
        at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:174)
        at
org.apache.ode.scheduler.simple.SimpleScheduler$1.call(SimpleScheduler.java:155)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: SOAP body does not contain
expected part wrapper: service {http://services}prefixer port
prefixerOperations wrapper prefixResponse
        at
org.apache.ode.utils.wsdl.Messages.msgSoapBodyDoesNotContainExpectedPartWrapper(Messages.java:147)
        ... 11 more"

The process is deployed without any errors.

It uses "literal" and not "encoded" following this thread advices :
http://markmail.org/message/57a56b562eazgxul#query:SOAP%20body%20does%20not%20contain%20%22expected%20part%20wrapper%22+page:1+mid:ntmxs2ghfihqr24k+state:results

Moreover the invocation "works" :
when calling the process via
"http://localhost:8080/ode/processes/framer/frames?innerString=foo&outerString=bar",
the result of the invocation of the "prefixService" by Apache ODE returns :
"<?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:prefixResponse><resultString>barfoo</resultString></SOAP-ENV:prefixResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"

so the result "foobar" is good.

But how to make Apache ODE aware of this result ?

Thanks by advance for your help.

All the documents used for this process are in the attached "documents.txt"
file.

http://www.nabble.com/file/p19024188/documents.txt documents.txt 
-- 
View this message in context: http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19024188.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by seriousme <se...@orange.fr>.
Thanks a lot, that was exactly the problem.

It was not at all an Apache ODE issue, really sorry for the trouble.

By using the right namespaces all is going well.

Again thanks and keep on the good job.
-- 
View this message in context: http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19117109.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by Alex Boisvert <bo...@intalio.com>.
On Thu, Aug 21, 2008 at 12:10 PM, seriousme <se...@orange.fr> wrote:

> the result of the invocation of the "prefixService" by Apache ODE returns :
> "<?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> "><SOAP-ENV:Body><SOAP-ENV:prefixResponse><resultString>barfoo</resultString></SOAP-ENV:prefixResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"


The namespace is wrong on the "prefixResponse" element.  It should be "
http://services", not the SOAP namespace.

alex

Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by Alex Boisvert <bo...@intalio.com>.
On Fri, Aug 22, 2008 at 7:33 AM, Matthieu Riou <ma...@offthelip.org>wrote:

> On Fri, Aug 22, 2008 at 7:25 AM, srm13 <sr...@le.ac.uk> wrote:
>
> >
> > Thanks, sticking to WS-Interop seems sensible. However, then the question
> > arises how such a service can be consumed? Is there a standard way of
> > wrapping them so that they provide data in the right format?
> >
>
> Normally any rpc/enc service can be converted to doc/lit by tweaking its
> WSDL. You basically need to change the invocation style and provide the
> right element types for the operation.


Hmmm.  I think you meant RPC/Lit can be converted to Doc/Lit.

There's little hope for RPC/Encoded.   Most WS stacks have abandoned it.

alex

Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by Matthieu Riou <ma...@offthelip.org>.
On Fri, Aug 22, 2008 at 7:25 AM, srm13 <sr...@le.ac.uk> wrote:

>
> Thanks, sticking to WS-Interop seems sensible. However, then the question
> arises how such a service can be consumed? Is there a standard way of
> wrapping them so that they provide data in the right format?
>

Normally any rpc/enc service can be converted to doc/lit by tweaking its
WSDL. You basically need to change the invocation style and provide the
right element types for the operation.

Matthieu


>
> It is not an issue with this Calendar service, as I can rewrite that, but
> this was only a trial to see how I can use the technology to access
> existing
> services which might be RPC encoded.
>
> thanks,
> Stephan
>
>
> Matthieu Riou-5 wrote:
> >
> > On Fri, Aug 22, 2008 at 6:13 AM, srm13 <sr...@le.ac.uk> wrote:
> >
> >>
> >> > But, trying to make a very simple service invocation this error is
> >> raised
> >> by Apache ODE :
> >>
> >> > "ERROR - GeronimoLog.error(108) | Unable to process response: SOAP
> body
> >> > does not contain expected
> >> > part wrapper: service {http://services}prefixer port
> prefixerOperations
> >> > wrapper prefixResponse
> >> > org.apache.ode.axis2.OdeFault: SOAP body does not contain expected
> part
> >> > wrapper: service
> >> > {http://services}prefixer port prefixerOperations wrapper
> >> prefixResponse
> >>
> >> I am encountering the same issue with a Calculator service (the service
> >> is
> >> a
> >> .jws file). The service can be invoked directly and returns the expected
> >> value, but when invoked through the process I get the error. Comparing
> >> the
> >> code submitted and mine, I think both services use RPC encoding for
> >> communication.
> >>
> >
> > ODE doesn't support encoding, only doc/lit and rpc/lit are supported. We
> > actually try to stick to WS-BasicProfile (aka WS-Interoperability) that
> > doesn't support encoding either.
> >
> > Matthieu
> >
> >
> >>
> >> I am really stuck here, so a quick answer would be good.
> >>
> >> best Stephan
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19107016.html
> >> Sent from the Apache Ode User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19108330.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by srm13 <sr...@le.ac.uk>.
Thanks, sticking to WS-Interop seems sensible. However, then the question
arises how such a service can be consumed? Is there a standard way of
wrapping them so that they provide data in the right format?

It is not an issue with this Calendar service, as I can rewrite that, but
this was only a trial to see how I can use the technology to access existing
services which might be RPC encoded.

thanks,
Stephan


Matthieu Riou-5 wrote:
> 
> On Fri, Aug 22, 2008 at 6:13 AM, srm13 <sr...@le.ac.uk> wrote:
> 
>>
>> > But, trying to make a very simple service invocation this error is
>> raised
>> by Apache ODE :
>>
>> > "ERROR - GeronimoLog.error(108) | Unable to process response: SOAP body
>> > does not contain expected
>> > part wrapper: service {http://services}prefixer port prefixerOperations
>> > wrapper prefixResponse
>> > org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
>> > wrapper: service
>> > {http://services}prefixer port prefixerOperations wrapper
>> prefixResponse
>>
>> I am encountering the same issue with a Calculator service (the service
>> is
>> a
>> .jws file). The service can be invoked directly and returns the expected
>> value, but when invoked through the process I get the error. Comparing
>> the
>> code submitted and mine, I think both services use RPC encoding for
>> communication.
>>
> 
> ODE doesn't support encoding, only doc/lit and rpc/lit are supported. We
> actually try to stick to WS-BasicProfile (aka WS-Interoperability) that
> doesn't support encoding either.
> 
> Matthieu
> 
> 
>>
>> I am really stuck here, so a quick answer would be good.
>>
>> best Stephan
>> --
>> View this message in context:
>> http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19107016.html
>> Sent from the Apache Ode User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19108330.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by seriousme <se...@orange.fr>.
Thanks for your answer, but isn't the "prefixer" service rpc/literal ?

What more than this description :
"<wsdl:binding name="prefixSoapBinding" type="tns:prefixerPortType">
		<soap:binding style="rpc" />
		<wsdl:operation name="prefix">
			<soap:operation soapAction="" style="rpc" />
			<wsdl:input>
				<soap:body use="literal" namespace="http://services" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" namespace="http://services" />
			</wsdl:output>
		</wsdl:operation>
</wsdl:binding>"
is needed to get it be WS-BasicProfile compliant ?

Thanks by advance.
-- 
View this message in context: http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19108854.html
Sent from the Apache Ode User mailing list archive at Nabble.com.


Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by Matthieu Riou <ma...@offthelip.org>.
On Fri, Aug 22, 2008 at 6:13 AM, srm13 <sr...@le.ac.uk> wrote:

>
> > But, trying to make a very simple service invocation this error is raised
> by Apache ODE :
>
> > "ERROR - GeronimoLog.error(108) | Unable to process response: SOAP body
> > does not contain expected
> > part wrapper: service {http://services}prefixer port prefixerOperations
> > wrapper prefixResponse
> > org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
> > wrapper: service
> > {http://services}prefixer port prefixerOperations wrapper prefixResponse
>
> I am encountering the same issue with a Calculator service (the service is
> a
> .jws file). The service can be invoked directly and returns the expected
> value, but when invoked through the process I get the error. Comparing the
> code submitted and mine, I think both services use RPC encoding for
> communication.
>

ODE doesn't support encoding, only doc/lit and rpc/lit are supported. We
actually try to stick to WS-BasicProfile (aka WS-Interoperability) that
doesn't support encoding either.

Matthieu


>
> I am really stuck here, so a quick answer would be good.
>
> best Stephan
> --
> View this message in context:
> http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19107016.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Re: Strange error : SOAP body does not contain expected part wrapper: service

Posted by srm13 <sr...@le.ac.uk>.
> But, trying to make a very simple service invocation this error is raised
by Apache ODE :

> "ERROR - GeronimoLog.error(108) | Unable to process response: SOAP body
> does not contain expected 
> part wrapper: service {http://services}prefixer port prefixerOperations
> wrapper prefixResponse
> org.apache.ode.axis2.OdeFault: SOAP body does not contain expected part
> wrapper: service 
> {http://services}prefixer port prefixerOperations wrapper prefixResponse

I am encountering the same issue with a Calculator service (the service is a
.jws file). The service can be invoked directly and returns the expected
value, but when invoked through the process I get the error. Comparing the
code submitted and mine, I think both services use RPC encoding for
communication.

I am really stuck here, so a quick answer would be good.

best Stephan
-- 
View this message in context: http://www.nabble.com/Strange-error-%3A-SOAP-body-does-not-contain-expected-part-wrapper%3A-service-tp19024188p19107016.html
Sent from the Apache Ode User mailing list archive at Nabble.com.