Re: Href attribute support in soap envelope body
Ok, I am now sure that I use wrapped/doc/lit on both sides, I have removed the @SOAPBinding on the Java side and the mentioned RegisterInvokeOptions call instructs Delphi to use document-literal style and the types for input and output values have not been unwound to create a method call (from the Delphi doc). But the Web service call from Delphi always produces null values as incoming parameters in my Java Web service, without any exceptions or warnings on the CXF side. This is the request that Delphi sends now: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName JobParamsIn stringvalueDelphi1/string stringvalueDelphi2/string /JobParamsIn JobParamBean keykeyDelphi/key value2/value /JobParamBean /ExecuteJob /SOAP-ENV:Body /SOAP-ENV:Envelope The Java client (which still works correctly) sends the following request: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsInvalueJava1/JobParamsIn JobParamsInvalueJava2/JobParamsIn JobParamBean keykeyJava/key value1/value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope As there are some minor differences, is the request from Delphi incorrect / incompatible? If so, I will perhaps continue to investigate the issue on a Delphi forum resp. send a bug report to Codegear. Thanks in advance. Pierre Daniel Kulp wrote: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray Umm... why would the string and stringArray things be in the SOAP-ENV namespace? That DEFINITELY looks bad. Looks like some more Delphi configuration is needed somehow. That said, you should definitely use a wrapped/doc/lit, not bare. So the message should look something like; SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ns1:executeJob xmlns:ns1=.. JobNameTestFromDelphi/JobName /ns1:executeJob /SOAP-ENV:Body /SOAP-ENV:Envelope Dan On Monday 25 February 2008, pierre post wrote: Thanks for pointing me in the right direction, Ian. I also suspected that it's an encoding problem but I wasn't sure. Unfortunately, after some more trialerror tests, I didn't come to a positive result. Removing the @SOAPBinding i.e. using wrapped document/literal/wrapped generates a far more complex Delphi unit (that would be the least of the problems) but furthermore, now no parameters at all are correctly received in the Java Web service (only null values). I looked up the Delphi documentation and after a little research added the line InvRegistry.RegisterInvokeOptions(TypeInfo(JobService), [ioDocument, ioLiteral]); in my Delphi client, so Delphi *should* definitively use document/literal encoding. But no change. But, if I use the document/literal/bare encoding, I receive the following error message from CXF: 25-Feb-2008 11:05:07 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Message part {http://schemas.xmlsoap.org/soap/envelope/}string was not recognized. at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLi teralInInterceptor.java:178) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto rChain.java:208) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia tionObserver.java:77) ... Delphi sends the following SOAP request: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray stringvalueDelphi1/string stringvalueDelphi2/string /SOAP-ENV:stringArray JobParamBean xmlns=http://annuaire.ciss.lu; keykeyDelphi/key value2/value /JobParamBean /SOAP-ENV:Body /SOAP-ENV:Envelope This whole encoding issue is getting rather frustrating for me, having in mind Web services should improve
Re: Href attribute support in soap envelope body
Yes, they are incompatible, but we're definitely getting someplace... :-) SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName compared to: soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName In the second case, JobName is unqualifed in that it doesn't have a namespace associated with it. Delphi is sending it out with the default namespace set so that JobName is qualified. There are two ways to approach how to get it working for you: 1) Research more in Delphi to figure out how to get it to send unqualified requests.Note: the ExecuteJob element SHOULD be qualified, but the children shouldn't. 2) Change the CXF server to expect it to be qualified. With 2.0.4, #2 isn't very hard. In the packages where your service is defined and where your java beans are defined, add a package-info.java that contains something like: @javax.xml.bind.annotation.XmlSchema( namespace = http://annuaire.ciss.lu;, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package lu.ciss.annuaire; That should flip CXF to using qualified schemas. Dan On Tuesday 26 February 2008, pierre post wrote: Ok, I am now sure that I use wrapped/doc/lit on both sides, I have removed the @SOAPBinding on the Java side and the mentioned RegisterInvokeOptions call instructs Delphi to use document-literal style and the types for input and output values have not been unwound to create a method call (from the Delphi doc). But the Web service call from Delphi always produces null values as incoming parameters in my Java Web service, without any exceptions or warnings on the CXF side. This is the request that Delphi sends now: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName JobParamsIn stringvalueDelphi1/string stringvalueDelphi2/string /JobParamsIn JobParamBean keykeyDelphi/key value2/value /JobParamBean /ExecuteJob /SOAP-ENV:Body /SOAP-ENV:Envelope The Java client (which still works correctly) sends the following request: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsInvalueJava1/JobParamsIn JobParamsInvalueJava2/JobParamsIn JobParamBean keykeyJava/key value1/value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope As there are some minor differences, is the request from Delphi incorrect / incompatible? If so, I will perhaps continue to investigate the issue on a Delphi forum resp. send a bug report to Codegear. Thanks in advance. Pierre Daniel Kulp wrote: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray Umm... why would the string and stringArray things be in the SOAP-ENV namespace? That DEFINITELY looks bad. Looks like some more Delphi configuration is needed somehow. That said, you should definitely use a wrapped/doc/lit, not bare. So the message should look something like; SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ns1:executeJob xmlns:ns1=.. JobNameTestFromDelphi/JobName /ns1:executeJob /SOAP-ENV:Body /SOAP-ENV:Envelope Dan On Monday 25 February 2008, pierre post wrote: Thanks for pointing me in the right direction, Ian. I also suspected that it's an encoding problem but I wasn't sure. Unfortunately, after some more trialerror tests, I didn't come to a positive result. Removing the @SOAPBinding i.e. using wrapped document/literal/wrapped generates a far more complex Delphi unit (that would be the least of the problems) but furthermore, now no parameters at all are correctly received in the Java Web service (only null values). I looked up the Delphi documentation and after a little research added the line InvRegistry.RegisterInvokeOptions(TypeInfo(JobService), [ioDocument, ioLiteral]); in my Delphi client, so Delphi *should* definitively use
Re: Href attribute support in soap envelope body
Thank you so much Dan, solution 2) works like a charm ... except that the string array (second parameter) is still not correctly received. Just to be sure that I understand the problem, Delphi uses imbricated string nodes to describe the elements of the array, but Java uses multiple JobParamsIn nodes (as you can see in my previous posting). If we look at the schema type definition in the WSDL xs:element maxOccurs=unbounded minOccurs=0 name=JobParamsIn type=xs:string/ it is Delphi that has incorrectly serialized the parameter and created an invalid SOAP request that would not pass validation which is disabled by default, right? Pierre Daniel Kulp wrote: Yes, they are incompatible, but we're definitely getting someplace... :-) SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName compared to: soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName In the second case, JobName is unqualifed in that it doesn't have a namespace associated with it. Delphi is sending it out with the default namespace set so that JobName is qualified. There are two ways to approach how to get it working for you: 1) Research more in Delphi to figure out how to get it to send unqualified requests.Note: the ExecuteJob element SHOULD be qualified, but the children shouldn't. 2) Change the CXF server to expect it to be qualified. With 2.0.4, #2 isn't very hard. In the packages where your service is defined and where your java beans are defined, add a package-info.java that contains something like: @javax.xml.bind.annotation.XmlSchema( namespace = http://annuaire.ciss.lu;, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package lu.ciss.annuaire; That should flip CXF to using qualified schemas. Dan On Tuesday 26 February 2008, pierre post wrote: Ok, I am now sure that I use wrapped/doc/lit on both sides, I have removed the @SOAPBinding on the Java side and the mentioned RegisterInvokeOptions call instructs Delphi to use document-literal style and the types for input and output values have not been unwound to create a method call (from the Delphi doc). But the Web service call from Delphi always produces null values as incoming parameters in my Java Web service, without any exceptions or warnings on the CXF side. This is the request that Delphi sends now: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName JobParamsIn stringvalueDelphi1/string stringvalueDelphi2/string /JobParamsIn JobParamBean keykeyDelphi/key value2/value /JobParamBean /ExecuteJob /SOAP-ENV:Body /SOAP-ENV:Envelope The Java client (which still works correctly) sends the following request: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsInvalueJava1/JobParamsIn JobParamsInvalueJava2/JobParamsIn JobParamBean keykeyJava/key value1/value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope As there are some minor differences, is the request from Delphi incorrect / incompatible? If so, I will perhaps continue to investigate the issue on a Delphi forum resp. send a bug report to Codegear. Thanks in advance. Pierre Daniel Kulp wrote: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray Umm... why would the string and stringArray things be in the SOAP-ENV namespace? That DEFINITELY looks bad. Looks like some more Delphi configuration is needed somehow. That said, you should definitely use a wrapped/doc/lit, not bare. So the message should look something like; SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ns1:executeJob xmlns:ns1=.. JobNameTestFromDelphi/JobName /ns1:executeJob /SOAP-ENV:Body /SOAP-ENV:Envelope Dan On Monday 25 February 2008, pierre post wrote: Thanks for pointing me in the right direction, Ian. I also suspected that it's an encoding problem but I
Re: Href attribute support in soap envelope body
On Tuesday 26 February 2008, pierre post wrote: Thank you so much Dan, solution 2) works like a charm ... except that the string array (second parameter) is still not correctly received. Just to be sure that I understand the problem, Delphi uses imbricated string nodes to describe the elements of the array, but Java uses multiple JobParamsIn nodes (as you can see in my previous posting). If we look at the schema type definition in the WSDL xs:element maxOccurs=unbounded minOccurs=0 name=JobParamsIn type=xs:string/ it is Delphi that has incorrectly serialized the parameter and created an invalid SOAP request that would not pass validation which is disabled by default, right? Correct. That's definitely a Delphi issue as the soap message definitely does not match the schema.You will probably need to follow up with them to figure out how to get that to work properly. Dan Pierre Daniel Kulp wrote: Yes, they are incompatible, but we're definitely getting someplace... :-) SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName compared to: soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName In the second case, JobName is unqualifed in that it doesn't have a namespace associated with it. Delphi is sending it out with the default namespace set so that JobName is qualified. There are two ways to approach how to get it working for you: 1) Research more in Delphi to figure out how to get it to send unqualified requests.Note: the ExecuteJob element SHOULD be qualified, but the children shouldn't. 2) Change the CXF server to expect it to be qualified. With 2.0.4, #2 isn't very hard. In the packages where your service is defined and where your java beans are defined, add a package-info.java that contains something like: @javax.xml.bind.annotation.XmlSchema( namespace = http://annuaire.ciss.lu;, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package lu.ciss.annuaire; That should flip CXF to using qualified schemas. Dan On Tuesday 26 February 2008, pierre post wrote: Ok, I am now sure that I use wrapped/doc/lit on both sides, I have removed the @SOAPBinding on the Java side and the mentioned RegisterInvokeOptions call instructs Delphi to use document-literal style and the types for input and output values have not been unwound to create a method call (from the Delphi doc). But the Web service call from Delphi always produces null values as incoming parameters in my Java Web service, without any exceptions or warnings on the CXF side. This is the request that Delphi sends now: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ExecuteJob xmlns=http://annuaire.ciss.lu; JobNameTestFromDelphi/JobName JobParamsIn stringvalueDelphi1/string stringvalueDelphi2/string /JobParamsIn JobParamBean keykeyDelphi/key value2/value /JobParamBean /ExecuteJob /SOAP-ENV:Body /SOAP-ENV:Envelope The Java client (which still works correctly) sends the following request: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsInvalueJava1/JobParamsIn JobParamsInvalueJava2/JobParamsIn JobParamBean keykeyJava/key value1/value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope As there are some minor differences, is the request from Delphi incorrect / incompatible? If so, I will perhaps continue to investigate the issue on a Delphi forum resp. send a bug report to Codegear. Thanks in advance. Pierre Daniel Kulp wrote: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray Umm... why would the string and stringArray things be in the SOAP-ENV namespace? That DEFINITELY looks bad. Looks like some more Delphi configuration is needed somehow. That said, you should definitely use a wrapped/doc/lit, not bare. So the message should look something like; SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema;
Re: Href attribute support in soap envelope body
Thanks for pointing me in the right direction, Ian. I also suspected that it's an encoding problem but I wasn't sure. Unfortunately, after some more trialerror tests, I didn't come to a positive result. Removing the @SOAPBinding i.e. using wrapped document/literal/wrapped generates a far more complex Delphi unit (that would be the least of the problems) but furthermore, now no parameters at all are correctly received in the Java Web service (only null values). I looked up the Delphi documentation and after a little research added the line InvRegistry.RegisterInvokeOptions(TypeInfo(JobService), [ioDocument, ioLiteral]); in my Delphi client, so Delphi *should* definitively use document/literal encoding. But no change. But, if I use the document/literal/bare encoding, I receive the following error message from CXF: 25-Feb-2008 11:05:07 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Message part {http://schemas.xmlsoap.org/soap/envelope/}string was not recognized. at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:178) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77) ... Delphi sends the following SOAP request: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray stringvalueDelphi1/string stringvalueDelphi2/string /SOAP-ENV:stringArray JobParamBean xmlns=http://annuaire.ciss.lu; keykeyDelphi/key value2/value /JobParamBean /SOAP-ENV:Body /SOAP-ENV:Envelope This whole encoding issue is getting rather frustrating for me, having in mind Web services should improve interoperability ... :-( Pierre Ian Roberts wrote: The Delphi client is trying to use SOAP encoding (RPC/encoded) but the CXF service expects RPC/literal. I don't know Delphi, is there any configuration option to tell it to use literal rather than encoded? Or if Delphi can't do RPC/literal, try removing the @SOAPBinding annotation from your service to make it use wrapped document/literal and see if Delphi likes that any better. Ian pierre post wrote: Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request produces null as JobParamBean parameter: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 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/; SOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:NS2=http://annuaire.ciss.lu; NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu; JobName xsi:type=xsd:stringTestFromDelphi/JobName JobParamsIn xsi:type=SOAP-ENC:Array SOAP-ENC:arrayType=xsd:string[2] itemvalueDelphi1/item itemvalueDelphi2/item /JobParamsIn JobParamBean href=#1 / /NS1:ExecuteJob NS2:JobServiceParamType id=1 xsi:type=NS2:JobServiceParamType key xsi:type=xsd:stringparamkey/key value xsi:type=xsd:stringparamval/value /NS2:JobServiceParamType /SOAP-ENV:Body /SOAP-ENV:Envelope I tried to call the same web service from Java (also using Apache CXF 2.0.4) and the generated SOAP request correctly creates a JobParamBean instance: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob
Re: Href attribute support in soap envelope body
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray Umm... why would the string and stringArray things be in the SOAP-ENV namespace? That DEFINITELY looks bad. Looks like some more Delphi configuration is needed somehow. That said, you should definitely use a wrapped/doc/lit, not bare. So the message should look something like; SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ns1:executeJob xmlns:ns1=.. JobNameTestFromDelphi/JobName /ns1:executeJob /SOAP-ENV:Body /SOAP-ENV:Envelope Dan On Monday 25 February 2008, pierre post wrote: Thanks for pointing me in the right direction, Ian. I also suspected that it's an encoding problem but I wasn't sure. Unfortunately, after some more trialerror tests, I didn't come to a positive result. Removing the @SOAPBinding i.e. using wrapped document/literal/wrapped generates a far more complex Delphi unit (that would be the least of the problems) but furthermore, now no parameters at all are correctly received in the Java Web service (only null values). I looked up the Delphi documentation and after a little research added the line InvRegistry.RegisterInvokeOptions(TypeInfo(JobService), [ioDocument, ioLiteral]); in my Delphi client, so Delphi *should* definitively use document/literal encoding. But no change. But, if I use the document/literal/bare encoding, I receive the following error message from CXF: 25-Feb-2008 11:05:07 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Message part {http://schemas.xmlsoap.org/soap/envelope/}string was not recognized. at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLi teralInInterceptor.java:178) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto rChain.java:208) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia tionObserver.java:77) ... Delphi sends the following SOAP request: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body SOAP-ENV:stringTestFromDelphi/SOAP-ENV:string SOAP-ENV:stringArray stringvalueDelphi1/string stringvalueDelphi2/string /SOAP-ENV:stringArray JobParamBean xmlns=http://annuaire.ciss.lu; keykeyDelphi/key value2/value /JobParamBean /SOAP-ENV:Body /SOAP-ENV:Envelope This whole encoding issue is getting rather frustrating for me, having in mind Web services should improve interoperability ... :-( Pierre Ian Roberts wrote: The Delphi client is trying to use SOAP encoding (RPC/encoded) but the CXF service expects RPC/literal. I don't know Delphi, is there any configuration option to tell it to use literal rather than encoded? Or if Delphi can't do RPC/literal, try removing the @SOAPBinding annotation from your service to make it use wrapped document/literal and see if Delphi likes that any better. Ian pierre post wrote: Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request produces null as JobParamBean parameter: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema;
Re: Href attribute support in soap envelope body
Comments below... Am Montag, den 18.02.2008, 11:57 +0100 schrieb pierre post: Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request produces null as JobParamBean parameter: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 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/; SOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:NS2=http://annuaire.ciss.lu; NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu; JobName xsi:type=xsd:stringTestFromDelphi/JobName JobParamsIn xsi:type=SOAP-ENC:Array SOAP-ENC:arrayType=xsd:string[2] itemvalueDelphi1/item itemvalueDelphi2/item /JobParamsIn JobParamBean href=#1 / /NS1:ExecuteJob NS2:JobServiceParamType id=1 xsi:type=NS2:JobServiceParamType key xsi:type=xsd:stringparamkey/key value xsi:type=xsd:stringparamval/value /NS2:JobServiceParamType /SOAP-ENV:Body /SOAP-ENV:Envelope I tried to call the same web service from Java (also using Apache CXF 2.0.4) and the generated SOAP request correctly creates a JobParamBean instance: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsIn itemvalueJava1/item itemvalueJava2/item /JobParamsIn JobParamBean keykeyJava/key value xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns3=http://www.w3.org/2001/XMLSchema; xsi:type=ns3:int 1 /value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope I noticed that the Delphi SOAP request uses a reference for the third parameter (href=#1) but the Java SOAP request does not. Is it possible that CXF doesn't support this kind of references? Yes, quite possible. I've never seen that href structure in a SOAP call and doubt that it is JAX-WS compatible. Is there a workaround in CXF to support the request or perhaps in Delphi to suppress the use of the reference? I would ask on the Delphi lists for this. Delphi appears to be doing something strange here. I don't think Delphi's SOAP client call above would work with the Glassfish Metro web service stack either. Glen
Re: Href attribute support in soap envelope body
The Delphi client is trying to use SOAP encoding (RPC/encoded) but the CXF service expects RPC/literal. I don't know Delphi, is there any configuration option to tell it to use literal rather than encoded? Or if Delphi can't do RPC/literal, try removing the @SOAPBinding annotation from your service to make it use wrapped document/literal and see if Delphi likes that any better. Ian pierre post wrote: Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request produces null as JobParamBean parameter: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 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/; SOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:NS2=http://annuaire.ciss.lu; NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu; JobName xsi:type=xsd:stringTestFromDelphi/JobName JobParamsIn xsi:type=SOAP-ENC:Array SOAP-ENC:arrayType=xsd:string[2] itemvalueDelphi1/item itemvalueDelphi2/item /JobParamsIn JobParamBean href=#1 / /NS1:ExecuteJob NS2:JobServiceParamType id=1 xsi:type=NS2:JobServiceParamType key xsi:type=xsd:stringparamkey/key value xsi:type=xsd:stringparamval/value /NS2:JobServiceParamType /SOAP-ENV:Body /SOAP-ENV:Envelope I tried to call the same web service from Java (also using Apache CXF 2.0.4) and the generated SOAP request correctly creates a JobParamBean instance: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsIn itemvalueJava1/item itemvalueJava2/item /JobParamsIn JobParamBean keykeyJava/key value xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns3=http://www.w3.org/2001/XMLSchema; xsi:type=ns3:int 1 /value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope I noticed that the Delphi SOAP request uses a reference for the third parameter (href=#1) but the Java SOAP request does not. Is it possible that CXF doesn't support this kind of references? Is there a workaround in CXF to support the request or perhaps in Delphi to suppress the use of the reference? Thanks in advance for any comments on this issue. Best regards, Pierre Post -- Ian Roberts | Department of Computer Science [EMAIL PROTECTED] | University of Sheffield, UK
Href attribute support in soap envelope body
Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request produces null as JobParamBean parameter: ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 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/; SOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:NS2=http://annuaire.ciss.lu; NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu; JobName xsi:type=xsd:stringTestFromDelphi/JobName JobParamsIn xsi:type=SOAP-ENC:Array SOAP-ENC:arrayType=xsd:string[2] itemvalueDelphi1/item itemvalueDelphi2/item /JobParamsIn JobParamBean href=#1 / /NS1:ExecuteJob NS2:JobServiceParamType id=1 xsi:type=NS2:JobServiceParamType key xsi:type=xsd:stringparamkey/key value xsi:type=xsd:stringparamval/value /NS2:JobServiceParamType /SOAP-ENV:Body /SOAP-ENV:Envelope I tried to call the same web service from Java (also using Apache CXF 2.0.4) and the generated SOAP request correctly creates a JobParamBean instance: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsIn itemvalueJava1/item itemvalueJava2/item /JobParamsIn JobParamBean keykeyJava/key value xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns3=http://www.w3.org/2001/XMLSchema; xsi:type=ns3:int 1 /value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope I noticed that the Delphi SOAP request uses a reference for the third parameter (href=#1) but the Java SOAP request does not. Is it possible that CXF doesn't support this kind of references? Is there a workaround in CXF to support the request or perhaps in Delphi to suppress the use of the reference? Thanks in advance for any comments on this issue. Best regards, Pierre Post
Href attribute support in soap envelope body
Hi all, I have a problem when calling an Apache CXF Web service (CXF version is 2.0.4) running under Apache Tomcat 6 from a Delphi client program. The third parameter JobParamBean that I receive in my Web service on Tomcat is always null but there is no exception or any other hint in the Tomcat logs. The parameter is a simple JavaBean class (uses getters and setters for all properties and implements serializable). Moreover, the problem does not appear when calling the same Web service from a Java client. This is my Web service: @WebService(name=JobService, targetNamespace=http://annuaire.ciss.lu;) @SOAPBinding(style=Style.RPC) public interface JobService { @WebMethod(operationName=ExecuteJob) @WebResult(name=JobParamsOut) public String[] executeJob(@WebParam(name=JobName) String jobName, @WebParam(name=JobParamsIn) String[] input, @WebParam(name=JobParamBean) JobServiceParam param) throws ServiceException; } When calling this web service from the Delphi application (using the latest available HTTPRIO component and WSDL importer), the corresponding generated SOAP request is ?xml version=1.0? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; 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/; SOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:NS2=http://annuaire.ciss.lu; NS1:ExecuteJob xmlns:NS1=http://annuaire.ciss.lu; JobName xsi:type=xsd:stringTestFromDelphi/JobName JobParamsIn xsi:type=SOAP-ENC:Array SOAP-ENC:arrayType=xsd:string[2] itemvalueDelphi1/item itemvalueDelphi2/item /JobParamsIn JobParamBean href=#1 / /NS1:ExecuteJob NS2:JobServiceParamType id=1 xsi:type=NS2:JobServiceParamType key xsi:type=xsd:stringparamkey/key value xsi:type=xsd:stringparamval/value /NS2:JobServiceParamType /SOAP-ENV:Body /SOAP-ENV:Envelope I tried to call the same web service from Java (also using Apache CXF 2.0.4) and the generated SOAP request is soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns1:ExecuteJob xmlns:ns1=http://annuaire.ciss.lu; JobNameTestFromJava/JobName JobParamsIn itemvalueJava1/item itemvalueJava2/item /JobParamsIn JobParamBean keykeyJava/key value xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:ns3=http://www.w3.org/2001/XMLSchema; xsi:type=ns3:int 1 /value /JobParamBean /ns1:ExecuteJob /soap:Body /soap:Envelope I noticed that the Delphi SOAP request uses a reference for the third parameter (href=#1) but the Java SOAP request does not. Is it possible that CXF doesn't support this kind of references? Is there a workaround in CXF to support the request or perhaps in Delphi to suppress the use of the reference? Thank you in advance for any comments on this issue. Best regards, Pierre Post